@innosolutions/inno-calendar 1.0.66 → 1.0.68
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/AGENT.md +1783 -1783
- package/README.md +305 -305
- package/dist/agenda-widget-DyPlCQHM.cjs +2 -0
- package/dist/agenda-widget-DyPlCQHM.cjs.map +1 -0
- package/dist/{agenda-widget-qwbBw3IK.js → agenda-widget-nh_h1yy6.js} +803 -794
- package/dist/agenda-widget-nh_h1yy6.js.map +1 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/views/timeline-view.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +214 -214
- package/dist/position-utils-BzmOPdvQ.js.map +1 -1
- package/dist/position-utils-EQTCC4tZ.cjs.map +1 -1
- package/dist/slot-selection-context-CjS_VIPj.js.map +1 -1
- package/dist/slot-selection-context-CmE-aWgt.cjs.map +1 -1
- package/dist/week-view-B1KsZsC3.js.map +1 -1
- package/dist/week-view-Dv-Uz0eT.cjs.map +1 -1
- package/package.json +138 -138
- package/dist/agenda-widget-BNnhQds1.cjs +0 -2
- package/dist/agenda-widget-BNnhQds1.cjs.map +0 -1
- package/dist/agenda-widget-qwbBw3IK.js.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as e, jsxs as r, Fragment as
|
|
2
|
-
import { g as lt, u as
|
|
3
|
-
import { useCallback as
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as ye } from "react/jsx-runtime";
|
|
2
|
+
import { g as lt, u as vt, C as wt } from "./use-calendar--JnbGA3L.js";
|
|
3
|
+
import { useCallback as $, useState as ie, useEffect as ue, forwardRef as Pe, useRef as ae, useMemo as ee, useLayoutEffect as bt, useImperativeHandle as yt } from "react";
|
|
4
4
|
import { c as g } from "./index-DtaLkIY8.js";
|
|
5
|
-
import { P as ct, p as dt, o as ut, z as
|
|
6
|
-
import { j as
|
|
7
|
-
import { aG as
|
|
8
|
-
function
|
|
5
|
+
import { P as ct, p as dt, o as ut, z as me, I as kt, J as Nt, B as De, K as Ct, L as Ve, x as fe, F as ge, y as pe, k as Dt, C as Mt, M as Ye, A as Et, W as Lt, c as St, N as Tt } from "./week-view-B1KsZsC3.js";
|
|
6
|
+
import { j as Ht, D as It, I as zt, e as jt, S as At } from "./slot-selection-context-CjS_VIPj.js";
|
|
7
|
+
import { aG as ce, b2 as We, L as ht, as as Pt, a2 as Wt, ad as Ft, o as mt, Y as $t } from "./position-utils-BzmOPdvQ.js";
|
|
8
|
+
function Ot({ view: t, className: n = "" }) {
|
|
9
9
|
return /* @__PURE__ */ e(
|
|
10
10
|
"div",
|
|
11
11
|
{
|
|
@@ -30,48 +30,48 @@ function $t({ view: t, className: n = "" }) {
|
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
32
|
function Ke({ view: t, className: n }) {
|
|
33
|
-
return /* @__PURE__ */ e(
|
|
33
|
+
return /* @__PURE__ */ e(Ot, { view: t, className: n });
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function Cr(t) {
|
|
36
36
|
const {
|
|
37
37
|
events: n,
|
|
38
38
|
resources: s,
|
|
39
39
|
scheduleTypes: o,
|
|
40
40
|
initialView: a = "week",
|
|
41
41
|
initialDate: l,
|
|
42
|
-
initialFilters:
|
|
42
|
+
initialFilters: v,
|
|
43
43
|
preferences: h,
|
|
44
44
|
locale: c,
|
|
45
45
|
slots: w,
|
|
46
46
|
renderEvent: P,
|
|
47
|
-
onViewChange:
|
|
48
|
-
onDateChange:
|
|
47
|
+
onViewChange: y,
|
|
48
|
+
onDateChange: k,
|
|
49
49
|
onEventClick: B,
|
|
50
50
|
onSlotSelect: A,
|
|
51
51
|
onFiltersChange: W,
|
|
52
52
|
className: F,
|
|
53
53
|
children: H
|
|
54
|
-
} = t,
|
|
55
|
-
if (
|
|
56
|
-
return /* @__PURE__ */ e("div", { className: F, style: { position: "relative" }, children: H ?? /* @__PURE__ */ e(Ke, { view:
|
|
57
|
-
const
|
|
54
|
+
} = t, C = lt();
|
|
55
|
+
if (C)
|
|
56
|
+
return /* @__PURE__ */ e("div", { className: F, style: { position: "relative" }, children: H ?? /* @__PURE__ */ e(Ke, { view: C.view, className: F }) });
|
|
57
|
+
const O = vt({
|
|
58
58
|
events: n,
|
|
59
59
|
resources: s,
|
|
60
60
|
scheduleTypes: o,
|
|
61
61
|
initialView: a,
|
|
62
62
|
initialDate: l,
|
|
63
|
-
initialFilters:
|
|
63
|
+
initialFilters: v,
|
|
64
64
|
preferences: h,
|
|
65
65
|
locale: c,
|
|
66
|
-
onViewChange:
|
|
67
|
-
onDateChange:
|
|
66
|
+
onViewChange: y,
|
|
67
|
+
onDateChange: k,
|
|
68
68
|
onEventClick: B,
|
|
69
69
|
onSlotSelect: A,
|
|
70
70
|
onFiltersChange: W
|
|
71
71
|
});
|
|
72
|
-
return /* @__PURE__ */ e(
|
|
72
|
+
return /* @__PURE__ */ e(wt, { value: O, children: /* @__PURE__ */ e("div", { className: F, style: { position: "relative" }, children: H ?? /* @__PURE__ */ e(Ke, { view: O.view, className: F }) }) });
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function _t({ className: t }) {
|
|
75
75
|
return /* @__PURE__ */ r(
|
|
76
76
|
"svg",
|
|
77
77
|
{
|
|
@@ -131,7 +131,7 @@ function Ae({ className: t }) {
|
|
|
131
131
|
}
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function Bt({ className: t }) {
|
|
135
135
|
return /* @__PURE__ */ r(
|
|
136
136
|
"svg",
|
|
137
137
|
{
|
|
@@ -150,7 +150,7 @@ function _t({ className: t }) {
|
|
|
150
150
|
}
|
|
151
151
|
);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function Te({ className: t }) {
|
|
154
154
|
return /* @__PURE__ */ e(
|
|
155
155
|
"svg",
|
|
156
156
|
{
|
|
@@ -166,7 +166,7 @@ function He({ className: t }) {
|
|
|
166
166
|
}
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function Rt({ className: t }) {
|
|
170
170
|
return /* @__PURE__ */ r(
|
|
171
171
|
"svg",
|
|
172
172
|
{
|
|
@@ -185,7 +185,7 @@ function Bt({ className: t }) {
|
|
|
185
185
|
}
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Ut({ className: t }) {
|
|
189
189
|
return /* @__PURE__ */ e(
|
|
190
190
|
"svg",
|
|
191
191
|
{
|
|
@@ -201,7 +201,7 @@ function Rt({ className: t }) {
|
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function Vt({ className: t }) {
|
|
205
205
|
return /* @__PURE__ */ r(
|
|
206
206
|
"svg",
|
|
207
207
|
{
|
|
@@ -222,7 +222,7 @@ function Ut({ className: t }) {
|
|
|
222
222
|
}
|
|
223
223
|
);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function Yt({ className: t }) {
|
|
226
226
|
return /* @__PURE__ */ r(
|
|
227
227
|
"svg",
|
|
228
228
|
{
|
|
@@ -241,7 +241,7 @@ function Vt({ className: t }) {
|
|
|
241
241
|
}
|
|
242
242
|
);
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function Kt({ className: t }) {
|
|
245
245
|
return /* @__PURE__ */ r(
|
|
246
246
|
"svg",
|
|
247
247
|
{
|
|
@@ -262,7 +262,7 @@ function Yt({ className: t }) {
|
|
|
262
262
|
}
|
|
263
263
|
);
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function Gt({ className: t }) {
|
|
266
266
|
return /* @__PURE__ */ r(
|
|
267
267
|
"svg",
|
|
268
268
|
{
|
|
@@ -284,7 +284,7 @@ function Kt({ className: t }) {
|
|
|
284
284
|
}
|
|
285
285
|
);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function Me({ className: t }) {
|
|
288
288
|
return /* @__PURE__ */ e(
|
|
289
289
|
"svg",
|
|
290
290
|
{
|
|
@@ -300,7 +300,7 @@ function Ee({ className: t }) {
|
|
|
300
300
|
}
|
|
301
301
|
);
|
|
302
302
|
}
|
|
303
|
-
const
|
|
303
|
+
const Jt = {
|
|
304
304
|
edit: "Edit",
|
|
305
305
|
delete: "Delete",
|
|
306
306
|
cancel: "Cancel Event",
|
|
@@ -325,13 +325,13 @@ const Gt = {
|
|
|
325
325
|
acceptAllEvents: "Accept all events",
|
|
326
326
|
deleteConfirmTitle: "Delete Event",
|
|
327
327
|
deleteConfirmDescription: "Are you sure you want to delete this event? This action cannot be undone."
|
|
328
|
-
},
|
|
329
|
-
({ onClick: t, label: n, children: s, className: o, variant: a = "ghost", ...l },
|
|
330
|
-
/* @__PURE__ */ e(
|
|
328
|
+
}, He = Pe(
|
|
329
|
+
({ onClick: t, label: n, children: s, className: o, variant: a = "ghost", ...l }, v) => /* @__PURE__ */ r(fe, { children: [
|
|
330
|
+
/* @__PURE__ */ e(ge, { asChild: !0, children: /* @__PURE__ */ e(
|
|
331
331
|
"button",
|
|
332
332
|
{
|
|
333
333
|
type: "button",
|
|
334
|
-
ref:
|
|
334
|
+
ref: v,
|
|
335
335
|
onClick: t,
|
|
336
336
|
className: g(
|
|
337
337
|
"h-8 w-8 rounded-full flex items-center justify-center transition-colors",
|
|
@@ -344,12 +344,12 @@ const Gt = {
|
|
|
344
344
|
children: s
|
|
345
345
|
}
|
|
346
346
|
) }),
|
|
347
|
-
/* @__PURE__ */ e(
|
|
347
|
+
/* @__PURE__ */ e(pe, { side: "bottom", className: "text-xs", children: n })
|
|
348
348
|
] })
|
|
349
349
|
);
|
|
350
|
-
|
|
351
|
-
function
|
|
352
|
-
const [l,
|
|
350
|
+
He.displayName = "IconButton";
|
|
351
|
+
function qt({ src: t, alt: n, initials: s, className: o, isClient: a }) {
|
|
352
|
+
const [l, v] = ie(!1);
|
|
353
353
|
return /* @__PURE__ */ e(
|
|
354
354
|
"div",
|
|
355
355
|
{
|
|
@@ -363,7 +363,7 @@ function Jt({ src: t, alt: n, initials: s, className: o, isClient: a }) {
|
|
|
363
363
|
src: t,
|
|
364
364
|
alt: n,
|
|
365
365
|
className: "h-full w-full object-cover",
|
|
366
|
-
onError: () =>
|
|
366
|
+
onError: () => v(!0)
|
|
367
367
|
}
|
|
368
368
|
) : /* @__PURE__ */ e(
|
|
369
369
|
"div",
|
|
@@ -383,27 +383,27 @@ function Ge({
|
|
|
383
383
|
isEventCanceled: n = !1,
|
|
384
384
|
labels: s
|
|
385
385
|
}) {
|
|
386
|
-
const o = t.name || "Unknown", a = o.split(" ").map((
|
|
386
|
+
const o = t.name || "Unknown", a = o.split(" ").map((k) => k[0]).join("").toUpperCase().slice(0, 2), l = t.isOrganizer ?? !1, v = t.isConfirmed, h = v === !0, c = v === !1, w = t.isClient ?? !1, P = t.profilePicture || t.avatar, y = n;
|
|
387
387
|
return /* @__PURE__ */ r(
|
|
388
388
|
"div",
|
|
389
389
|
{
|
|
390
390
|
className: g(
|
|
391
391
|
"flex items-center gap-3 py-0",
|
|
392
|
-
|
|
392
|
+
y && "opacity-60"
|
|
393
393
|
),
|
|
394
394
|
children: [
|
|
395
395
|
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
396
396
|
/* @__PURE__ */ e(
|
|
397
|
-
|
|
397
|
+
qt,
|
|
398
398
|
{
|
|
399
399
|
src: P,
|
|
400
400
|
alt: o,
|
|
401
401
|
initials: a,
|
|
402
402
|
isClient: w,
|
|
403
|
-
className: g(
|
|
403
|
+
className: g(y && "grayscale")
|
|
404
404
|
}
|
|
405
405
|
),
|
|
406
|
-
|
|
406
|
+
y || c ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(Ae, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : h ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-green-100 dark:bg-green-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(Te, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
|
|
407
407
|
] }),
|
|
408
408
|
/* @__PURE__ */ r("div", { className: "!h-fit min-w-0 gap-0", children: [
|
|
409
409
|
/* @__PURE__ */ e("div", { className: "gap-0", children: /* @__PURE__ */ e(
|
|
@@ -411,31 +411,31 @@ function Ge({
|
|
|
411
411
|
{
|
|
412
412
|
className: g(
|
|
413
413
|
"text-sm text-zinc-900 dark:text-zinc-100 truncate",
|
|
414
|
-
|
|
414
|
+
y && "line-through text-zinc-500 dark:text-zinc-500"
|
|
415
415
|
),
|
|
416
416
|
children: o
|
|
417
417
|
}
|
|
418
418
|
) }),
|
|
419
419
|
w && /* @__PURE__ */ e("div", { className: "text-[10px] px-1.5 w-fit py-0.5 rounded bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300 font-medium", children: s.client }),
|
|
420
|
-
l && !
|
|
420
|
+
l && !y && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: s.organizer })
|
|
421
421
|
] })
|
|
422
422
|
]
|
|
423
423
|
}
|
|
424
424
|
);
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function Xt({
|
|
427
427
|
open: t,
|
|
428
428
|
onOpenChange: n,
|
|
429
429
|
title: s,
|
|
430
430
|
children: o
|
|
431
431
|
}) {
|
|
432
|
-
return
|
|
432
|
+
return ue(() => {
|
|
433
433
|
if (!t) return;
|
|
434
434
|
const a = (l) => {
|
|
435
435
|
l.key === "Escape" && n(!1);
|
|
436
436
|
};
|
|
437
437
|
return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
|
|
438
|
-
}, [t, n]),
|
|
438
|
+
}, [t, n]), ue(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
439
439
|
document.body.style.overflow = "";
|
|
440
440
|
}), [t]), t ? /* @__PURE__ */ r("div", { className: "fixed inset-0 z-50", children: [
|
|
441
441
|
/* @__PURE__ */ e(
|
|
@@ -454,14 +454,14 @@ function qt({
|
|
|
454
454
|
] }) })
|
|
455
455
|
] }) : null;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function Qt({
|
|
458
458
|
open: t,
|
|
459
459
|
onOpenChange: n,
|
|
460
460
|
title: s,
|
|
461
461
|
description: o,
|
|
462
462
|
cancelLabel: a,
|
|
463
463
|
confirmLabel: l,
|
|
464
|
-
onConfirm:
|
|
464
|
+
onConfirm: v,
|
|
465
465
|
isLoading: h
|
|
466
466
|
}) {
|
|
467
467
|
return t ? /* @__PURE__ */ r("div", { className: "fixed inset-0 z-[60]", children: [
|
|
@@ -493,10 +493,10 @@ function Xt({
|
|
|
493
493
|
{
|
|
494
494
|
variant: "destructive",
|
|
495
495
|
size: "sm",
|
|
496
|
-
onClick:
|
|
496
|
+
onClick: v,
|
|
497
497
|
disabled: h,
|
|
498
498
|
children: [
|
|
499
|
-
h && /* @__PURE__ */ e(
|
|
499
|
+
h && /* @__PURE__ */ e(Me, { className: "h-4 w-4 mr-2" }),
|
|
500
500
|
/* @__PURE__ */ e(ft, { className: "h-4 w-4 mr-2" }),
|
|
501
501
|
l
|
|
502
502
|
]
|
|
@@ -506,14 +506,14 @@ function Xt({
|
|
|
506
506
|
] }) })
|
|
507
507
|
] }) : null;
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function Zt(t, n) {
|
|
510
510
|
return t.toLocaleDateString(void 0, {
|
|
511
511
|
weekday: "long",
|
|
512
512
|
month: "long",
|
|
513
513
|
day: "numeric"
|
|
514
514
|
});
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function en(t, n) {
|
|
517
517
|
const s = {
|
|
518
518
|
hour: "2-digit",
|
|
519
519
|
minute: "2-digit",
|
|
@@ -521,7 +521,7 @@ function Zt(t, n) {
|
|
|
521
521
|
};
|
|
522
522
|
return `${t.toLocaleTimeString(void 0, s)} – ${n.toLocaleTimeString(void 0, s)}`;
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function tn(t) {
|
|
525
525
|
return t.toLocaleDateString(void 0, {
|
|
526
526
|
day: "2-digit",
|
|
527
527
|
month: "short",
|
|
@@ -530,9 +530,9 @@ function en(t) {
|
|
|
530
530
|
minute: "2-digit"
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
|
-
function
|
|
534
|
-
const [n, s] =
|
|
535
|
-
return
|
|
533
|
+
function nn(t) {
|
|
534
|
+
const [n, s] = ie(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
|
|
535
|
+
return ue(() => {
|
|
536
536
|
if (typeof window > "u") return;
|
|
537
537
|
const o = window.matchMedia(t), a = (l) => s(l.matches);
|
|
538
538
|
return o.addEventListener("change", a), () => o.removeEventListener("change", a);
|
|
@@ -545,51 +545,51 @@ function Je({
|
|
|
545
545
|
onClose: o,
|
|
546
546
|
onEdit: a,
|
|
547
547
|
onDelete: l,
|
|
548
|
-
onCancel:
|
|
548
|
+
onCancel: v,
|
|
549
549
|
onAccept: h,
|
|
550
550
|
onDecline: c,
|
|
551
551
|
onConfirmMeeting: w,
|
|
552
552
|
canEdit: P = !0,
|
|
553
|
-
canDelete:
|
|
554
|
-
canCancel:
|
|
553
|
+
canDelete: y = !1,
|
|
554
|
+
canCancel: k = !0,
|
|
555
555
|
isCurrentUserParticipant: B = !1,
|
|
556
556
|
isCurrentUserClient: A = !1,
|
|
557
557
|
currentUserAcceptStatus: W,
|
|
558
558
|
isAcceptLoading: F = !1,
|
|
559
559
|
isDeclineLoading: H = !1,
|
|
560
|
-
isConfirmLoading:
|
|
561
|
-
isDeleteLoading:
|
|
560
|
+
isConfirmLoading: C = !1,
|
|
561
|
+
isDeleteLoading: O = !1,
|
|
562
562
|
renderParticipant: R,
|
|
563
563
|
renderHeaderActions: Y,
|
|
564
564
|
renderCancelReason: M,
|
|
565
565
|
renderDeleteConfirmation: V,
|
|
566
|
-
formatDate: S =
|
|
567
|
-
formatTimeRange: z =
|
|
566
|
+
formatDate: S = Zt,
|
|
567
|
+
formatTimeRange: z = en
|
|
568
568
|
}) {
|
|
569
|
-
const [U, G] =
|
|
569
|
+
const [U, G] = ie(!1), Q = !(t.isCanceled || t.meetingTookPlace), m = t.isRecurring ?? !1, p = t.participantDetails, f = t.participantsNames || [], E = p && p.length > 0, D = W === !0, T = W === !1, te = B && !A && Q, _ = E ? p.filter((u) => u.isConfirmed).length : t.isAccepted ? f.length : 0, J = E ? p.length : f.length, re = t.scheduleTypeColor || t.hexColor || "#039BE5", q = $(() => t.startDate ? S(t.startDate) : n.noDateProvided, [t.startDate, S, n.noDateProvided]), ve = $(() => t.startDate && t.endDate ? z(t.startDate, t.endDate) : null, [t.startDate, t.endDate, z]), we = () => {
|
|
570
570
|
o(), a?.(t);
|
|
571
|
-
},
|
|
572
|
-
o(),
|
|
573
|
-
},
|
|
571
|
+
}, oe = () => {
|
|
572
|
+
o(), v?.(t);
|
|
573
|
+
}, ke = () => {
|
|
574
574
|
G(!0);
|
|
575
|
-
},
|
|
575
|
+
}, de = () => {
|
|
576
576
|
l?.(t), G(!1);
|
|
577
577
|
};
|
|
578
|
-
return s ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(
|
|
578
|
+
return s ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(Me, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ r(me, { delayDuration: 300, children: [
|
|
579
579
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5 p-3", children: [
|
|
580
|
-
/* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: Y ? Y({ onClose: o }) : /* @__PURE__ */ r(
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
580
|
+
/* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: Y ? Y({ onClose: o }) : /* @__PURE__ */ r(ye, { children: [
|
|
581
|
+
Q && P && a && /* @__PURE__ */ e(He, { onClick: we, label: n.edit, children: /* @__PURE__ */ e(_t, { className: "h-[18px] w-[18px]" }) }),
|
|
582
|
+
Q && k && v && /* @__PURE__ */ e(He, { onClick: oe, label: n.cancel, children: /* @__PURE__ */ e(Bt, { className: "h-[18px] w-[18px]" }) }),
|
|
583
|
+
y && l && /* @__PURE__ */ e(
|
|
584
|
+
He,
|
|
585
585
|
{
|
|
586
|
-
onClick:
|
|
586
|
+
onClick: ke,
|
|
587
587
|
label: n.delete,
|
|
588
588
|
variant: "destructive",
|
|
589
589
|
children: /* @__PURE__ */ e(ft, { className: "h-[18px] w-[18px]" })
|
|
590
590
|
}
|
|
591
591
|
),
|
|
592
|
-
/* @__PURE__ */ e(
|
|
592
|
+
/* @__PURE__ */ e(He, { onClick: o, label: n.close, children: /* @__PURE__ */ e(Ae, { className: "h-[18px] w-[18px]" }) })
|
|
593
593
|
] }) }),
|
|
594
594
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
|
|
595
595
|
/* @__PURE__ */ e(
|
|
@@ -612,7 +612,7 @@ function Je({
|
|
|
612
612
|
}
|
|
613
613
|
),
|
|
614
614
|
t.meetingTookPlace && /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400 text-xs font-medium", children: [
|
|
615
|
-
/* @__PURE__ */ e(
|
|
615
|
+
/* @__PURE__ */ e(Rt, { className: "h-3 w-3" }),
|
|
616
616
|
n.completed
|
|
617
617
|
] }),
|
|
618
618
|
t.isCanceled && /* @__PURE__ */ r("span", { className: "inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-400 text-xs font-medium", children: [
|
|
@@ -621,10 +621,10 @@ function Je({
|
|
|
621
621
|
] })
|
|
622
622
|
] }),
|
|
623
623
|
/* @__PURE__ */ r("div", { className: "mt-1 text-sm text-zinc-600 dark:text-zinc-400", children: [
|
|
624
|
-
/* @__PURE__ */ e("span", { children:
|
|
625
|
-
|
|
624
|
+
/* @__PURE__ */ e("span", { children: q() }),
|
|
625
|
+
ve() && /* @__PURE__ */ r(ye, { children: [
|
|
626
626
|
/* @__PURE__ */ e("span", { className: "mx-1.5", children: "·" }),
|
|
627
|
-
/* @__PURE__ */ e("span", { children:
|
|
627
|
+
/* @__PURE__ */ e("span", { children: ve() })
|
|
628
628
|
] })
|
|
629
629
|
] }),
|
|
630
630
|
m && t.recurrenceSummary && /* @__PURE__ */ e("div", { className: "text-sm text-zinc-500 dark:text-zinc-500", children: t.recurrenceSummary })
|
|
@@ -640,26 +640,26 @@ function Je({
|
|
|
640
640
|
t.canceledDate && /* @__PURE__ */ r("div", { className: "mt-1.5 text-xs text-red-500/70 dark:text-red-400/60", children: [
|
|
641
641
|
n.canceledOn,
|
|
642
642
|
" ",
|
|
643
|
-
|
|
643
|
+
tn(t.canceledDate)
|
|
644
644
|
] })
|
|
645
645
|
] }) }) }),
|
|
646
646
|
/* @__PURE__ */ r("div", { className: "space-y-0.5", children: [
|
|
647
647
|
t.address && /* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
|
|
648
|
-
/* @__PURE__ */ e(
|
|
648
|
+
/* @__PURE__ */ e(Yt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
|
|
649
649
|
/* @__PURE__ */ e("span", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: t.address })
|
|
650
650
|
] }),
|
|
651
651
|
(E || f.length > 0) && /* @__PURE__ */ r("div", { className: "flex items-start gap-2 py-0", children: [
|
|
652
|
-
/* @__PURE__ */ e(
|
|
652
|
+
/* @__PURE__ */ e(Vt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
|
|
653
653
|
/* @__PURE__ */ r("div", { className: "flex-1", children: [
|
|
654
654
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-0", children: [
|
|
655
655
|
/* @__PURE__ */ r("span", { className: "text-sm text-zinc-900 dark:text-zinc-100 font-medium", children: [
|
|
656
|
-
|
|
656
|
+
J,
|
|
657
657
|
" ",
|
|
658
|
-
|
|
658
|
+
J !== 1 ? n.guests : n.guest
|
|
659
659
|
] }),
|
|
660
|
-
|
|
660
|
+
J > 0 && /* @__PURE__ */ r("span", { className: "text-xs text-zinc-500", children: [
|
|
661
661
|
"(",
|
|
662
|
-
|
|
662
|
+
_,
|
|
663
663
|
" ",
|
|
664
664
|
n.confirmed,
|
|
665
665
|
")"
|
|
@@ -667,19 +667,19 @@ function Je({
|
|
|
667
667
|
] }),
|
|
668
668
|
/* @__PURE__ */ r("div", { className: "mt-2 space-y-2", children: [
|
|
669
669
|
E ? p.slice(0, 6).map(
|
|
670
|
-
(
|
|
670
|
+
(u, I) => R ? R(u, I) : /* @__PURE__ */ e(
|
|
671
671
|
Ge,
|
|
672
672
|
{
|
|
673
|
-
participant:
|
|
673
|
+
participant: u,
|
|
674
674
|
isEventCanceled: t.isCanceled,
|
|
675
675
|
labels: n
|
|
676
676
|
},
|
|
677
|
-
|
|
677
|
+
u.id
|
|
678
678
|
)
|
|
679
|
-
) : f.slice(0, 6).map((
|
|
679
|
+
) : f.slice(0, 6).map((u, I) => {
|
|
680
680
|
const K = {
|
|
681
681
|
id: String(I),
|
|
682
|
-
name:
|
|
682
|
+
name: u,
|
|
683
683
|
email: "",
|
|
684
684
|
isConfirmed: t.isAccepted,
|
|
685
685
|
isOrganizer: I === 0,
|
|
@@ -692,12 +692,12 @@ function Je({
|
|
|
692
692
|
isEventCanceled: t.isCanceled,
|
|
693
693
|
labels: n
|
|
694
694
|
},
|
|
695
|
-
|
|
695
|
+
u
|
|
696
696
|
);
|
|
697
697
|
}),
|
|
698
|
-
|
|
698
|
+
J > 6 && /* @__PURE__ */ r("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
|
|
699
699
|
"+",
|
|
700
|
-
|
|
700
|
+
J - 6,
|
|
701
701
|
" ",
|
|
702
702
|
n.more
|
|
703
703
|
] })
|
|
@@ -705,17 +705,17 @@ function Je({
|
|
|
705
705
|
] })
|
|
706
706
|
] }),
|
|
707
707
|
t.description && /* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
|
|
708
|
-
/* @__PURE__ */ e(
|
|
708
|
+
/* @__PURE__ */ e(Gt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
|
|
709
709
|
/* @__PURE__ */ e("p", { className: "text-sm text-zinc-700 dark:text-zinc-300 whitespace-pre-wrap", children: t.description })
|
|
710
710
|
] }),
|
|
711
711
|
/* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
|
|
712
|
-
/* @__PURE__ */ e(
|
|
713
|
-
/* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: E && p.find((
|
|
712
|
+
/* @__PURE__ */ e(Kt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
|
|
713
|
+
/* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: E && p.find((u) => u.isOrganizer)?.name || f[0] || "Calendar" })
|
|
714
714
|
] })
|
|
715
715
|
] }),
|
|
716
716
|
te && h && c && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
717
|
-
m ? /* @__PURE__ */ r(
|
|
718
|
-
/* @__PURE__ */ e(
|
|
717
|
+
m ? /* @__PURE__ */ r(kt, { children: [
|
|
718
|
+
/* @__PURE__ */ e(Nt, { asChild: !0, children: /* @__PURE__ */ r("div", { className: "flex", children: [
|
|
719
719
|
/* @__PURE__ */ e(
|
|
720
720
|
De,
|
|
721
721
|
{
|
|
@@ -725,12 +725,12 @@ function Je({
|
|
|
725
725
|
"rounded-r-none gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
|
|
726
726
|
D && "!bg-green-700 !text-white hover:!bg-green-700"
|
|
727
727
|
),
|
|
728
|
-
onClick: (
|
|
729
|
-
|
|
728
|
+
onClick: (u) => {
|
|
729
|
+
u.stopPropagation(), D || h(t);
|
|
730
730
|
},
|
|
731
731
|
disabled: F,
|
|
732
|
-
children: F ? /* @__PURE__ */ e(
|
|
733
|
-
D && /* @__PURE__ */ e(
|
|
732
|
+
children: F ? /* @__PURE__ */ e(Me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(ye, { children: [
|
|
733
|
+
D && /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5" }),
|
|
734
734
|
n.going
|
|
735
735
|
] })
|
|
736
736
|
}
|
|
@@ -744,11 +744,11 @@ function Je({
|
|
|
744
744
|
"rounded-l-none px-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
|
|
745
745
|
D && "!bg-green-700 !text-white hover:!bg-green-700"
|
|
746
746
|
),
|
|
747
|
-
children: /* @__PURE__ */ e(
|
|
747
|
+
children: /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5" })
|
|
748
748
|
}
|
|
749
749
|
)
|
|
750
750
|
] }) }),
|
|
751
|
-
/* @__PURE__ */ r(
|
|
751
|
+
/* @__PURE__ */ r(Ct, { align: "start", children: [
|
|
752
752
|
/* @__PURE__ */ r(
|
|
753
753
|
Ve,
|
|
754
754
|
{
|
|
@@ -758,13 +758,13 @@ function Je({
|
|
|
758
758
|
),
|
|
759
759
|
onClick: () => h(t),
|
|
760
760
|
children: [
|
|
761
|
-
/* @__PURE__ */ e(
|
|
761
|
+
/* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
|
|
762
762
|
n.acceptThisEvent
|
|
763
763
|
]
|
|
764
764
|
}
|
|
765
765
|
),
|
|
766
766
|
/* @__PURE__ */ r(Ve, { onClick: () => h(t), children: [
|
|
767
|
-
/* @__PURE__ */ e(
|
|
767
|
+
/* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
|
|
768
768
|
n.acceptAllEvents
|
|
769
769
|
] })
|
|
770
770
|
] })
|
|
@@ -781,8 +781,8 @@ function Je({
|
|
|
781
781
|
D || h(t);
|
|
782
782
|
},
|
|
783
783
|
disabled: F,
|
|
784
|
-
children: F ? /* @__PURE__ */ e(
|
|
785
|
-
D && /* @__PURE__ */ e(
|
|
784
|
+
children: F ? /* @__PURE__ */ e(Me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(ye, { children: [
|
|
785
|
+
D && /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5" }),
|
|
786
786
|
n.going
|
|
787
787
|
] })
|
|
788
788
|
}
|
|
@@ -800,7 +800,7 @@ function Je({
|
|
|
800
800
|
T || c(t);
|
|
801
801
|
},
|
|
802
802
|
disabled: H,
|
|
803
|
-
children: H ? /* @__PURE__ */ e(
|
|
803
|
+
children: H ? /* @__PURE__ */ e(Me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(ye, { children: [
|
|
804
804
|
T && /* @__PURE__ */ e(Ae, { className: "h-3.5 w-3.5" }),
|
|
805
805
|
n.notGoing
|
|
806
806
|
] })
|
|
@@ -814,20 +814,20 @@ function Je({
|
|
|
814
814
|
variant: "outline",
|
|
815
815
|
className: "w-full h-9 hover:!bg-green-100 hover:text-green-700 text-green-700 !bg-green-100 !border-none dark:text-green-400 dark:hover:bg-green-950/30",
|
|
816
816
|
onClick: () => w(t),
|
|
817
|
-
disabled:
|
|
817
|
+
disabled: C,
|
|
818
818
|
children: [
|
|
819
|
-
|
|
819
|
+
C && /* @__PURE__ */ e(Me, { className: "h-4 w-4 mr-2" }),
|
|
820
820
|
n.confirmMeeting
|
|
821
821
|
]
|
|
822
822
|
}
|
|
823
823
|
) })
|
|
824
824
|
] }),
|
|
825
825
|
V ? U && V({
|
|
826
|
-
onConfirm:
|
|
826
|
+
onConfirm: de,
|
|
827
827
|
onCancel: () => G(!1),
|
|
828
|
-
isLoading:
|
|
828
|
+
isLoading: O
|
|
829
829
|
}) : /* @__PURE__ */ e(
|
|
830
|
-
|
|
830
|
+
Qt,
|
|
831
831
|
{
|
|
832
832
|
open: U,
|
|
833
833
|
onOpenChange: G,
|
|
@@ -835,33 +835,33 @@ function Je({
|
|
|
835
835
|
description: n.deleteConfirmDescription,
|
|
836
836
|
cancelLabel: n.cancel,
|
|
837
837
|
confirmLabel: n.delete,
|
|
838
|
-
onConfirm:
|
|
839
|
-
isLoading:
|
|
838
|
+
onConfirm: de,
|
|
839
|
+
isLoading: O
|
|
840
840
|
}
|
|
841
841
|
)
|
|
842
842
|
] });
|
|
843
843
|
}
|
|
844
|
-
function
|
|
844
|
+
function Dr({
|
|
845
845
|
event: t,
|
|
846
846
|
children: n,
|
|
847
847
|
open: s,
|
|
848
848
|
onOpenChange: o,
|
|
849
849
|
isLoading: a,
|
|
850
850
|
labels: l,
|
|
851
|
-
onEdit:
|
|
851
|
+
onEdit: v,
|
|
852
852
|
onDelete: h,
|
|
853
853
|
onCancel: c,
|
|
854
854
|
onAccept: w,
|
|
855
855
|
onDecline: P,
|
|
856
|
-
onConfirmMeeting:
|
|
857
|
-
canEdit:
|
|
856
|
+
onConfirmMeeting: y,
|
|
857
|
+
canEdit: k = !0,
|
|
858
858
|
canDelete: B = !1,
|
|
859
859
|
canCancel: A = !0,
|
|
860
860
|
isCurrentUserParticipant: W,
|
|
861
861
|
isCurrentUserClient: F,
|
|
862
862
|
currentUserAcceptStatus: H,
|
|
863
|
-
isAcceptLoading:
|
|
864
|
-
isDeclineLoading:
|
|
863
|
+
isAcceptLoading: C,
|
|
864
|
+
isDeclineLoading: O,
|
|
865
865
|
isConfirmLoading: R,
|
|
866
866
|
isDeleteLoading: Y,
|
|
867
867
|
renderParticipant: M,
|
|
@@ -870,30 +870,30 @@ function Cr({
|
|
|
870
870
|
renderDeleteConfirmation: z,
|
|
871
871
|
formatDate: U,
|
|
872
872
|
formatTimeRange: G,
|
|
873
|
-
className:
|
|
873
|
+
className: Q,
|
|
874
874
|
width: m = 360
|
|
875
875
|
}) {
|
|
876
|
-
const p =
|
|
876
|
+
const p = nn("(min-width: 768px)"), f = { ...Jt, ...l }, E = $(() => {
|
|
877
877
|
o?.(!1);
|
|
878
878
|
}, [o]), D = {
|
|
879
879
|
event: t,
|
|
880
880
|
labels: f,
|
|
881
881
|
isLoading: a,
|
|
882
882
|
onClose: E,
|
|
883
|
-
onEdit:
|
|
883
|
+
onEdit: v,
|
|
884
884
|
onDelete: h,
|
|
885
885
|
onCancel: c,
|
|
886
886
|
onAccept: w,
|
|
887
887
|
onDecline: P,
|
|
888
|
-
onConfirmMeeting:
|
|
889
|
-
canEdit:
|
|
888
|
+
onConfirmMeeting: y,
|
|
889
|
+
canEdit: k,
|
|
890
890
|
canDelete: B,
|
|
891
891
|
canCancel: A,
|
|
892
892
|
isCurrentUserParticipant: W,
|
|
893
893
|
isCurrentUserClient: F,
|
|
894
894
|
currentUserAcceptStatus: H,
|
|
895
|
-
isAcceptLoading:
|
|
896
|
-
isDeclineLoading:
|
|
895
|
+
isAcceptLoading: C,
|
|
896
|
+
isDeclineLoading: O,
|
|
897
897
|
isConfirmLoading: R,
|
|
898
898
|
isDeleteLoading: Y,
|
|
899
899
|
renderParticipant: M,
|
|
@@ -911,7 +911,7 @@ function Cr({
|
|
|
911
911
|
{
|
|
912
912
|
className: g(
|
|
913
913
|
"p-0 shadow-lg !rounded-2xl bg-white dark:bg-zinc-900 overflow-hidden border z-50",
|
|
914
|
-
|
|
914
|
+
Q
|
|
915
915
|
),
|
|
916
916
|
style: { width: m },
|
|
917
917
|
align: "center",
|
|
@@ -920,10 +920,10 @@ function Cr({
|
|
|
920
920
|
children: /* @__PURE__ */ e(Je, { ...D })
|
|
921
921
|
}
|
|
922
922
|
)
|
|
923
|
-
] }) : /* @__PURE__ */ r(
|
|
923
|
+
] }) : /* @__PURE__ */ r(ye, { children: [
|
|
924
924
|
n,
|
|
925
925
|
/* @__PURE__ */ e(
|
|
926
|
-
|
|
926
|
+
Xt,
|
|
927
927
|
{
|
|
928
928
|
open: s ?? !1,
|
|
929
929
|
onOpenChange: o ?? (() => {
|
|
@@ -934,11 +934,11 @@ function Cr({
|
|
|
934
934
|
)
|
|
935
935
|
] });
|
|
936
936
|
}
|
|
937
|
-
const
|
|
938
|
-
function
|
|
937
|
+
const $e = 44, qe = 4, rn = 56, Xe = 8, ze = 80, Le = 140, Qe = 100, Ze = 2, on = 8, sn = 18;
|
|
938
|
+
function an(t) {
|
|
939
939
|
return t.split(" ").map((n) => n[0]).join("").toUpperCase().slice(0, 2);
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function ln(t, n) {
|
|
942
942
|
const s = [];
|
|
943
943
|
for (let o = 0; o < n; o++) {
|
|
944
944
|
const a = new Date(t);
|
|
@@ -946,17 +946,17 @@ function an(t, n) {
|
|
|
946
946
|
}
|
|
947
947
|
return s;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function cn(t, n, s) {
|
|
950
950
|
const o = [];
|
|
951
951
|
return t.forEach((a, l) => {
|
|
952
|
-
for (let
|
|
953
|
-
o.push({ hour:
|
|
952
|
+
for (let v = n; v < s; v++)
|
|
953
|
+
o.push({ hour: v, dayIndex: l, date: a });
|
|
954
954
|
}), o;
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Oe(t) {
|
|
957
957
|
return `${t.toString().padStart(2, "0")}:00`;
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function dn(t) {
|
|
960
960
|
return t.toLocaleDateString("en-US", {
|
|
961
961
|
weekday: "short",
|
|
962
962
|
month: "short",
|
|
@@ -976,7 +976,7 @@ function et(t) {
|
|
|
976
976
|
}
|
|
977
977
|
return s;
|
|
978
978
|
}
|
|
979
|
-
function
|
|
979
|
+
function un({ src: t, alt: n, fallback: s, className: o }) {
|
|
980
980
|
return /* @__PURE__ */ e(
|
|
981
981
|
"div",
|
|
982
982
|
{
|
|
@@ -995,105 +995,105 @@ function dn({ src: t, alt: n, fallback: s, className: o }) {
|
|
|
995
995
|
}
|
|
996
996
|
);
|
|
997
997
|
}
|
|
998
|
-
const
|
|
999
|
-
function
|
|
1000
|
-
daysToShow: t =
|
|
998
|
+
const hn = 7;
|
|
999
|
+
function Se({
|
|
1000
|
+
daysToShow: t = hn,
|
|
1001
1001
|
events: n,
|
|
1002
1002
|
users: s = [],
|
|
1003
1003
|
alwaysShowResources: o,
|
|
1004
1004
|
selectedDate: a,
|
|
1005
1005
|
onDateChange: l,
|
|
1006
|
-
onEventClick:
|
|
1006
|
+
onEventClick: v,
|
|
1007
1007
|
onSlotClick: h,
|
|
1008
1008
|
onSlotSelect: c,
|
|
1009
1009
|
visibleHours: w,
|
|
1010
1010
|
className: P,
|
|
1011
|
-
getEventUserId:
|
|
1012
|
-
renderPopover:
|
|
1011
|
+
getEventUserId: y,
|
|
1012
|
+
renderPopover: k,
|
|
1013
1013
|
slots: B,
|
|
1014
1014
|
classNames: A,
|
|
1015
1015
|
enableDrag: W = !0
|
|
1016
1016
|
}) {
|
|
1017
|
-
const F =
|
|
1017
|
+
const F = ae(null), H = Ht(), [C, O] = ie(null), R = ae(!1), [Y, M] = ie(null), V = a ?? /* @__PURE__ */ new Date(), S = !0, z = w?.from ?? on, U = w?.to ?? sn, G = U - z, Q = ee(() => {
|
|
1018
1018
|
const i = new Date(V);
|
|
1019
1019
|
if (t === 1 || t === 3)
|
|
1020
1020
|
return i.setHours(0, 0, 0, 0), i;
|
|
1021
|
-
const
|
|
1022
|
-
return i.setDate(i.getDate() +
|
|
1021
|
+
const d = i.getDay(), x = d === 0 ? -6 : 1 - d;
|
|
1022
|
+
return i.setDate(i.getDate() + x), i.setHours(0, 0, 0, 0), i;
|
|
1023
1023
|
}, [V, t]), m = ee(
|
|
1024
|
-
() =>
|
|
1025
|
-
[
|
|
1024
|
+
() => ln(Q, t),
|
|
1025
|
+
[Q, t]
|
|
1026
1026
|
), p = ee(
|
|
1027
|
-
() =>
|
|
1027
|
+
() => cn(m, z, U),
|
|
1028
1028
|
[S, m, z, U]
|
|
1029
|
-
), E =
|
|
1029
|
+
), E = y ?? ((i) => {
|
|
1030
1030
|
if (i.resourceId) return i.resourceId;
|
|
1031
|
-
const
|
|
1032
|
-
if (
|
|
1033
|
-
if (
|
|
1034
|
-
return String(
|
|
1031
|
+
const d = i.data;
|
|
1032
|
+
if (d?.userId) return String(d.userId);
|
|
1033
|
+
if (d?.user && typeof d.user == "object" && d.user.id)
|
|
1034
|
+
return String(d.user.id);
|
|
1035
1035
|
if (i.user?.id) return i.user.id;
|
|
1036
1036
|
if (i.participants?.[0]?.id) return i.participants[0].id;
|
|
1037
1037
|
}), D = ee(() => {
|
|
1038
1038
|
const i = /* @__PURE__ */ new Map();
|
|
1039
|
-
for (const
|
|
1040
|
-
i.set(
|
|
1041
|
-
id:
|
|
1042
|
-
name:
|
|
1043
|
-
avatar:
|
|
1044
|
-
email:
|
|
1039
|
+
for (const d of s)
|
|
1040
|
+
i.set(d.id, {
|
|
1041
|
+
id: d.id,
|
|
1042
|
+
name: d.name,
|
|
1043
|
+
avatar: d.avatar ?? void 0,
|
|
1044
|
+
email: d.email
|
|
1045
1045
|
});
|
|
1046
|
-
for (const
|
|
1047
|
-
const
|
|
1048
|
-
|
|
1049
|
-
id:
|
|
1050
|
-
name:
|
|
1051
|
-
avatar:
|
|
1052
|
-
email:
|
|
1053
|
-
}),
|
|
1054
|
-
id:
|
|
1055
|
-
name:
|
|
1056
|
-
avatar:
|
|
1057
|
-
email:
|
|
1046
|
+
for (const d of n) {
|
|
1047
|
+
const b = d.data?.user;
|
|
1048
|
+
b?.id && !i.has(b.id) && i.set(b.id, {
|
|
1049
|
+
id: b.id,
|
|
1050
|
+
name: b.name ?? "",
|
|
1051
|
+
avatar: b.avatar ?? void 0,
|
|
1052
|
+
email: b.email
|
|
1053
|
+
}), d.user?.id && !i.has(d.user.id) && i.set(d.user.id, {
|
|
1054
|
+
id: d.user.id,
|
|
1055
|
+
name: d.user.name,
|
|
1056
|
+
avatar: d.user.avatar ?? void 0,
|
|
1057
|
+
email: d.user.email
|
|
1058
1058
|
});
|
|
1059
|
-
for (const
|
|
1060
|
-
|
|
1061
|
-
id:
|
|
1062
|
-
name:
|
|
1063
|
-
avatar:
|
|
1064
|
-
email:
|
|
1059
|
+
for (const N of d.participants || [])
|
|
1060
|
+
N.id && !i.has(N.id) && i.set(N.id, {
|
|
1061
|
+
id: N.id,
|
|
1062
|
+
name: N.name,
|
|
1063
|
+
avatar: N.avatar ?? void 0,
|
|
1064
|
+
email: N.email
|
|
1065
1065
|
});
|
|
1066
1066
|
}
|
|
1067
1067
|
return Array.from(i.values());
|
|
1068
1068
|
}, [s, n]), T = ee(() => {
|
|
1069
|
-
const i = [],
|
|
1070
|
-
for (const
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
for (const
|
|
1074
|
-
const L = E(
|
|
1075
|
-
(
|
|
1069
|
+
const i = [], d = /* @__PURE__ */ new Map();
|
|
1070
|
+
for (const N of D)
|
|
1071
|
+
d.set(N.id, []);
|
|
1072
|
+
d.set("unassigned", []);
|
|
1073
|
+
for (const N of n) {
|
|
1074
|
+
const L = E(N) ?? "unassigned";
|
|
1075
|
+
(d.get(L) ?? d.get("unassigned")).push(N);
|
|
1076
1076
|
}
|
|
1077
|
-
const
|
|
1077
|
+
const x = (N) => {
|
|
1078
1078
|
const L = [];
|
|
1079
|
-
for (const j of
|
|
1079
|
+
for (const j of N) {
|
|
1080
1080
|
const Z = j.startDate.getHours() + j.startDate.getMinutes() / 60, ne = j.endDate.getHours() + j.endDate.getMinutes() / 60;
|
|
1081
|
-
for (let
|
|
1082
|
-
const
|
|
1083
|
-
if (j.startDate <=
|
|
1084
|
-
let
|
|
1085
|
-
if (j.startDate >=
|
|
1081
|
+
for (let X = 0; X < m.length; X++) {
|
|
1082
|
+
const se = m[X], Ne = We(se), Ce = ht(se);
|
|
1083
|
+
if (j.startDate <= Ce && j.endDate >= Ne) {
|
|
1084
|
+
let be = z, Ee = U;
|
|
1085
|
+
if (j.startDate >= Ne && (be = Math.max(z, Z)), j.endDate <= Ce && (Ee = Math.min(U, ne)), be = Math.max(
|
|
1086
1086
|
z,
|
|
1087
|
-
Math.min(U,
|
|
1088
|
-
),
|
|
1087
|
+
Math.min(U, be)
|
|
1088
|
+
), Ee = Math.max(
|
|
1089
1089
|
z,
|
|
1090
|
-
Math.min(U,
|
|
1091
|
-
),
|
|
1092
|
-
const
|
|
1090
|
+
Math.min(U, Ee)
|
|
1091
|
+
), Ee > be) {
|
|
1092
|
+
const pt = X * G + (be - z), xt = Ee - be;
|
|
1093
1093
|
L.push({
|
|
1094
1094
|
event: j,
|
|
1095
|
-
startCol:
|
|
1096
|
-
spanCols:
|
|
1095
|
+
startCol: pt,
|
|
1096
|
+
spanCols: xt
|
|
1097
1097
|
});
|
|
1098
1098
|
}
|
|
1099
1099
|
}
|
|
@@ -1101,20 +1101,20 @@ function Te({
|
|
|
1101
1101
|
}
|
|
1102
1102
|
return L;
|
|
1103
1103
|
};
|
|
1104
|
-
for (const
|
|
1105
|
-
const L =
|
|
1106
|
-
(
|
|
1104
|
+
for (const N of D) {
|
|
1105
|
+
const L = d.get(N.id) ?? [], j = x(L), Z = et(j), ne = Z.reduce(
|
|
1106
|
+
(X, se) => Math.max(X, se.stackIndex + 1),
|
|
1107
1107
|
0
|
|
1108
1108
|
);
|
|
1109
1109
|
i.push({
|
|
1110
|
-
user:
|
|
1110
|
+
user: N,
|
|
1111
1111
|
events: Z,
|
|
1112
1112
|
maxStack: Math.max(ne, 1)
|
|
1113
1113
|
});
|
|
1114
1114
|
}
|
|
1115
|
-
const
|
|
1116
|
-
if (
|
|
1117
|
-
const
|
|
1115
|
+
const b = d.get("unassigned") ?? [];
|
|
1116
|
+
if (b.length > 0) {
|
|
1117
|
+
const N = x(b), L = et(N), j = L.reduce(
|
|
1118
1118
|
(Z, ne) => Math.max(Z, ne.stackIndex + 1),
|
|
1119
1119
|
0
|
|
1120
1120
|
);
|
|
@@ -1130,9 +1130,9 @@ function Te({
|
|
|
1130
1130
|
});
|
|
1131
1131
|
}
|
|
1132
1132
|
if (o?.length) {
|
|
1133
|
-
const
|
|
1133
|
+
const N = new Set(i.map((L) => L.user.id));
|
|
1134
1134
|
for (const L of o)
|
|
1135
|
-
|
|
1135
|
+
N.has(L.id) || (i.push({
|
|
1136
1136
|
user: {
|
|
1137
1137
|
id: L.id,
|
|
1138
1138
|
name: L.name,
|
|
@@ -1141,7 +1141,7 @@ function Te({
|
|
|
1141
1141
|
},
|
|
1142
1142
|
events: [],
|
|
1143
1143
|
maxStack: 1
|
|
1144
|
-
}),
|
|
1144
|
+
}), N.add(L.id));
|
|
1145
1145
|
}
|
|
1146
1146
|
return i;
|
|
1147
1147
|
}, [
|
|
@@ -1156,61 +1156,70 @@ function Te({
|
|
|
1156
1156
|
o
|
|
1157
1157
|
]), te = ee(() => {
|
|
1158
1158
|
const i = /* @__PURE__ */ new Map();
|
|
1159
|
-
for (const
|
|
1160
|
-
for (const
|
|
1161
|
-
if (
|
|
1162
|
-
const N = i.get(
|
|
1163
|
-
i.set(
|
|
1159
|
+
for (const d of T)
|
|
1160
|
+
for (const x of d.events)
|
|
1161
|
+
if (x.spanCols <= 1) {
|
|
1162
|
+
const b = Math.floor(x.startCol), N = i.get(b) ?? 0;
|
|
1163
|
+
i.set(b, N + 1);
|
|
1164
1164
|
}
|
|
1165
1165
|
return i;
|
|
1166
|
-
}, [T]),
|
|
1167
|
-
const i = p.length,
|
|
1168
|
-
for (let
|
|
1169
|
-
const
|
|
1170
|
-
|
|
1171
|
-
Qe + (
|
|
1172
|
-
) :
|
|
1166
|
+
}, [T]), _ = ee(() => {
|
|
1167
|
+
const i = p.length, d = ze, x = [];
|
|
1168
|
+
for (let b = 0; b < i; b++) {
|
|
1169
|
+
const N = te.get(b) ?? 0;
|
|
1170
|
+
N > Ze ? x.push(
|
|
1171
|
+
Qe + (N - Ze) * 20
|
|
1172
|
+
) : N > 0 ? x.push(Math.max(d, Qe)) : x.push(d);
|
|
1173
1173
|
}
|
|
1174
|
-
return
|
|
1174
|
+
return x;
|
|
1175
1175
|
}, [
|
|
1176
1176
|
S,
|
|
1177
1177
|
p.length,
|
|
1178
1178
|
m.length,
|
|
1179
1179
|
te
|
|
1180
|
-
]),
|
|
1181
|
-
|
|
1182
|
-
i * (
|
|
1183
|
-
), re =
|
|
1180
|
+
]), J = (i) => Math.max(
|
|
1181
|
+
rn,
|
|
1182
|
+
i * ($e + qe) + Xe * 2
|
|
1183
|
+
), re = Le + _.reduce((i, d) => i + d, 0), q = ee(() => {
|
|
1184
1184
|
const i = [0];
|
|
1185
|
-
for (let
|
|
1186
|
-
i.push(i[
|
|
1185
|
+
for (let d = 0; d < _.length; d++)
|
|
1186
|
+
i.push(i[d] + _[d]);
|
|
1187
1187
|
return i;
|
|
1188
|
-
}, [
|
|
1189
|
-
|
|
1188
|
+
}, [_]), ve = $(
|
|
1189
|
+
(i) => {
|
|
1190
|
+
const d = q.length - 1;
|
|
1191
|
+
if (i <= 0) return q[0] ?? 0;
|
|
1192
|
+
if (i >= d) return q[d] ?? 0;
|
|
1193
|
+
const x = Math.floor(i), b = q[x] ?? 0, N = q[x + 1] ?? b;
|
|
1194
|
+
return b + (i - x) * (N - b);
|
|
1195
|
+
},
|
|
1196
|
+
[q]
|
|
1197
|
+
);
|
|
1198
|
+
bt(() => {
|
|
1190
1199
|
const i = F.current;
|
|
1191
1200
|
if (!i) return;
|
|
1192
|
-
const
|
|
1193
|
-
let
|
|
1194
|
-
const
|
|
1201
|
+
const d = () => {
|
|
1202
|
+
let x = -1;
|
|
1203
|
+
const N = (/* @__PURE__ */ new Date()).getHours();
|
|
1195
1204
|
{
|
|
1196
1205
|
for (let L = 0; L < p.length; L++) {
|
|
1197
1206
|
const j = p[L];
|
|
1198
|
-
if (j &&
|
|
1199
|
-
|
|
1207
|
+
if (j && ce(j.date) && j.hour <= N && j.hour + 1 > N) {
|
|
1208
|
+
x = L;
|
|
1200
1209
|
break;
|
|
1201
1210
|
}
|
|
1202
1211
|
}
|
|
1203
|
-
if (
|
|
1212
|
+
if (x === -1)
|
|
1204
1213
|
for (let L = 0; L < p.length; L++) {
|
|
1205
1214
|
const j = p[L];
|
|
1206
|
-
if (j &&
|
|
1207
|
-
|
|
1215
|
+
if (j && ce(j.date)) {
|
|
1216
|
+
x = L;
|
|
1208
1217
|
break;
|
|
1209
1218
|
}
|
|
1210
1219
|
}
|
|
1211
1220
|
}
|
|
1212
|
-
if (
|
|
1213
|
-
const L = (
|
|
1221
|
+
if (x !== -1) {
|
|
1222
|
+
const L = (q[x] ?? 0) + Le, j = i.clientWidth, Z = Math.max(0, L - j / 3);
|
|
1214
1223
|
i.scrollTo({
|
|
1215
1224
|
left: Z,
|
|
1216
1225
|
behavior: "instant"
|
|
@@ -1218,104 +1227,104 @@ function Te({
|
|
|
1218
1227
|
}
|
|
1219
1228
|
};
|
|
1220
1229
|
requestAnimationFrame(() => {
|
|
1221
|
-
requestAnimationFrame(
|
|
1230
|
+
requestAnimationFrame(d);
|
|
1222
1231
|
});
|
|
1223
|
-
}, [V, p, m,
|
|
1224
|
-
const we =
|
|
1225
|
-
(i,
|
|
1226
|
-
const
|
|
1227
|
-
for (let
|
|
1228
|
-
const L =
|
|
1229
|
-
if (
|
|
1230
|
-
const Z = (
|
|
1231
|
-
return { colIndex:
|
|
1232
|
+
}, [V, p, m, q, S]);
|
|
1233
|
+
const we = $(
|
|
1234
|
+
(i, d) => {
|
|
1235
|
+
const x = d.getBoundingClientRect(), b = i - x.left + d.scrollLeft;
|
|
1236
|
+
for (let N = 0; N < q.length - 1; N++) {
|
|
1237
|
+
const L = q[N], j = q[N + 1];
|
|
1238
|
+
if (b >= L && b < j) {
|
|
1239
|
+
const Z = (b - L) / (j - L), ne = Math.floor(Z * 60), X = Math.round(ne / 15) * 15;
|
|
1240
|
+
return { colIndex: N, minute: Math.min(X, 45) };
|
|
1232
1241
|
}
|
|
1233
1242
|
}
|
|
1234
1243
|
return null;
|
|
1235
1244
|
},
|
|
1236
|
-
[
|
|
1237
|
-
),
|
|
1238
|
-
(i,
|
|
1245
|
+
[q]
|
|
1246
|
+
), oe = $(
|
|
1247
|
+
(i, d) => {
|
|
1239
1248
|
if (p[i]) {
|
|
1240
|
-
const
|
|
1241
|
-
return
|
|
1249
|
+
const x = p[i], b = new Date(x.date);
|
|
1250
|
+
return b.setHours(x.hour, d ?? 0, 0, 0), { date: b, hour: x.hour };
|
|
1242
1251
|
}
|
|
1243
1252
|
return { date: /* @__PURE__ */ new Date() };
|
|
1244
1253
|
},
|
|
1245
1254
|
[S, p, m]
|
|
1246
|
-
),
|
|
1247
|
-
(i,
|
|
1255
|
+
), ke = $(
|
|
1256
|
+
(i, d) => {
|
|
1248
1257
|
if (i.preventDefault(), i.dataTransfer.dropEffect = "move", !H?.isDragging || !H.dragState) return;
|
|
1249
|
-
const
|
|
1250
|
-
if (!
|
|
1251
|
-
const { colIndex:
|
|
1252
|
-
H.updateDragPreview(j, Z, L,
|
|
1253
|
-
const { originalStartDate: ne, originalEndDate:
|
|
1254
|
-
let
|
|
1258
|
+
const x = i.currentTarget, b = we(i.clientX, x);
|
|
1259
|
+
if (!b) return;
|
|
1260
|
+
const { colIndex: N, minute: L } = b, { date: j, hour: Z } = oe(N, L);
|
|
1261
|
+
H.updateDragPreview(j, Z, L, d);
|
|
1262
|
+
const { originalStartDate: ne, originalEndDate: X } = H.dragState, se = X.getTime() - ne.getTime(), Ne = p.length;
|
|
1263
|
+
let Ce;
|
|
1255
1264
|
{
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1265
|
+
const be = se / 36e5;
|
|
1266
|
+
Ce = Math.max(1, Math.ceil(be));
|
|
1258
1267
|
}
|
|
1259
|
-
|
|
1268
|
+
Ce = Math.min(Ce, Ne - N), M({ resourceId: d, colIndex: N, spanCols: Ce });
|
|
1260
1269
|
},
|
|
1261
|
-
[H, we,
|
|
1262
|
-
),
|
|
1270
|
+
[H, we, oe, S, p.length, m.length]
|
|
1271
|
+
), de = $(
|
|
1263
1272
|
(i) => {
|
|
1264
|
-
const
|
|
1265
|
-
i.currentTarget.contains(
|
|
1273
|
+
const d = i.relatedTarget;
|
|
1274
|
+
i.currentTarget.contains(d) || M(null);
|
|
1266
1275
|
},
|
|
1267
1276
|
[]
|
|
1268
|
-
),
|
|
1269
|
-
(i,
|
|
1277
|
+
), u = $(
|
|
1278
|
+
(i, d) => {
|
|
1270
1279
|
i.preventDefault(), M(null), H?.isDragging && H.endDrag();
|
|
1271
1280
|
},
|
|
1272
1281
|
[H]
|
|
1273
|
-
),
|
|
1274
|
-
(i,
|
|
1275
|
-
if (!
|
|
1276
|
-
const
|
|
1277
|
-
return
|
|
1282
|
+
), I = $(
|
|
1283
|
+
(i, d) => {
|
|
1284
|
+
if (!C || C.resourceId !== i) return !1;
|
|
1285
|
+
const x = Math.min(C.startCol, C.endCol), b = Math.max(C.startCol, C.endCol);
|
|
1286
|
+
return d >= x && d <= b;
|
|
1278
1287
|
},
|
|
1279
|
-
[
|
|
1280
|
-
),
|
|
1281
|
-
(i,
|
|
1288
|
+
[C]
|
|
1289
|
+
), K = $(
|
|
1290
|
+
(i, d) => !Y || Y.resourceId !== i ? !1 : d >= Y.colIndex && d < Y.colIndex + Y.spanCols,
|
|
1282
1291
|
[Y]
|
|
1283
|
-
),
|
|
1284
|
-
(i,
|
|
1285
|
-
|
|
1292
|
+
), le = $(
|
|
1293
|
+
(i, d, x) => {
|
|
1294
|
+
x.button !== 0 && x.pointerType === "mouse" || (c || h) && (x.preventDefault(), R.current = !0, O({ resourceId: i, startCol: d, endCol: d, isSelecting: !0 }));
|
|
1286
1295
|
},
|
|
1287
1296
|
[c, h]
|
|
1288
|
-
),
|
|
1289
|
-
(i,
|
|
1290
|
-
if (R.current && !(!
|
|
1291
|
-
if (
|
|
1297
|
+
), Ie = $(
|
|
1298
|
+
(i, d, x) => {
|
|
1299
|
+
if (R.current && !(!C || C.resourceId !== i)) {
|
|
1300
|
+
if (x.buttons === 0) {
|
|
1292
1301
|
R.current = !1;
|
|
1293
1302
|
return;
|
|
1294
1303
|
}
|
|
1295
|
-
|
|
1304
|
+
O((b) => b ? { ...b, endCol: d } : null);
|
|
1296
1305
|
}
|
|
1297
1306
|
},
|
|
1298
|
-
[
|
|
1299
|
-
),
|
|
1300
|
-
if (!R.current || !
|
|
1307
|
+
[C]
|
|
1308
|
+
), Fe = $(() => {
|
|
1309
|
+
if (!R.current || !C) return;
|
|
1301
1310
|
R.current = !1;
|
|
1302
|
-
const i = Math.min(
|
|
1303
|
-
|
|
1311
|
+
const i = Math.min(C.startCol, C.endCol), d = Math.max(C.startCol, C.endCol), x = oe(i), b = oe(d), N = new Date(x.date), L = new Date(b.date);
|
|
1312
|
+
b.hour !== void 0 && L.setHours(b.hour + 1, 0, 0, 0);
|
|
1304
1313
|
const j = {
|
|
1305
|
-
startDate:
|
|
1314
|
+
startDate: N,
|
|
1306
1315
|
endDate: L,
|
|
1307
|
-
resourceId:
|
|
1316
|
+
resourceId: C.resourceId
|
|
1308
1317
|
};
|
|
1309
|
-
i ===
|
|
1310
|
-
}, [
|
|
1311
|
-
return
|
|
1318
|
+
i === d && h && h(x.date, x.hour, C.resourceId), c?.(j), O((Z) => Z ? { ...Z, isSelecting: !1 } : null), setTimeout(() => O(null), 150);
|
|
1319
|
+
}, [C, oe, S, h, c]);
|
|
1320
|
+
return ue(() => {
|
|
1312
1321
|
const i = () => {
|
|
1313
|
-
R.current &&
|
|
1322
|
+
R.current && Fe();
|
|
1314
1323
|
};
|
|
1315
1324
|
return window.addEventListener("pointerup", i), window.addEventListener("pointercancel", i), () => {
|
|
1316
1325
|
window.removeEventListener("pointerup", i), window.removeEventListener("pointercancel", i);
|
|
1317
1326
|
};
|
|
1318
|
-
}, [
|
|
1327
|
+
}, [Fe]), ue(() => {
|
|
1319
1328
|
H?.isDragging || M(null);
|
|
1320
1329
|
}, [H?.isDragging]), /* @__PURE__ */ e("div", { className: g("flex h-full flex-col", P), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: F, children: /* @__PURE__ */ r("div", { className: "relative", style: { minWidth: re }, children: [
|
|
1321
1330
|
// Hour mode: Day headers + Hour sub-headers - sticky wrapper with flex child (sticky + flex breaks sticky)
|
|
@@ -1326,38 +1335,38 @@ function Te({
|
|
|
1326
1335
|
"div",
|
|
1327
1336
|
{
|
|
1328
1337
|
className: "flex shrink-0 items-center justify-center border-r bg-background px-2 sticky left-0 z-10",
|
|
1329
|
-
style: { width:
|
|
1338
|
+
style: { width: Le },
|
|
1330
1339
|
children: /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
|
|
1331
1340
|
}
|
|
1332
1341
|
),
|
|
1333
1342
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 flex-col", children: [
|
|
1334
|
-
/* @__PURE__ */ e("div", { className: "flex border-b", children: m.map((i,
|
|
1335
|
-
const
|
|
1343
|
+
/* @__PURE__ */ e("div", { className: "flex border-b", children: m.map((i, d) => {
|
|
1344
|
+
const x = ce(i), b = d * G, N = _.slice(b, b + G).reduce((L, j) => L + j, 0);
|
|
1336
1345
|
return /* @__PURE__ */ e(
|
|
1337
1346
|
"div",
|
|
1338
1347
|
{
|
|
1339
1348
|
className: g(
|
|
1340
1349
|
"flex shrink-0 items-center justify-center border-r py-1.5 font-medium",
|
|
1341
|
-
|
|
1350
|
+
x ? "bg-primary/10 text-primary" : "bg-muted/30"
|
|
1342
1351
|
),
|
|
1343
|
-
style: { width:
|
|
1344
|
-
children: /* @__PURE__ */ e("span", { className: "text-xs", children:
|
|
1352
|
+
style: { width: N },
|
|
1353
|
+
children: /* @__PURE__ */ e("span", { className: "text-xs", children: dn(i) })
|
|
1345
1354
|
},
|
|
1346
1355
|
`day-${i.toISOString()}`
|
|
1347
1356
|
);
|
|
1348
1357
|
}) }),
|
|
1349
|
-
/* @__PURE__ */ e("div", { className: "flex", children: p.map((i,
|
|
1350
|
-
const
|
|
1358
|
+
/* @__PURE__ */ e("div", { className: "flex", children: p.map((i, d) => {
|
|
1359
|
+
const x = i.hour === z, b = ce(i.date), N = _[d] ?? ze;
|
|
1351
1360
|
return /* @__PURE__ */ e(
|
|
1352
1361
|
"div",
|
|
1353
1362
|
{
|
|
1354
1363
|
className: g(
|
|
1355
1364
|
"flex shrink-0 items-center justify-center py-1.5 text-[10px] text-muted-foreground",
|
|
1356
|
-
|
|
1357
|
-
|
|
1365
|
+
x && d > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
|
|
1366
|
+
b && "bg-primary/5"
|
|
1358
1367
|
),
|
|
1359
|
-
style: { width:
|
|
1360
|
-
children:
|
|
1368
|
+
style: { width: N },
|
|
1369
|
+
children: Oe(i.hour)
|
|
1361
1370
|
},
|
|
1362
1371
|
`hour-${i.dayIndex}-${i.hour}`
|
|
1363
1372
|
);
|
|
@@ -1371,22 +1380,22 @@ function Te({
|
|
|
1371
1380
|
"div",
|
|
1372
1381
|
{
|
|
1373
1382
|
className: "flex shrink-0 items-center border-r bg-background px-2 py-2",
|
|
1374
|
-
style: { width:
|
|
1383
|
+
style: { width: Le },
|
|
1375
1384
|
children: /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
|
|
1376
1385
|
}
|
|
1377
1386
|
),
|
|
1378
|
-
p.map((i,
|
|
1379
|
-
const
|
|
1387
|
+
p.map((i, d) => {
|
|
1388
|
+
const x = i.hour === z, b = ce(i.date), N = _[d] ?? ze;
|
|
1380
1389
|
return /* @__PURE__ */ e(
|
|
1381
1390
|
"div",
|
|
1382
1391
|
{
|
|
1383
1392
|
className: g(
|
|
1384
1393
|
"flex shrink-0 items-center justify-center py-1.5 text-[10px] text-muted-foreground",
|
|
1385
|
-
|
|
1386
|
-
|
|
1394
|
+
x && d > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
|
|
1395
|
+
b && "bg-primary/5"
|
|
1387
1396
|
),
|
|
1388
|
-
style: { width:
|
|
1389
|
-
children:
|
|
1397
|
+
style: { width: N },
|
|
1398
|
+
children: Oe(i.hour)
|
|
1390
1399
|
},
|
|
1391
1400
|
`hour-${i.dayIndex}-${i.hour}`
|
|
1392
1401
|
);
|
|
@@ -1394,7 +1403,7 @@ function Te({
|
|
|
1394
1403
|
] })
|
|
1395
1404
|
) }),
|
|
1396
1405
|
T.map((i) => {
|
|
1397
|
-
const
|
|
1406
|
+
const d = J(i.maxStack);
|
|
1398
1407
|
return /* @__PURE__ */ r(
|
|
1399
1408
|
"div",
|
|
1400
1409
|
{
|
|
@@ -1402,13 +1411,13 @@ function Te({
|
|
|
1402
1411
|
"relative flex border-b",
|
|
1403
1412
|
A?.resourceRow
|
|
1404
1413
|
),
|
|
1405
|
-
style: { height:
|
|
1414
|
+
style: { height: d },
|
|
1406
1415
|
children: [
|
|
1407
1416
|
/* @__PURE__ */ e(
|
|
1408
1417
|
"div",
|
|
1409
1418
|
{
|
|
1410
1419
|
className: "sticky left-0 z-10",
|
|
1411
|
-
style: { width:
|
|
1420
|
+
style: { width: Le },
|
|
1412
1421
|
children: /* @__PURE__ */ r(
|
|
1413
1422
|
"div",
|
|
1414
1423
|
{
|
|
@@ -1418,12 +1427,12 @@ function Te({
|
|
|
1418
1427
|
),
|
|
1419
1428
|
children: [
|
|
1420
1429
|
/* @__PURE__ */ e(
|
|
1421
|
-
|
|
1430
|
+
un,
|
|
1422
1431
|
{
|
|
1423
1432
|
className: "size-7",
|
|
1424
1433
|
src: i.user.avatar,
|
|
1425
1434
|
alt: i.user.name,
|
|
1426
|
-
fallback:
|
|
1435
|
+
fallback: an(i.user.name)
|
|
1427
1436
|
}
|
|
1428
1437
|
),
|
|
1429
1438
|
/* @__PURE__ */ e("span", { className: "truncate text-xs sm:text-sm font-medium", children: i.user.name })
|
|
@@ -1436,31 +1445,31 @@ function Te({
|
|
|
1436
1445
|
"div",
|
|
1437
1446
|
{
|
|
1438
1447
|
className: "ic-timeline-grid relative flex",
|
|
1439
|
-
onDragOver: (
|
|
1440
|
-
onDragLeave:
|
|
1441
|
-
onDrop: (
|
|
1448
|
+
onDragOver: (x) => ke(x, i.user.id),
|
|
1449
|
+
onDragLeave: de,
|
|
1450
|
+
onDrop: (x) => u(x, i.user.id),
|
|
1442
1451
|
children: [
|
|
1443
1452
|
// Hour mode cells — interactive buttons for slot selection
|
|
1444
|
-
p.map((
|
|
1445
|
-
const
|
|
1453
|
+
p.map((x, b) => {
|
|
1454
|
+
const N = x.hour === z && b > 0, L = _[b] ?? ze, j = I(i.user.id, b), Z = K(i.user.id, b), ne = !!(c || h);
|
|
1446
1455
|
return /* @__PURE__ */ e(
|
|
1447
1456
|
"div",
|
|
1448
1457
|
{
|
|
1449
1458
|
role: ne ? "button" : void 0,
|
|
1450
1459
|
tabIndex: ne ? 0 : void 0,
|
|
1451
|
-
"aria-label": ne ? `Select ${
|
|
1452
|
-
onPointerDown: (
|
|
1453
|
-
onPointerEnter: (
|
|
1454
|
-
onPointerUp:
|
|
1455
|
-
onKeyDown: (
|
|
1456
|
-
if (ne && (
|
|
1457
|
-
|
|
1458
|
-
const
|
|
1459
|
-
h?.(
|
|
1460
|
-
startDate:
|
|
1460
|
+
"aria-label": ne ? `Select ${Oe(x.hour)} on ${x.date.toLocaleDateString()} for ${i.user.name}` : void 0,
|
|
1461
|
+
onPointerDown: (X) => le(i.user.id, b, X),
|
|
1462
|
+
onPointerEnter: (X) => Ie(i.user.id, b, X),
|
|
1463
|
+
onPointerUp: Fe,
|
|
1464
|
+
onKeyDown: (X) => {
|
|
1465
|
+
if (ne && (X.key === "Enter" || X.key === " ")) {
|
|
1466
|
+
X.preventDefault();
|
|
1467
|
+
const se = oe(b);
|
|
1468
|
+
h?.(se.date, se.hour, i.user.id), c?.({
|
|
1469
|
+
startDate: se.date,
|
|
1461
1470
|
endDate: (() => {
|
|
1462
|
-
const
|
|
1463
|
-
return
|
|
1471
|
+
const Ne = new Date(se.date);
|
|
1472
|
+
return se.hour !== void 0 && Ne.setHours(se.hour + 1, 0, 0, 0), Ne;
|
|
1464
1473
|
})(),
|
|
1465
1474
|
resourceId: i.user.id
|
|
1466
1475
|
});
|
|
@@ -1469,10 +1478,10 @@ function Te({
|
|
|
1469
1478
|
className: g(
|
|
1470
1479
|
"shrink-0 select-none touch-none transition-colors",
|
|
1471
1480
|
ne && "cursor-pointer",
|
|
1472
|
-
|
|
1473
|
-
|
|
1481
|
+
N ? "border-l-2 border-l-border" : "border-r border-r-border/50",
|
|
1482
|
+
ce(x.date) && "bg-primary/5",
|
|
1474
1483
|
// Hover — subtle feedback (only when not selecting or dragging)
|
|
1475
|
-
ne && !
|
|
1484
|
+
ne && !C?.isSelecting && !H?.isDragging && "hover:bg-blue-50/60",
|
|
1476
1485
|
// Slot selection highlight
|
|
1477
1486
|
j && "bg-blue-100/70",
|
|
1478
1487
|
// Drop target highlight
|
|
@@ -1480,38 +1489,38 @@ function Te({
|
|
|
1480
1489
|
),
|
|
1481
1490
|
style: { width: L }
|
|
1482
1491
|
},
|
|
1483
|
-
`cell-${
|
|
1492
|
+
`cell-${x.dayIndex}-${x.hour}`
|
|
1484
1493
|
);
|
|
1485
1494
|
}),
|
|
1486
|
-
i.events.map((
|
|
1487
|
-
const
|
|
1495
|
+
i.events.map((x) => {
|
|
1496
|
+
const b = ve(x.startCol), N = ve(x.startCol + x.spanCols), L = b + 2, j = N - b - 4, Z = Xe + x.stackIndex * ($e + qe), ne = t === 1 ? "timeline-day" : t === 3 ? "timeline-3day" : "timeline-week", X = B?.eventCard;
|
|
1488
1497
|
return /* @__PURE__ */ e(
|
|
1489
1498
|
"div",
|
|
1490
1499
|
{
|
|
1491
1500
|
className: "absolute",
|
|
1492
1501
|
style: {
|
|
1493
|
-
left:
|
|
1502
|
+
left: L,
|
|
1494
1503
|
width: Math.max(j, 0),
|
|
1495
1504
|
// No forced minimum - columns are guaranteed wide enough
|
|
1496
1505
|
top: Z,
|
|
1497
|
-
height:
|
|
1506
|
+
height: $e
|
|
1498
1507
|
},
|
|
1499
|
-
children:
|
|
1500
|
-
|
|
1508
|
+
children: X ? /* @__PURE__ */ e(
|
|
1509
|
+
X,
|
|
1501
1510
|
{
|
|
1502
|
-
event:
|
|
1511
|
+
event: x.event,
|
|
1503
1512
|
view: ne,
|
|
1504
1513
|
isCompact: !0,
|
|
1505
|
-
onClick: () =>
|
|
1514
|
+
onClick: () => v?.(x.event)
|
|
1506
1515
|
}
|
|
1507
1516
|
) : /* @__PURE__ */ e(
|
|
1508
|
-
|
|
1517
|
+
Dt,
|
|
1509
1518
|
{
|
|
1510
|
-
event:
|
|
1519
|
+
event: x.event,
|
|
1511
1520
|
variant: "compact",
|
|
1512
1521
|
enableDrag: W,
|
|
1513
|
-
onClick:
|
|
1514
|
-
renderPopover:
|
|
1522
|
+
onClick: v,
|
|
1523
|
+
renderPopover: k,
|
|
1515
1524
|
className: g(
|
|
1516
1525
|
"h-full w-full",
|
|
1517
1526
|
A?.eventCardCompact
|
|
@@ -1519,7 +1528,7 @@ function Te({
|
|
|
1519
1528
|
}
|
|
1520
1529
|
)
|
|
1521
1530
|
},
|
|
1522
|
-
|
|
1531
|
+
x.event.id
|
|
1523
1532
|
);
|
|
1524
1533
|
})
|
|
1525
1534
|
]
|
|
@@ -1533,7 +1542,7 @@ function Te({
|
|
|
1533
1542
|
T.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
|
|
1534
1543
|
] }) }) });
|
|
1535
1544
|
}
|
|
1536
|
-
const
|
|
1545
|
+
const mn = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], fn = [
|
|
1537
1546
|
"January",
|
|
1538
1547
|
"February",
|
|
1539
1548
|
"March",
|
|
@@ -1551,8 +1560,8 @@ function tt(t) {
|
|
|
1551
1560
|
const n = t.hexColor;
|
|
1552
1561
|
return n ? { backgroundColor: n } : {};
|
|
1553
1562
|
}
|
|
1554
|
-
function
|
|
1555
|
-
const l =
|
|
1563
|
+
function gn({ day: t, date: n, events: s, isCurrentMonth: o, onDayClick: a }) {
|
|
1564
|
+
const l = ce(n), v = 3, h = s.length;
|
|
1556
1565
|
return /* @__PURE__ */ r(
|
|
1557
1566
|
"button",
|
|
1558
1567
|
{
|
|
@@ -1575,15 +1584,15 @@ function fn({ day: t, date: n, events: s, isCurrentMonth: o, onDayClick: a }) {
|
|
|
1575
1584
|
children: t
|
|
1576
1585
|
}
|
|
1577
1586
|
),
|
|
1578
|
-
h > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 flex items-center gap-0.5", children: h <=
|
|
1587
|
+
h > 0 && /* @__PURE__ */ e("div", { className: "mt-0.5 flex items-center gap-0.5", children: h <= v ? s.map((c) => /* @__PURE__ */ e(
|
|
1579
1588
|
"div",
|
|
1580
1589
|
{
|
|
1581
1590
|
className: "size-1 sm:size-1.5 rounded-full bg-primary",
|
|
1582
1591
|
style: tt(c)
|
|
1583
1592
|
},
|
|
1584
1593
|
c.id
|
|
1585
|
-
)) : /* @__PURE__ */ r(
|
|
1586
|
-
s.slice(0,
|
|
1594
|
+
)) : /* @__PURE__ */ r(ye, { children: [
|
|
1595
|
+
s.slice(0, v).map((c) => /* @__PURE__ */ e(
|
|
1587
1596
|
"div",
|
|
1588
1597
|
{
|
|
1589
1598
|
className: "size-1 sm:size-1.5 rounded-full bg-primary",
|
|
@@ -1593,20 +1602,20 @@ function fn({ day: t, date: n, events: s, isCurrentMonth: o, onDayClick: a }) {
|
|
|
1593
1602
|
)),
|
|
1594
1603
|
/* @__PURE__ */ r("span", { className: "text-[6px] sm:text-[7px] font-medium text-muted-foreground", children: [
|
|
1595
1604
|
"+",
|
|
1596
|
-
h -
|
|
1605
|
+
h - v
|
|
1597
1606
|
] })
|
|
1598
1607
|
] }) })
|
|
1599
1608
|
]
|
|
1600
1609
|
}
|
|
1601
1610
|
);
|
|
1602
1611
|
}
|
|
1603
|
-
function
|
|
1612
|
+
function pn({
|
|
1604
1613
|
date: t,
|
|
1605
1614
|
events: n,
|
|
1606
1615
|
onMonthClick: s,
|
|
1607
1616
|
onDayClick: o
|
|
1608
1617
|
}) {
|
|
1609
|
-
const a = ee(() =>
|
|
1618
|
+
const a = ee(() => Wt(t, 0), [t]);
|
|
1610
1619
|
return /* @__PURE__ */ r("div", { className: "flex flex-col", children: [
|
|
1611
1620
|
/* @__PURE__ */ e(
|
|
1612
1621
|
"button",
|
|
@@ -1618,18 +1627,18 @@ function gn({
|
|
|
1618
1627
|
"hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1619
1628
|
"transition-colors"
|
|
1620
1629
|
),
|
|
1621
|
-
children:
|
|
1630
|
+
children: fn[t.getMonth()]
|
|
1622
1631
|
}
|
|
1623
1632
|
),
|
|
1624
1633
|
/* @__PURE__ */ r("div", { className: "flex-1 space-y-1.5 sm:space-y-2 rounded-b-lg border border-t-0 p-2 sm:p-3", children: [
|
|
1625
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children:
|
|
1634
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children: mn.map((l, v) => /* @__PURE__ */ r("div", { className: "text-[9px] sm:text-xs font-medium text-muted-foreground", children: [
|
|
1626
1635
|
/* @__PURE__ */ e("span", { className: "sm:hidden", children: l[0] }),
|
|
1627
1636
|
/* @__PURE__ */ e("span", { className: "hidden sm:inline", children: l })
|
|
1628
|
-
] },
|
|
1629
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: a.map((l,
|
|
1630
|
-
const h =
|
|
1637
|
+
] }, v)) }),
|
|
1638
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: a.map((l, v) => {
|
|
1639
|
+
const h = Ft(n, l.date);
|
|
1631
1640
|
return /* @__PURE__ */ e(
|
|
1632
|
-
|
|
1641
|
+
gn,
|
|
1633
1642
|
{
|
|
1634
1643
|
day: l.date.getDate(),
|
|
1635
1644
|
date: l.date,
|
|
@@ -1637,26 +1646,26 @@ function gn({
|
|
|
1637
1646
|
isCurrentMonth: l.isCurrentMonth,
|
|
1638
1647
|
onDayClick: o
|
|
1639
1648
|
},
|
|
1640
|
-
`${
|
|
1649
|
+
`${v + 1}-${l.date.toISOString()}`
|
|
1641
1650
|
);
|
|
1642
1651
|
}) })
|
|
1643
1652
|
] })
|
|
1644
1653
|
] });
|
|
1645
1654
|
}
|
|
1646
|
-
function
|
|
1655
|
+
function xn({
|
|
1647
1656
|
events: t,
|
|
1648
1657
|
year: n,
|
|
1649
1658
|
onMonthClick: s,
|
|
1650
1659
|
onDayClick: o,
|
|
1651
1660
|
className: a,
|
|
1652
1661
|
slots: l,
|
|
1653
|
-
classNames:
|
|
1662
|
+
classNames: v
|
|
1654
1663
|
}) {
|
|
1655
|
-
const h = ee(() =>
|
|
1664
|
+
const h = ee(() => Pt(n), [n]);
|
|
1656
1665
|
return /* @__PURE__ */ r("div", { className: g("flex flex-col h-full", a), children: [
|
|
1657
1666
|
/* @__PURE__ */ e("div", { className: "flex items-center justify-center border-b px-4 py-3", children: /* @__PURE__ */ e("h2", { className: "text-lg font-semibold", children: n }) }),
|
|
1658
1667
|
/* @__PURE__ */ e("div", { className: "flex-1 overflow-auto p-4", children: /* @__PURE__ */ e("div", { className: "grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4", children: h.map((c) => /* @__PURE__ */ e(
|
|
1659
|
-
|
|
1668
|
+
pn,
|
|
1660
1669
|
{
|
|
1661
1670
|
date: c,
|
|
1662
1671
|
events: t,
|
|
@@ -1667,8 +1676,8 @@ function pn({
|
|
|
1667
1676
|
)) }) })
|
|
1668
1677
|
] });
|
|
1669
1678
|
}
|
|
1670
|
-
const je = 200,
|
|
1671
|
-
function
|
|
1679
|
+
const je = 200, vn = 60, wn = 300, bn = 7, nt = 2, _e = 40, yn = 18;
|
|
1680
|
+
function kn() {
|
|
1672
1681
|
return /* @__PURE__ */ e(
|
|
1673
1682
|
"svg",
|
|
1674
1683
|
{
|
|
@@ -1685,7 +1694,7 @@ function yn() {
|
|
|
1685
1694
|
}
|
|
1686
1695
|
);
|
|
1687
1696
|
}
|
|
1688
|
-
function
|
|
1697
|
+
function Nn() {
|
|
1689
1698
|
return /* @__PURE__ */ e(
|
|
1690
1699
|
"svg",
|
|
1691
1700
|
{
|
|
@@ -1702,7 +1711,7 @@ function kn() {
|
|
|
1702
1711
|
}
|
|
1703
1712
|
);
|
|
1704
1713
|
}
|
|
1705
|
-
function
|
|
1714
|
+
function Cn() {
|
|
1706
1715
|
return /* @__PURE__ */ e(
|
|
1707
1716
|
"svg",
|
|
1708
1717
|
{
|
|
@@ -1719,7 +1728,7 @@ function Nn() {
|
|
|
1719
1728
|
}
|
|
1720
1729
|
);
|
|
1721
1730
|
}
|
|
1722
|
-
function
|
|
1731
|
+
function Dn() {
|
|
1723
1732
|
return /* @__PURE__ */ e(
|
|
1724
1733
|
"svg",
|
|
1725
1734
|
{
|
|
@@ -1736,17 +1745,17 @@ function Cn() {
|
|
|
1736
1745
|
}
|
|
1737
1746
|
);
|
|
1738
1747
|
}
|
|
1739
|
-
function
|
|
1748
|
+
function Mn({
|
|
1740
1749
|
containerRef: t,
|
|
1741
1750
|
currentDate: n,
|
|
1742
1751
|
className: s
|
|
1743
1752
|
}) {
|
|
1744
|
-
const [o, a] =
|
|
1753
|
+
const [o, a] = ie({
|
|
1745
1754
|
canUp: !1,
|
|
1746
1755
|
canDown: !1,
|
|
1747
1756
|
canLeft: !1,
|
|
1748
1757
|
canRight: !1
|
|
1749
|
-
}), [l,
|
|
1758
|
+
}), [l, v] = ie({ x: 0, y: 0 }), [h, c] = ie(!1), w = o.canUp || o.canDown || o.canLeft || o.canRight, P = ae(null), y = ae(null), k = ae(null), B = ae(!1), A = ae({ x: 0, y: 0 }), W = ae({ x: 0, y: 0 }), F = ae(0), H = ae(null), C = $(() => {
|
|
1750
1759
|
const f = t.current;
|
|
1751
1760
|
if (!f) return;
|
|
1752
1761
|
const E = 4;
|
|
@@ -1757,30 +1766,30 @@ function Dn({
|
|
|
1757
1766
|
canRight: f.scrollLeft + f.clientWidth < f.scrollWidth - E
|
|
1758
1767
|
});
|
|
1759
1768
|
}, [t]);
|
|
1760
|
-
|
|
1769
|
+
ue(() => {
|
|
1761
1770
|
const f = t.current;
|
|
1762
1771
|
if (!f) return;
|
|
1763
|
-
|
|
1764
|
-
const E = new ResizeObserver(
|
|
1772
|
+
C(), f.addEventListener("scroll", C, { passive: !0 });
|
|
1773
|
+
const E = new ResizeObserver(C);
|
|
1765
1774
|
E.observe(f);
|
|
1766
|
-
const D = new MutationObserver(
|
|
1775
|
+
const D = new MutationObserver(C);
|
|
1767
1776
|
return D.observe(f, { childList: !0, subtree: !0 }), () => {
|
|
1768
|
-
f.removeEventListener("scroll",
|
|
1777
|
+
f.removeEventListener("scroll", C), E.disconnect(), D.disconnect();
|
|
1769
1778
|
};
|
|
1770
|
-
}, [t,
|
|
1771
|
-
const
|
|
1779
|
+
}, [t, C]);
|
|
1780
|
+
const O = $(
|
|
1772
1781
|
(f, E) => {
|
|
1773
1782
|
t.current?.scrollBy({ left: f, top: E, behavior: "smooth" });
|
|
1774
1783
|
},
|
|
1775
1784
|
[t]
|
|
1776
|
-
), R =
|
|
1777
|
-
P.current && (clearTimeout(P.current), P.current = null),
|
|
1778
|
-
}, []), z =
|
|
1785
|
+
), R = $(() => O(0, -je), [O]), Y = $(() => O(0, je), [O]), M = $(() => O(-je, 0), [O]), V = $(() => O(je, 0), [O]), S = $(() => {
|
|
1786
|
+
P.current && (clearTimeout(P.current), P.current = null), y.current && (clearInterval(y.current), y.current = null);
|
|
1787
|
+
}, []), z = $((f) => {
|
|
1779
1788
|
f(), P.current = setTimeout(() => {
|
|
1780
|
-
|
|
1781
|
-
},
|
|
1789
|
+
y.current = setInterval(f, vn);
|
|
1790
|
+
}, wn);
|
|
1782
1791
|
}, []);
|
|
1783
|
-
|
|
1792
|
+
ue(() => S, [S]), ue(() => {
|
|
1784
1793
|
const f = t.current;
|
|
1785
1794
|
if (!f) return;
|
|
1786
1795
|
const E = (D) => {
|
|
@@ -1803,51 +1812,51 @@ function Dn({
|
|
|
1803
1812
|
}
|
|
1804
1813
|
};
|
|
1805
1814
|
return f.addEventListener("keydown", E), () => f.removeEventListener("keydown", E);
|
|
1806
|
-
}, [t, R, Y, M, V]),
|
|
1815
|
+
}, [t, R, Y, M, V]), ue(() => {
|
|
1807
1816
|
if (!w) return;
|
|
1808
1817
|
const f = H.current;
|
|
1809
1818
|
if (!f) return;
|
|
1810
1819
|
let E = 0;
|
|
1811
1820
|
const D = () => {
|
|
1812
|
-
const
|
|
1813
|
-
if (!
|
|
1814
|
-
const re =
|
|
1815
|
-
if (re.height <=
|
|
1821
|
+
const J = f.offsetParent;
|
|
1822
|
+
if (!J) return;
|
|
1823
|
+
const re = J.getBoundingClientRect(), q = window.innerHeight;
|
|
1824
|
+
if (re.height <= q) {
|
|
1816
1825
|
f.style.removeProperty("top"), f.style.removeProperty("bottom");
|
|
1817
1826
|
return;
|
|
1818
1827
|
}
|
|
1819
|
-
const
|
|
1828
|
+
const we = Math.min(re.bottom, q) - re.top, oe = f.offsetHeight, ke = we - oe - 12, de = 12, u = J.clientHeight - oe - 12, I = Math.max(de, Math.min(ke, u));
|
|
1820
1829
|
f.style.top = `${I}px`, f.style.bottom = "auto";
|
|
1821
1830
|
}, T = () => {
|
|
1822
1831
|
cancelAnimationFrame(E), E = requestAnimationFrame(D);
|
|
1823
1832
|
}, te = [window];
|
|
1824
|
-
let
|
|
1825
|
-
for (;
|
|
1826
|
-
const
|
|
1827
|
-
/(auto|scroll)/.test(
|
|
1833
|
+
let _ = f.parentElement;
|
|
1834
|
+
for (; _; ) {
|
|
1835
|
+
const J = getComputedStyle(_);
|
|
1836
|
+
/(auto|scroll)/.test(J.overflow + J.overflowY) && te.push(_), _ = _.parentElement;
|
|
1828
1837
|
}
|
|
1829
|
-
for (const
|
|
1830
|
-
|
|
1838
|
+
for (const J of te)
|
|
1839
|
+
J.addEventListener("scroll", T, { passive: !0 });
|
|
1831
1840
|
return window.addEventListener("resize", T, { passive: !0 }), D(), () => {
|
|
1832
1841
|
cancelAnimationFrame(E);
|
|
1833
|
-
for (const
|
|
1834
|
-
|
|
1842
|
+
for (const J of te)
|
|
1843
|
+
J.removeEventListener("scroll", T);
|
|
1835
1844
|
window.removeEventListener("resize", T);
|
|
1836
1845
|
};
|
|
1837
1846
|
}, [w]);
|
|
1838
|
-
const U =
|
|
1839
|
-
B.current = !1, c(!1),
|
|
1840
|
-
}, []), G =
|
|
1847
|
+
const U = $(() => {
|
|
1848
|
+
B.current = !1, c(!1), v({ x: 0, y: 0 }), W.current = { x: 0, y: 0 }, F.current && cancelAnimationFrame(F.current);
|
|
1849
|
+
}, []), G = $(
|
|
1841
1850
|
(f) => {
|
|
1842
1851
|
f.preventDefault(), B.current = !0, c(!0), A.current = { x: f.clientX, y: f.clientY }, W.current = { x: 0, y: 0 }, f.target.setPointerCapture(f.pointerId);
|
|
1843
1852
|
const E = () => {
|
|
1844
1853
|
if (!B.current) return;
|
|
1845
1854
|
const D = t.current;
|
|
1846
1855
|
if (D) {
|
|
1847
|
-
const { x: T, y: te } = W.current,
|
|
1848
|
-
if (
|
|
1849
|
-
const re = Math.min(
|
|
1850
|
-
D.scrollLeft += T /
|
|
1856
|
+
const { x: T, y: te } = W.current, _ = Math.sqrt(T * T + te * te);
|
|
1857
|
+
if (_ > nt) {
|
|
1858
|
+
const re = Math.min(_ / _e, 1) * yn;
|
|
1859
|
+
D.scrollLeft += T / _ * re, D.scrollTop += te / _ * re;
|
|
1851
1860
|
}
|
|
1852
1861
|
}
|
|
1853
1862
|
F.current = requestAnimationFrame(E);
|
|
@@ -1855,21 +1864,21 @@ function Dn({
|
|
|
1855
1864
|
F.current = requestAnimationFrame(E);
|
|
1856
1865
|
},
|
|
1857
1866
|
[t]
|
|
1858
|
-
),
|
|
1867
|
+
), Q = $((f) => {
|
|
1859
1868
|
if (!B.current) return;
|
|
1860
1869
|
const E = f.clientX - A.current.x, D = f.clientY - A.current.y;
|
|
1861
1870
|
W.current = { x: E, y: D };
|
|
1862
1871
|
const T = Math.sqrt(E * E + D * D);
|
|
1863
1872
|
if (T < nt)
|
|
1864
|
-
|
|
1873
|
+
v({ x: 0, y: 0 });
|
|
1865
1874
|
else {
|
|
1866
|
-
const
|
|
1867
|
-
|
|
1868
|
-
x: E / T *
|
|
1869
|
-
y: D / T *
|
|
1875
|
+
const _ = Math.min(T, _e) / _e * bn;
|
|
1876
|
+
v({
|
|
1877
|
+
x: E / T * _,
|
|
1878
|
+
y: D / T * _
|
|
1870
1879
|
});
|
|
1871
1880
|
}
|
|
1872
|
-
}, []), m =
|
|
1881
|
+
}, []), m = $(
|
|
1873
1882
|
(f) => {
|
|
1874
1883
|
switch (f.key) {
|
|
1875
1884
|
case "ArrowUp":
|
|
@@ -1916,7 +1925,7 @@ function Dn({
|
|
|
1916
1925
|
onPointerUp: S,
|
|
1917
1926
|
onPointerLeave: S,
|
|
1918
1927
|
tabIndex: o.canUp ? 0 : -1,
|
|
1919
|
-
children: /* @__PURE__ */ e(
|
|
1928
|
+
children: /* @__PURE__ */ e(kn, {})
|
|
1920
1929
|
}
|
|
1921
1930
|
),
|
|
1922
1931
|
/* @__PURE__ */ e(
|
|
@@ -1930,18 +1939,18 @@ function Dn({
|
|
|
1930
1939
|
onPointerUp: S,
|
|
1931
1940
|
onPointerLeave: S,
|
|
1932
1941
|
tabIndex: o.canLeft ? 0 : -1,
|
|
1933
|
-
children: /* @__PURE__ */ e(
|
|
1942
|
+
children: /* @__PURE__ */ e(Cn, {})
|
|
1934
1943
|
}
|
|
1935
1944
|
),
|
|
1936
1945
|
/* @__PURE__ */ e(
|
|
1937
1946
|
"button",
|
|
1938
1947
|
{
|
|
1939
|
-
ref:
|
|
1948
|
+
ref: k,
|
|
1940
1949
|
type: "button",
|
|
1941
1950
|
className: `inno-scroll-nav-joystick ${h ? "inno-scroll-nav-joystick-active" : ""}`,
|
|
1942
1951
|
"aria-label": "Drag to scroll freely",
|
|
1943
1952
|
onPointerDown: G,
|
|
1944
|
-
onPointerMove:
|
|
1953
|
+
onPointerMove: Q,
|
|
1945
1954
|
onPointerUp: U,
|
|
1946
1955
|
onPointerCancel: U,
|
|
1947
1956
|
tabIndex: 0,
|
|
@@ -1967,7 +1976,7 @@ function Dn({
|
|
|
1967
1976
|
onPointerUp: S,
|
|
1968
1977
|
onPointerLeave: S,
|
|
1969
1978
|
tabIndex: o.canRight ? 0 : -1,
|
|
1970
|
-
children: /* @__PURE__ */ e(
|
|
1979
|
+
children: /* @__PURE__ */ e(Dn, {})
|
|
1971
1980
|
}
|
|
1972
1981
|
),
|
|
1973
1982
|
/* @__PURE__ */ e(
|
|
@@ -1981,7 +1990,7 @@ function Dn({
|
|
|
1981
1990
|
onPointerUp: S,
|
|
1982
1991
|
onPointerLeave: S,
|
|
1983
1992
|
tabIndex: o.canDown ? 0 : -1,
|
|
1984
|
-
children: /* @__PURE__ */ e(
|
|
1993
|
+
children: /* @__PURE__ */ e(Nn, {})
|
|
1985
1994
|
}
|
|
1986
1995
|
)
|
|
1987
1996
|
] })
|
|
@@ -1989,7 +1998,7 @@ function Dn({
|
|
|
1989
1998
|
}
|
|
1990
1999
|
);
|
|
1991
2000
|
}
|
|
1992
|
-
function
|
|
2001
|
+
function En(t) {
|
|
1993
2002
|
switch (t) {
|
|
1994
2003
|
case "day":
|
|
1995
2004
|
case "week":
|
|
@@ -1998,27 +2007,27 @@ function Mn(t) {
|
|
|
1998
2007
|
return "day";
|
|
1999
2008
|
}
|
|
2000
2009
|
}
|
|
2001
|
-
function
|
|
2010
|
+
function Ln({
|
|
2002
2011
|
onEventClick: t,
|
|
2003
2012
|
onSlotClick: n,
|
|
2004
2013
|
onSlotSelect: s,
|
|
2005
2014
|
onAddEvent: o,
|
|
2006
2015
|
alwaysShowResources: a,
|
|
2007
2016
|
className: l,
|
|
2008
|
-
showHeader:
|
|
2017
|
+
showHeader: v = !0,
|
|
2009
2018
|
minSelectionMinutes: h = 30,
|
|
2010
2019
|
showMoreMode: c,
|
|
2011
2020
|
showMoreEventsInPopover: w = !1,
|
|
2012
2021
|
isLoading: P = !1,
|
|
2013
|
-
slots:
|
|
2014
|
-
classNames:
|
|
2022
|
+
slots: y,
|
|
2023
|
+
classNames: k,
|
|
2015
2024
|
settingsContent: B,
|
|
2016
2025
|
filterContent: A,
|
|
2017
2026
|
headerActions: W,
|
|
2018
2027
|
renderPopover: F,
|
|
2019
2028
|
calendarRef: H,
|
|
2020
|
-
headerConfig:
|
|
2021
|
-
eventDetailMode:
|
|
2029
|
+
headerConfig: C,
|
|
2030
|
+
eventDetailMode: O,
|
|
2022
2031
|
renderEventDetail: R
|
|
2023
2032
|
}) {
|
|
2024
2033
|
const Y = c ?? (w ? "popover" : "expand"), {
|
|
@@ -2028,42 +2037,42 @@ function En({
|
|
|
2028
2037
|
setSelectedDate: z,
|
|
2029
2038
|
slotDuration: U,
|
|
2030
2039
|
filteredEvents: G,
|
|
2031
|
-
users:
|
|
2040
|
+
users: Q,
|
|
2032
2041
|
visibleHours: m,
|
|
2033
2042
|
workingHours: p,
|
|
2034
2043
|
badgeVariant: f,
|
|
2035
2044
|
showWorkingHoursOnly: E,
|
|
2036
2045
|
clearFocusEventId: D
|
|
2037
|
-
} =
|
|
2046
|
+
} = jt(), T = ee(() => {
|
|
2038
2047
|
if (!E || !p)
|
|
2039
2048
|
return {
|
|
2040
2049
|
startHour: m.start,
|
|
2041
2050
|
endHour: m.end
|
|
2042
2051
|
};
|
|
2043
|
-
let
|
|
2052
|
+
let u = 24, I = 0;
|
|
2044
2053
|
for (const K of Object.keys(p)) {
|
|
2045
|
-
const
|
|
2046
|
-
!
|
|
2054
|
+
const le = p[Number(K)];
|
|
2055
|
+
!le || le.enabled === !1 || (le.from < u && (u = le.from), le.to > I && (I = le.to));
|
|
2047
2056
|
}
|
|
2048
|
-
return
|
|
2057
|
+
return u >= I ? {
|
|
2049
2058
|
startHour: m.start,
|
|
2050
2059
|
endHour: m.end
|
|
2051
|
-
} : { startHour:
|
|
2052
|
-
}, [E, p, m]), te = T,
|
|
2053
|
-
|
|
2060
|
+
} : { startHour: u, endHour: I };
|
|
2061
|
+
}, [E, p, m]), te = T, _ = ae(null);
|
|
2062
|
+
yt(
|
|
2054
2063
|
H,
|
|
2055
2064
|
() => ({
|
|
2056
2065
|
scrollToToday: () => {
|
|
2057
|
-
const
|
|
2058
|
-
z(
|
|
2066
|
+
const u = /* @__PURE__ */ new Date();
|
|
2067
|
+
z(u, M), requestAnimationFrame(() => {
|
|
2059
2068
|
requestAnimationFrame(() => {
|
|
2060
|
-
const I =
|
|
2069
|
+
const I = _.current?.querySelector(
|
|
2061
2070
|
".ic-timeline-scroll-container, [class*='overflow-auto']"
|
|
2062
2071
|
);
|
|
2063
2072
|
if (!I) return;
|
|
2064
|
-
const
|
|
2065
|
-
|
|
2066
|
-
top: Math.max(0,
|
|
2073
|
+
const Ie = (u.getHours() - T.startHour) * 96;
|
|
2074
|
+
Ie > 0 && I.scrollTo({
|
|
2075
|
+
top: Math.max(0, Ie - 100),
|
|
2067
2076
|
// Offset to show some context
|
|
2068
2077
|
behavior: "smooth"
|
|
2069
2078
|
});
|
|
@@ -2071,33 +2080,33 @@ function En({
|
|
|
2071
2080
|
});
|
|
2072
2081
|
},
|
|
2073
2082
|
scrollToWorkingHours: () => {
|
|
2074
|
-
let
|
|
2083
|
+
let u = 8;
|
|
2075
2084
|
if (p)
|
|
2076
2085
|
for (const I of Object.keys(p)) {
|
|
2077
2086
|
const K = p[Number(I)];
|
|
2078
|
-
K?.enabled && K.from <
|
|
2087
|
+
K?.enabled && K.from < u && (u = Math.max(K.from - 1, 0));
|
|
2079
2088
|
}
|
|
2080
2089
|
requestAnimationFrame(() => {
|
|
2081
2090
|
requestAnimationFrame(() => {
|
|
2082
|
-
const I =
|
|
2091
|
+
const I = _.current?.querySelector(
|
|
2083
2092
|
".ic-timeline-scroll-container, [class*='overflow-auto']"
|
|
2084
2093
|
);
|
|
2085
2094
|
if (!I) return;
|
|
2086
|
-
const
|
|
2095
|
+
const le = (u - T.startHour) * 96;
|
|
2087
2096
|
I.scrollTo({
|
|
2088
|
-
top: Math.max(0,
|
|
2097
|
+
top: Math.max(0, le),
|
|
2089
2098
|
behavior: "smooth"
|
|
2090
2099
|
});
|
|
2091
2100
|
});
|
|
2092
2101
|
});
|
|
2093
2102
|
},
|
|
2094
|
-
getViewRect: () =>
|
|
2095
|
-
focusEvent: (
|
|
2103
|
+
getViewRect: () => _.current?.getBoundingClientRect() ?? null,
|
|
2104
|
+
focusEvent: (u) => {
|
|
2096
2105
|
D(), requestAnimationFrame(() => {
|
|
2097
2106
|
D();
|
|
2098
2107
|
});
|
|
2099
|
-
const I =
|
|
2100
|
-
`[data-event-id="${
|
|
2108
|
+
const I = _.current?.querySelector(
|
|
2109
|
+
`[data-event-id="${u}"]`
|
|
2101
2110
|
);
|
|
2102
2111
|
I && setTimeout(() => I.click(), 150);
|
|
2103
2112
|
}
|
|
@@ -2110,46 +2119,46 @@ function En({
|
|
|
2110
2119
|
D
|
|
2111
2120
|
]
|
|
2112
2121
|
);
|
|
2113
|
-
const
|
|
2114
|
-
(
|
|
2122
|
+
const J = ee(() => En(M), [M]), re = $(
|
|
2123
|
+
(u) => {
|
|
2115
2124
|
if (s) {
|
|
2116
|
-
s(
|
|
2125
|
+
s(u);
|
|
2117
2126
|
return;
|
|
2118
2127
|
}
|
|
2119
2128
|
if (n) {
|
|
2120
|
-
const I =
|
|
2121
|
-
n(
|
|
2129
|
+
const I = u.startDate.getHours();
|
|
2130
|
+
n(u.startDate, I);
|
|
2122
2131
|
}
|
|
2123
2132
|
},
|
|
2124
2133
|
[s, n]
|
|
2125
|
-
),
|
|
2126
|
-
(
|
|
2127
|
-
V("day"), z(
|
|
2134
|
+
), q = $(
|
|
2135
|
+
(u) => {
|
|
2136
|
+
V("day"), z(u, "day");
|
|
2128
2137
|
},
|
|
2129
2138
|
[z, V]
|
|
2130
|
-
),
|
|
2131
|
-
(
|
|
2132
|
-
V("month"), z(
|
|
2139
|
+
), ve = $(
|
|
2140
|
+
(u) => {
|
|
2141
|
+
V("month"), z(u, "month");
|
|
2133
2142
|
},
|
|
2134
2143
|
[z, V]
|
|
2135
|
-
),
|
|
2136
|
-
(
|
|
2137
|
-
t?.(
|
|
2144
|
+
), we = $(
|
|
2145
|
+
(u) => {
|
|
2146
|
+
t?.(u);
|
|
2138
2147
|
},
|
|
2139
2148
|
[t]
|
|
2140
|
-
),
|
|
2141
|
-
(
|
|
2142
|
-
n?.(
|
|
2149
|
+
), oe = $(
|
|
2150
|
+
(u, I, K) => {
|
|
2151
|
+
n?.(u, I);
|
|
2143
2152
|
},
|
|
2144
2153
|
[n]
|
|
2145
|
-
),
|
|
2146
|
-
const
|
|
2154
|
+
), ke = () => {
|
|
2155
|
+
const u = G, I = we, K = F;
|
|
2147
2156
|
switch (M) {
|
|
2148
2157
|
case "day":
|
|
2149
2158
|
return /* @__PURE__ */ e(
|
|
2150
|
-
|
|
2159
|
+
St,
|
|
2151
2160
|
{
|
|
2152
|
-
events:
|
|
2161
|
+
events: u,
|
|
2153
2162
|
date: S,
|
|
2154
2163
|
visibleHours: te,
|
|
2155
2164
|
workingHours: p,
|
|
@@ -2157,15 +2166,15 @@ function En({
|
|
|
2157
2166
|
badgeVariant: f,
|
|
2158
2167
|
onEventClick: I,
|
|
2159
2168
|
renderPopover: K,
|
|
2160
|
-
...
|
|
2161
|
-
...
|
|
2169
|
+
...y && { slots: y },
|
|
2170
|
+
...k && { classNames: k }
|
|
2162
2171
|
}
|
|
2163
2172
|
);
|
|
2164
2173
|
case "week":
|
|
2165
2174
|
return /* @__PURE__ */ e(
|
|
2166
|
-
|
|
2175
|
+
Lt,
|
|
2167
2176
|
{
|
|
2168
|
-
events:
|
|
2177
|
+
events: u,
|
|
2169
2178
|
date: S,
|
|
2170
2179
|
visibleHours: te,
|
|
2171
2180
|
workingHours: p,
|
|
@@ -2173,57 +2182,57 @@ function En({
|
|
|
2173
2182
|
badgeVariant: f,
|
|
2174
2183
|
onEventClick: I,
|
|
2175
2184
|
renderPopover: K,
|
|
2176
|
-
...
|
|
2177
|
-
...
|
|
2185
|
+
...y && { slots: y },
|
|
2186
|
+
...k && { classNames: k }
|
|
2178
2187
|
}
|
|
2179
2188
|
);
|
|
2180
2189
|
case "month":
|
|
2181
2190
|
return /* @__PURE__ */ e(
|
|
2182
2191
|
Ye,
|
|
2183
2192
|
{
|
|
2184
|
-
events:
|
|
2193
|
+
events: u,
|
|
2185
2194
|
date: S,
|
|
2186
2195
|
badgeVariant: f,
|
|
2187
2196
|
onEventClick: I,
|
|
2188
|
-
onDayClick:
|
|
2197
|
+
onDayClick: q,
|
|
2189
2198
|
renderPopover: K,
|
|
2190
2199
|
showMoreMode: Y,
|
|
2191
|
-
...
|
|
2192
|
-
...
|
|
2200
|
+
...y && { slots: y },
|
|
2201
|
+
...k && { classNames: k }
|
|
2193
2202
|
}
|
|
2194
2203
|
);
|
|
2195
2204
|
case "year":
|
|
2196
2205
|
return /* @__PURE__ */ e(
|
|
2197
|
-
|
|
2206
|
+
xn,
|
|
2198
2207
|
{
|
|
2199
|
-
events:
|
|
2208
|
+
events: u,
|
|
2200
2209
|
year: S.getFullYear(),
|
|
2201
|
-
onMonthClick:
|
|
2202
|
-
onDayClick:
|
|
2203
|
-
...
|
|
2204
|
-
...
|
|
2210
|
+
onMonthClick: ve,
|
|
2211
|
+
onDayClick: q,
|
|
2212
|
+
...y && { slots: y },
|
|
2213
|
+
...k && { classNames: k }
|
|
2205
2214
|
}
|
|
2206
2215
|
);
|
|
2207
2216
|
case "agenda":
|
|
2208
2217
|
return /* @__PURE__ */ e(
|
|
2209
|
-
|
|
2218
|
+
Et,
|
|
2210
2219
|
{
|
|
2211
|
-
events:
|
|
2220
|
+
events: u,
|
|
2212
2221
|
date: S,
|
|
2213
2222
|
onEventClick: I,
|
|
2214
2223
|
renderPopover: K,
|
|
2215
|
-
...
|
|
2216
|
-
...
|
|
2224
|
+
...y && { slots: y },
|
|
2225
|
+
...k && { classNames: k }
|
|
2217
2226
|
}
|
|
2218
2227
|
);
|
|
2219
2228
|
// Resource views — delegate to TimelineView with matching day count
|
|
2220
2229
|
case "resource-day":
|
|
2221
2230
|
return /* @__PURE__ */ e(
|
|
2222
|
-
|
|
2231
|
+
Se,
|
|
2223
2232
|
{
|
|
2224
2233
|
daysToShow: 1,
|
|
2225
|
-
events:
|
|
2226
|
-
users:
|
|
2234
|
+
events: u,
|
|
2235
|
+
users: Q,
|
|
2227
2236
|
...a && { alwaysShowResources: a },
|
|
2228
2237
|
selectedDate: S,
|
|
2229
2238
|
visibleHours: {
|
|
@@ -2232,19 +2241,19 @@ function En({
|
|
|
2232
2241
|
},
|
|
2233
2242
|
onEventClick: I,
|
|
2234
2243
|
onSlotSelect: re,
|
|
2235
|
-
onSlotClick:
|
|
2244
|
+
onSlotClick: oe,
|
|
2236
2245
|
renderPopover: K,
|
|
2237
|
-
...
|
|
2238
|
-
...
|
|
2246
|
+
...y && { slots: y },
|
|
2247
|
+
...k && { classNames: k }
|
|
2239
2248
|
}
|
|
2240
2249
|
);
|
|
2241
2250
|
case "resource-week":
|
|
2242
2251
|
return /* @__PURE__ */ e(
|
|
2243
|
-
|
|
2252
|
+
Se,
|
|
2244
2253
|
{
|
|
2245
2254
|
daysToShow: 7,
|
|
2246
|
-
events:
|
|
2247
|
-
users:
|
|
2255
|
+
events: u,
|
|
2256
|
+
users: Q,
|
|
2248
2257
|
...a && { alwaysShowResources: a },
|
|
2249
2258
|
selectedDate: S,
|
|
2250
2259
|
visibleHours: {
|
|
@@ -2253,20 +2262,20 @@ function En({
|
|
|
2253
2262
|
},
|
|
2254
2263
|
onEventClick: I,
|
|
2255
2264
|
onSlotSelect: re,
|
|
2256
|
-
onSlotClick:
|
|
2265
|
+
onSlotClick: oe,
|
|
2257
2266
|
renderPopover: K,
|
|
2258
|
-
...
|
|
2259
|
-
...
|
|
2267
|
+
...y && { slots: y },
|
|
2268
|
+
...k && { classNames: k }
|
|
2260
2269
|
}
|
|
2261
2270
|
);
|
|
2262
2271
|
// Timeline views
|
|
2263
2272
|
case "timeline-day":
|
|
2264
2273
|
return /* @__PURE__ */ e(
|
|
2265
|
-
|
|
2274
|
+
Se,
|
|
2266
2275
|
{
|
|
2267
2276
|
daysToShow: 1,
|
|
2268
|
-
events:
|
|
2269
|
-
users:
|
|
2277
|
+
events: u,
|
|
2278
|
+
users: Q,
|
|
2270
2279
|
...a && { alwaysShowResources: a },
|
|
2271
2280
|
selectedDate: S,
|
|
2272
2281
|
visibleHours: {
|
|
@@ -2275,19 +2284,19 @@ function En({
|
|
|
2275
2284
|
},
|
|
2276
2285
|
onEventClick: I,
|
|
2277
2286
|
onSlotSelect: re,
|
|
2278
|
-
onSlotClick:
|
|
2287
|
+
onSlotClick: oe,
|
|
2279
2288
|
renderPopover: K,
|
|
2280
|
-
...
|
|
2281
|
-
...
|
|
2289
|
+
...y && { slots: y },
|
|
2290
|
+
...k && { classNames: k }
|
|
2282
2291
|
}
|
|
2283
2292
|
);
|
|
2284
2293
|
case "timeline-3day":
|
|
2285
2294
|
return /* @__PURE__ */ e(
|
|
2286
|
-
|
|
2295
|
+
Se,
|
|
2287
2296
|
{
|
|
2288
2297
|
daysToShow: 3,
|
|
2289
|
-
events:
|
|
2290
|
-
users:
|
|
2298
|
+
events: u,
|
|
2299
|
+
users: Q,
|
|
2291
2300
|
...a && { alwaysShowResources: a },
|
|
2292
2301
|
selectedDate: S,
|
|
2293
2302
|
visibleHours: {
|
|
@@ -2296,19 +2305,19 @@ function En({
|
|
|
2296
2305
|
},
|
|
2297
2306
|
onEventClick: I,
|
|
2298
2307
|
onSlotSelect: re,
|
|
2299
|
-
onSlotClick:
|
|
2308
|
+
onSlotClick: oe,
|
|
2300
2309
|
renderPopover: K,
|
|
2301
|
-
...
|
|
2302
|
-
...
|
|
2310
|
+
...y && { slots: y },
|
|
2311
|
+
...k && { classNames: k }
|
|
2303
2312
|
}
|
|
2304
2313
|
);
|
|
2305
2314
|
case "timeline-week":
|
|
2306
2315
|
return /* @__PURE__ */ e(
|
|
2307
|
-
|
|
2316
|
+
Se,
|
|
2308
2317
|
{
|
|
2309
2318
|
daysToShow: 7,
|
|
2310
|
-
events:
|
|
2311
|
-
users:
|
|
2319
|
+
events: u,
|
|
2320
|
+
users: Q,
|
|
2312
2321
|
...a && { alwaysShowResources: a },
|
|
2313
2322
|
selectedDate: S,
|
|
2314
2323
|
visibleHours: {
|
|
@@ -2317,33 +2326,33 @@ function En({
|
|
|
2317
2326
|
},
|
|
2318
2327
|
onEventClick: I,
|
|
2319
2328
|
onSlotSelect: re,
|
|
2320
|
-
onSlotClick:
|
|
2329
|
+
onSlotClick: oe,
|
|
2321
2330
|
renderPopover: K,
|
|
2322
|
-
...
|
|
2323
|
-
...
|
|
2331
|
+
...y && { slots: y },
|
|
2332
|
+
...k && { classNames: k }
|
|
2324
2333
|
}
|
|
2325
2334
|
);
|
|
2326
2335
|
default:
|
|
2327
2336
|
return /* @__PURE__ */ e(
|
|
2328
2337
|
Ye,
|
|
2329
2338
|
{
|
|
2330
|
-
events:
|
|
2339
|
+
events: u,
|
|
2331
2340
|
date: S,
|
|
2332
2341
|
badgeVariant: f,
|
|
2333
2342
|
onEventClick: I,
|
|
2334
|
-
onDayClick:
|
|
2335
|
-
...
|
|
2336
|
-
...
|
|
2343
|
+
onDayClick: q,
|
|
2344
|
+
...y && { slots: y },
|
|
2345
|
+
...k && { classNames: k }
|
|
2337
2346
|
}
|
|
2338
2347
|
);
|
|
2339
2348
|
}
|
|
2340
|
-
},
|
|
2341
|
-
return
|
|
2342
|
-
|
|
2349
|
+
}, de = ae(null);
|
|
2350
|
+
return ue(() => {
|
|
2351
|
+
_.current = de.current;
|
|
2343
2352
|
}), /* @__PURE__ */ e(
|
|
2344
|
-
|
|
2353
|
+
At,
|
|
2345
2354
|
{
|
|
2346
|
-
mode:
|
|
2355
|
+
mode: J,
|
|
2347
2356
|
onSelect: re,
|
|
2348
2357
|
minDurationMinutes: h,
|
|
2349
2358
|
slotDurationMinutes: U,
|
|
@@ -2353,12 +2362,12 @@ function En({
|
|
|
2353
2362
|
{
|
|
2354
2363
|
className: g(
|
|
2355
2364
|
"inno-calendar-root flex flex-col h-full p-4",
|
|
2356
|
-
|
|
2365
|
+
k?.root,
|
|
2357
2366
|
l
|
|
2358
2367
|
),
|
|
2359
2368
|
children: [
|
|
2360
|
-
|
|
2361
|
-
|
|
2369
|
+
v && /* @__PURE__ */ e(
|
|
2370
|
+
Mt,
|
|
2362
2371
|
{
|
|
2363
2372
|
currentDate: S,
|
|
2364
2373
|
view: M,
|
|
@@ -2366,12 +2375,12 @@ function En({
|
|
|
2366
2375
|
onViewChange: V,
|
|
2367
2376
|
onNavigateToday: () => z(/* @__PURE__ */ new Date(), M),
|
|
2368
2377
|
onNavigatePrev: () => {
|
|
2369
|
-
const
|
|
2370
|
-
M === "day" || M === "timeline-day" || M === "resource-day" ?
|
|
2378
|
+
const u = new Date(S);
|
|
2379
|
+
M === "day" || M === "timeline-day" || M === "resource-day" ? u.setDate(u.getDate() - 1) : M === "timeline-3day" ? u.setDate(u.getDate() - 3) : M === "week" || M === "timeline-week" || M === "resource-week" ? u.setDate(u.getDate() - 7) : M === "month" ? u.setMonth(u.getMonth() - 1) : M === "year" ? u.setFullYear(u.getFullYear() - 1) : u.setDate(u.getDate() - 7), z(u, M);
|
|
2371
2380
|
},
|
|
2372
2381
|
onNavigateNext: () => {
|
|
2373
|
-
const
|
|
2374
|
-
M === "day" || M === "timeline-day" || M === "resource-day" ?
|
|
2382
|
+
const u = new Date(S);
|
|
2383
|
+
M === "day" || M === "timeline-day" || M === "resource-day" ? u.setDate(u.getDate() + 1) : M === "timeline-3day" ? u.setDate(u.getDate() + 3) : M === "week" || M === "timeline-week" || M === "resource-week" ? u.setDate(u.getDate() + 7) : M === "month" ? u.setMonth(u.getMonth() + 1) : M === "year" ? u.setFullYear(u.getFullYear() + 1) : u.setDate(u.getDate() + 7), z(u, M);
|
|
2375
2384
|
},
|
|
2376
2385
|
availableViews: [
|
|
2377
2386
|
"day",
|
|
@@ -2386,23 +2395,23 @@ function En({
|
|
|
2386
2395
|
actions: W,
|
|
2387
2396
|
settingsContent: B,
|
|
2388
2397
|
filterContent: A,
|
|
2389
|
-
...
|
|
2398
|
+
...C && { headerConfig: C }
|
|
2390
2399
|
}
|
|
2391
2400
|
),
|
|
2392
2401
|
/* @__PURE__ */ r("div", { className: "relative flex-1 min-h-0", children: [
|
|
2393
2402
|
/* @__PURE__ */ e(
|
|
2394
2403
|
"div",
|
|
2395
2404
|
{
|
|
2396
|
-
ref:
|
|
2405
|
+
ref: de,
|
|
2397
2406
|
className: g(
|
|
2398
2407
|
"h-full border rounded-lg bg-white overflow-x-auto",
|
|
2399
|
-
|
|
2408
|
+
k?.viewContainer
|
|
2400
2409
|
),
|
|
2401
|
-
children:
|
|
2410
|
+
children: ke()
|
|
2402
2411
|
}
|
|
2403
2412
|
),
|
|
2404
2413
|
P && /* @__PURE__ */ e("div", { className: "inno-calendar-loading-overlay", children: /* @__PURE__ */ e("div", { className: "inno-calendar-spinner" }) }),
|
|
2405
|
-
/* @__PURE__ */ e(
|
|
2414
|
+
/* @__PURE__ */ e(Mn, { containerRef: de, currentDate: S })
|
|
2406
2415
|
] })
|
|
2407
2416
|
]
|
|
2408
2417
|
}
|
|
@@ -2410,27 +2419,27 @@ function En({
|
|
|
2410
2419
|
}
|
|
2411
2420
|
);
|
|
2412
2421
|
}
|
|
2413
|
-
function
|
|
2422
|
+
function Sn({
|
|
2414
2423
|
events: t,
|
|
2415
2424
|
users: n = [],
|
|
2416
2425
|
alwaysShowResources: s,
|
|
2417
2426
|
scheduleTypes: o = [],
|
|
2418
2427
|
initialView: a,
|
|
2419
2428
|
initialDate: l,
|
|
2420
|
-
initialSelectedUserId:
|
|
2429
|
+
initialSelectedUserId: v,
|
|
2421
2430
|
initialScheduleTypeIds: h,
|
|
2422
2431
|
initialParticipantIds: c,
|
|
2423
2432
|
initialWorkingHoursView: w,
|
|
2424
2433
|
initialSearchQuery: P,
|
|
2425
|
-
preferencesConfig:
|
|
2426
|
-
onEventClick:
|
|
2434
|
+
preferencesConfig: y,
|
|
2435
|
+
onEventClick: k,
|
|
2427
2436
|
onSlotClick: B,
|
|
2428
2437
|
onSlotSelect: A,
|
|
2429
2438
|
onAddEvent: W,
|
|
2430
2439
|
onEventDrop: F,
|
|
2431
2440
|
onDateChange: H,
|
|
2432
|
-
onViewChange:
|
|
2433
|
-
className:
|
|
2441
|
+
onViewChange: C,
|
|
2442
|
+
className: O,
|
|
2434
2443
|
showHeader: R = !0,
|
|
2435
2444
|
minSelectionMinutes: Y = 30,
|
|
2436
2445
|
showMoreMode: M,
|
|
@@ -2439,7 +2448,7 @@ function Ln({
|
|
|
2439
2448
|
renderPopover: z,
|
|
2440
2449
|
slots: U,
|
|
2441
2450
|
classNames: G,
|
|
2442
|
-
settingsContent:
|
|
2451
|
+
settingsContent: Q,
|
|
2443
2452
|
filterContent: m,
|
|
2444
2453
|
headerActions: p,
|
|
2445
2454
|
focusEventId: f,
|
|
@@ -2447,33 +2456,33 @@ function Ln({
|
|
|
2447
2456
|
eventDetailMode: D,
|
|
2448
2457
|
renderEventDetail: T
|
|
2449
2458
|
}, te) {
|
|
2450
|
-
return /* @__PURE__ */ e(
|
|
2451
|
-
|
|
2459
|
+
return /* @__PURE__ */ e(It, { ...F && { onEventDrop: F }, children: /* @__PURE__ */ e(
|
|
2460
|
+
zt,
|
|
2452
2461
|
{
|
|
2453
2462
|
initialEvents: t,
|
|
2454
2463
|
initialUsers: n,
|
|
2455
2464
|
initialScheduleTypes: o,
|
|
2456
2465
|
...a && { initialView: a },
|
|
2457
2466
|
...l && { initialDate: l },
|
|
2458
|
-
...
|
|
2467
|
+
...v && { initialSelectedUserId: v },
|
|
2459
2468
|
...h && { initialScheduleTypeIds: h },
|
|
2460
2469
|
...c && { initialParticipantIds: c },
|
|
2461
2470
|
...w && { initialWorkingHoursView: w },
|
|
2462
2471
|
...P && { initialSearchQuery: P },
|
|
2463
|
-
...
|
|
2472
|
+
...y && { preferencesConfig: y },
|
|
2464
2473
|
...H && { onDateChange: H },
|
|
2465
|
-
...
|
|
2474
|
+
...C && { onViewChange: C },
|
|
2466
2475
|
...f && { initialFocusEventId: f },
|
|
2467
2476
|
children: /* @__PURE__ */ e(
|
|
2468
|
-
|
|
2477
|
+
Ln,
|
|
2469
2478
|
{
|
|
2470
|
-
...
|
|
2479
|
+
...k && { onEventClick: k },
|
|
2471
2480
|
...B && { onSlotClick: B },
|
|
2472
2481
|
...A && { onSlotSelect: A },
|
|
2473
2482
|
...W && { onAddEvent: W },
|
|
2474
2483
|
...s && { alwaysShowResources: s },
|
|
2475
2484
|
...z && { renderPopover: z },
|
|
2476
|
-
className:
|
|
2485
|
+
className: O,
|
|
2477
2486
|
showHeader: R,
|
|
2478
2487
|
minSelectionMinutes: Y,
|
|
2479
2488
|
...M && { showMoreMode: M },
|
|
@@ -2481,7 +2490,7 @@ function Ln({
|
|
|
2481
2490
|
isLoading: S,
|
|
2482
2491
|
...U && { slots: U },
|
|
2483
2492
|
...G && { classNames: G },
|
|
2484
|
-
settingsContent:
|
|
2493
|
+
settingsContent: Q,
|
|
2485
2494
|
filterContent: m,
|
|
2486
2495
|
headerActions: p,
|
|
2487
2496
|
calendarRef: te,
|
|
@@ -2493,7 +2502,7 @@ function Ln({
|
|
|
2493
2502
|
}
|
|
2494
2503
|
) });
|
|
2495
2504
|
}
|
|
2496
|
-
const
|
|
2505
|
+
const Mr = Pe(Sn), xe = Pe(
|
|
2497
2506
|
({ className: t, children: n, ...s }, o) => /* @__PURE__ */ e(
|
|
2498
2507
|
"select",
|
|
2499
2508
|
{
|
|
@@ -2511,8 +2520,8 @@ const Dr = Pe(Ln), ve = Pe(
|
|
|
2511
2520
|
}
|
|
2512
2521
|
)
|
|
2513
2522
|
);
|
|
2514
|
-
|
|
2515
|
-
const
|
|
2523
|
+
xe.displayName = "Select";
|
|
2524
|
+
const he = Pe(({ className: t, ...n }, s) => /* @__PURE__ */ e(
|
|
2516
2525
|
"label",
|
|
2517
2526
|
{
|
|
2518
2527
|
ref: s,
|
|
@@ -2523,8 +2532,8 @@ const me = Pe(({ className: t, ...n }, s) => /* @__PURE__ */ e(
|
|
|
2523
2532
|
...n
|
|
2524
2533
|
}
|
|
2525
2534
|
));
|
|
2526
|
-
|
|
2527
|
-
function
|
|
2535
|
+
he.displayName = "Label";
|
|
2536
|
+
function Tn({ className: t }) {
|
|
2528
2537
|
return /* @__PURE__ */ r(
|
|
2529
2538
|
"svg",
|
|
2530
2539
|
{
|
|
@@ -2546,7 +2555,7 @@ function Sn({ className: t }) {
|
|
|
2546
2555
|
}
|
|
2547
2556
|
);
|
|
2548
2557
|
}
|
|
2549
|
-
function
|
|
2558
|
+
function Hn({ className: t }) {
|
|
2550
2559
|
return /* @__PURE__ */ r(
|
|
2551
2560
|
"svg",
|
|
2552
2561
|
{
|
|
@@ -2567,12 +2576,12 @@ function Tn({ className: t }) {
|
|
|
2567
2576
|
}
|
|
2568
2577
|
);
|
|
2569
2578
|
}
|
|
2570
|
-
const
|
|
2579
|
+
const In = [
|
|
2571
2580
|
{ value: 15, label: "15 minutes" },
|
|
2572
2581
|
{ value: 30, label: "30 minutes" },
|
|
2573
2582
|
{ value: 60, label: "1 hour" }
|
|
2574
2583
|
];
|
|
2575
|
-
function
|
|
2584
|
+
function Er({
|
|
2576
2585
|
value: t,
|
|
2577
2586
|
onChange: n,
|
|
2578
2587
|
isLocked: s = !1,
|
|
@@ -2584,33 +2593,33 @@ function Mr({
|
|
|
2584
2593
|
lockedMessage: "This setting is locked by the administrator",
|
|
2585
2594
|
infoMessage: "Set the time slot duration for day and week calendar views.",
|
|
2586
2595
|
...a
|
|
2587
|
-
},
|
|
2596
|
+
}, v = (h) => {
|
|
2588
2597
|
s || n(Number(h.target.value));
|
|
2589
2598
|
};
|
|
2590
2599
|
return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
|
|
2591
2600
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
2592
|
-
/* @__PURE__ */ e(
|
|
2593
|
-
s ? /* @__PURE__ */ e(
|
|
2594
|
-
/* @__PURE__ */ e(
|
|
2595
|
-
/* @__PURE__ */ e(
|
|
2596
|
-
] }) }) : /* @__PURE__ */ e(
|
|
2597
|
-
/* @__PURE__ */ e(
|
|
2598
|
-
/* @__PURE__ */ e(
|
|
2601
|
+
/* @__PURE__ */ e(he, { className: "text-sm font-semibold", children: l.title }),
|
|
2602
|
+
s ? /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
|
|
2603
|
+
/* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(Hn, { className: "size-3 text-muted-foreground" }) }),
|
|
2604
|
+
/* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
|
|
2605
|
+
] }) }) : /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
|
|
2606
|
+
/* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(Tn, { className: "size-3 text-muted-foreground" }) }),
|
|
2607
|
+
/* @__PURE__ */ e(pe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
|
|
2599
2608
|
] }) })
|
|
2600
2609
|
] }),
|
|
2601
2610
|
/* @__PURE__ */ e(
|
|
2602
|
-
|
|
2611
|
+
xe,
|
|
2603
2612
|
{
|
|
2604
2613
|
value: t.toString(),
|
|
2605
|
-
onChange:
|
|
2614
|
+
onChange: v,
|
|
2606
2615
|
disabled: s,
|
|
2607
2616
|
className: "h-9 w-[128px] text-sm",
|
|
2608
|
-
children:
|
|
2617
|
+
children: In.map((h) => /* @__PURE__ */ e("option", { value: h.value.toString(), children: h.label }, h.value))
|
|
2609
2618
|
}
|
|
2610
2619
|
)
|
|
2611
2620
|
] });
|
|
2612
2621
|
}
|
|
2613
|
-
function
|
|
2622
|
+
function zn({ className: t }) {
|
|
2614
2623
|
return /* @__PURE__ */ r(
|
|
2615
2624
|
"svg",
|
|
2616
2625
|
{
|
|
@@ -2632,7 +2641,7 @@ function In({ className: t }) {
|
|
|
2632
2641
|
}
|
|
2633
2642
|
);
|
|
2634
2643
|
}
|
|
2635
|
-
function
|
|
2644
|
+
function jn({ className: t }) {
|
|
2636
2645
|
return /* @__PURE__ */ r(
|
|
2637
2646
|
"svg",
|
|
2638
2647
|
{
|
|
@@ -2653,12 +2662,12 @@ function zn({ className: t }) {
|
|
|
2653
2662
|
}
|
|
2654
2663
|
);
|
|
2655
2664
|
}
|
|
2656
|
-
const
|
|
2665
|
+
const An = [
|
|
2657
2666
|
{ value: "dot", label: "Dot indicator" },
|
|
2658
2667
|
{ value: "colored", label: "Full color" },
|
|
2659
2668
|
{ value: "mixed", label: "Mixed" }
|
|
2660
2669
|
];
|
|
2661
|
-
function
|
|
2670
|
+
function Lr({
|
|
2662
2671
|
value: t,
|
|
2663
2672
|
onChange: n,
|
|
2664
2673
|
isLocked: s = !1,
|
|
@@ -2675,33 +2684,33 @@ function Er({
|
|
|
2675
2684
|
mixed: "Mixed"
|
|
2676
2685
|
},
|
|
2677
2686
|
...a
|
|
2678
|
-
},
|
|
2687
|
+
}, v = (c) => l.options?.[c] ?? c, h = (c) => {
|
|
2679
2688
|
s || n(c.target.value);
|
|
2680
2689
|
};
|
|
2681
2690
|
return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
|
|
2682
2691
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
2683
|
-
/* @__PURE__ */ e(
|
|
2684
|
-
s ? /* @__PURE__ */ e(
|
|
2685
|
-
/* @__PURE__ */ e(
|
|
2686
|
-
/* @__PURE__ */ e(
|
|
2687
|
-
] }) }) : /* @__PURE__ */ e(
|
|
2688
|
-
/* @__PURE__ */ e(
|
|
2689
|
-
/* @__PURE__ */ e(
|
|
2692
|
+
/* @__PURE__ */ e(he, { className: "text-sm font-semibold", children: l.title }),
|
|
2693
|
+
s ? /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
|
|
2694
|
+
/* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(jn, { className: "size-3 text-muted-foreground" }) }),
|
|
2695
|
+
/* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
|
|
2696
|
+
] }) }) : /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
|
|
2697
|
+
/* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(zn, { className: "size-3 text-muted-foreground" }) }),
|
|
2698
|
+
/* @__PURE__ */ e(pe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
|
|
2690
2699
|
] }) })
|
|
2691
2700
|
] }),
|
|
2692
2701
|
/* @__PURE__ */ e(
|
|
2693
|
-
|
|
2702
|
+
xe,
|
|
2694
2703
|
{
|
|
2695
2704
|
value: t,
|
|
2696
2705
|
onChange: h,
|
|
2697
2706
|
disabled: s,
|
|
2698
2707
|
className: "h-9 w-[128px] text-sm",
|
|
2699
|
-
children:
|
|
2708
|
+
children: An.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: v(c.value) }, c.value))
|
|
2700
2709
|
}
|
|
2701
2710
|
)
|
|
2702
2711
|
] });
|
|
2703
2712
|
}
|
|
2704
|
-
function
|
|
2713
|
+
function Pn({ className: t }) {
|
|
2705
2714
|
return /* @__PURE__ */ r(
|
|
2706
2715
|
"svg",
|
|
2707
2716
|
{
|
|
@@ -2723,7 +2732,7 @@ function An({ className: t }) {
|
|
|
2723
2732
|
}
|
|
2724
2733
|
);
|
|
2725
2734
|
}
|
|
2726
|
-
function
|
|
2735
|
+
function Wn({ className: t }) {
|
|
2727
2736
|
return /* @__PURE__ */ r(
|
|
2728
2737
|
"svg",
|
|
2729
2738
|
{
|
|
@@ -2744,13 +2753,13 @@ function Pn({ className: t }) {
|
|
|
2744
2753
|
}
|
|
2745
2754
|
);
|
|
2746
2755
|
}
|
|
2747
|
-
function
|
|
2756
|
+
function Fn() {
|
|
2748
2757
|
return Array.from({ length: 25 }, (t, n) => ({
|
|
2749
2758
|
value: n,
|
|
2750
2759
|
label: `${String(n).padStart(2, "0")}:00`
|
|
2751
2760
|
}));
|
|
2752
2761
|
}
|
|
2753
|
-
function
|
|
2762
|
+
function Sr({
|
|
2754
2763
|
value: t,
|
|
2755
2764
|
onChange: n,
|
|
2756
2765
|
isLocked: s = !1,
|
|
@@ -2764,7 +2773,7 @@ function Lr({
|
|
|
2764
2773
|
lockedMessage: "This setting is locked by the administrator",
|
|
2765
2774
|
infoMessage: "Set the visible hour range for day and week views. Hours outside this range will be hidden.",
|
|
2766
2775
|
...a
|
|
2767
|
-
},
|
|
2776
|
+
}, v = Fn(), h = (w) => {
|
|
2768
2777
|
if (s) return;
|
|
2769
2778
|
const P = Number(w.target.value);
|
|
2770
2779
|
P < t.endHour && n({ ...t, startHour: P });
|
|
@@ -2775,26 +2784,26 @@ function Lr({
|
|
|
2775
2784
|
};
|
|
2776
2785
|
return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
|
|
2777
2786
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
2778
|
-
/* @__PURE__ */ e(
|
|
2779
|
-
s ? /* @__PURE__ */ e(
|
|
2780
|
-
/* @__PURE__ */ e(
|
|
2781
|
-
/* @__PURE__ */ e(
|
|
2782
|
-
] }) }) : /* @__PURE__ */ e(
|
|
2783
|
-
/* @__PURE__ */ e(
|
|
2784
|
-
/* @__PURE__ */ e(
|
|
2787
|
+
/* @__PURE__ */ e(he, { className: "text-sm font-semibold", children: l.title }),
|
|
2788
|
+
s ? /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
|
|
2789
|
+
/* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(Wn, { className: "size-3 text-muted-foreground" }) }),
|
|
2790
|
+
/* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
|
|
2791
|
+
] }) }) : /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
|
|
2792
|
+
/* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(Pn, { className: "size-3 text-muted-foreground" }) }),
|
|
2793
|
+
/* @__PURE__ */ e(pe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
|
|
2785
2794
|
] }) })
|
|
2786
2795
|
] }),
|
|
2787
2796
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
2788
2797
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
|
|
2789
|
-
/* @__PURE__ */ e(
|
|
2798
|
+
/* @__PURE__ */ e(he, { className: "text-xs text-muted-foreground", children: l.from }),
|
|
2790
2799
|
/* @__PURE__ */ e(
|
|
2791
|
-
|
|
2800
|
+
xe,
|
|
2792
2801
|
{
|
|
2793
2802
|
value: t.startHour.toString(),
|
|
2794
2803
|
onChange: h,
|
|
2795
2804
|
disabled: s,
|
|
2796
2805
|
className: "h-9 w-[88px] text-sm",
|
|
2797
|
-
children:
|
|
2806
|
+
children: v.map((w) => /* @__PURE__ */ e(
|
|
2798
2807
|
"option",
|
|
2799
2808
|
{
|
|
2800
2809
|
value: w.value.toString(),
|
|
@@ -2808,15 +2817,15 @@ function Lr({
|
|
|
2808
2817
|
] }),
|
|
2809
2818
|
/* @__PURE__ */ e("span", { className: "mt-5 text-muted-foreground", children: "—" }),
|
|
2810
2819
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-1", children: [
|
|
2811
|
-
/* @__PURE__ */ e(
|
|
2820
|
+
/* @__PURE__ */ e(he, { className: "text-xs text-muted-foreground", children: l.to }),
|
|
2812
2821
|
/* @__PURE__ */ e(
|
|
2813
|
-
|
|
2822
|
+
xe,
|
|
2814
2823
|
{
|
|
2815
2824
|
value: t.endHour.toString(),
|
|
2816
2825
|
onChange: c,
|
|
2817
2826
|
disabled: s,
|
|
2818
2827
|
className: "h-9 w-[88px] text-sm",
|
|
2819
|
-
children:
|
|
2828
|
+
children: v.map((w) => /* @__PURE__ */ e(
|
|
2820
2829
|
"option",
|
|
2821
2830
|
{
|
|
2822
2831
|
value: w.value.toString(),
|
|
@@ -2831,7 +2840,7 @@ function Lr({
|
|
|
2831
2840
|
] })
|
|
2832
2841
|
] });
|
|
2833
2842
|
}
|
|
2834
|
-
function
|
|
2843
|
+
function $n({ className: t }) {
|
|
2835
2844
|
return /* @__PURE__ */ r(
|
|
2836
2845
|
"svg",
|
|
2837
2846
|
{
|
|
@@ -2853,7 +2862,7 @@ function Fn({ className: t }) {
|
|
|
2853
2862
|
}
|
|
2854
2863
|
);
|
|
2855
2864
|
}
|
|
2856
|
-
function
|
|
2865
|
+
function On({ className: t }) {
|
|
2857
2866
|
return /* @__PURE__ */ r(
|
|
2858
2867
|
"svg",
|
|
2859
2868
|
{
|
|
@@ -2874,7 +2883,7 @@ function $n({ className: t }) {
|
|
|
2874
2883
|
}
|
|
2875
2884
|
);
|
|
2876
2885
|
}
|
|
2877
|
-
function
|
|
2886
|
+
function _n({ className: t }) {
|
|
2878
2887
|
return /* @__PURE__ */ e(
|
|
2879
2888
|
"svg",
|
|
2880
2889
|
{
|
|
@@ -2892,7 +2901,7 @@ function On({ className: t }) {
|
|
|
2892
2901
|
}
|
|
2893
2902
|
);
|
|
2894
2903
|
}
|
|
2895
|
-
const
|
|
2904
|
+
const Bn = [
|
|
2896
2905
|
"monday",
|
|
2897
2906
|
"tuesday",
|
|
2898
2907
|
"wednesday",
|
|
@@ -2901,7 +2910,7 @@ const _n = [
|
|
|
2901
2910
|
"saturday",
|
|
2902
2911
|
"sunday"
|
|
2903
2912
|
];
|
|
2904
|
-
function
|
|
2913
|
+
function Rn() {
|
|
2905
2914
|
return Array.from({ length: 25 }, (t, n) => ({
|
|
2906
2915
|
value: n,
|
|
2907
2916
|
label: `${String(n).padStart(2, "0")}:00`
|
|
@@ -2916,10 +2925,10 @@ const rt = {
|
|
|
2916
2925
|
friday: "Fri",
|
|
2917
2926
|
saturday: "Sat"
|
|
2918
2927
|
};
|
|
2919
|
-
function
|
|
2928
|
+
function Un({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: a }) {
|
|
2920
2929
|
const l = () => {
|
|
2921
2930
|
o || s({ ...n, enabled: !n.enabled });
|
|
2922
|
-
},
|
|
2931
|
+
}, v = (c) => {
|
|
2923
2932
|
if (o) return;
|
|
2924
2933
|
const w = Number(c.target.value);
|
|
2925
2934
|
w < n.to && s({ ...n, from: w });
|
|
@@ -2943,15 +2952,15 @@ function Rn({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: a }
|
|
|
2943
2952
|
n.enabled ? "border-primary bg-primary text-primary-foreground" : "border-input bg-background",
|
|
2944
2953
|
o && "cursor-not-allowed opacity-50"
|
|
2945
2954
|
),
|
|
2946
|
-
children: n.enabled && /* @__PURE__ */ e(
|
|
2955
|
+
children: n.enabled && /* @__PURE__ */ e(_n, { className: "size-3" })
|
|
2947
2956
|
}
|
|
2948
2957
|
),
|
|
2949
2958
|
/* @__PURE__ */ e("span", { className: g("w-10 text-sm", !n.enabled && "text-muted-foreground"), children: t }),
|
|
2950
2959
|
/* @__PURE__ */ e(
|
|
2951
|
-
|
|
2960
|
+
xe,
|
|
2952
2961
|
{
|
|
2953
2962
|
value: n.from.toString(),
|
|
2954
|
-
onChange:
|
|
2963
|
+
onChange: v,
|
|
2955
2964
|
disabled: o || !n.enabled,
|
|
2956
2965
|
className: "h-8 w-[76px] text-xs",
|
|
2957
2966
|
children: a.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value >= n.to, children: c.label }, c.value))
|
|
@@ -2959,7 +2968,7 @@ function Rn({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: a }
|
|
|
2959
2968
|
),
|
|
2960
2969
|
/* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "—" }),
|
|
2961
2970
|
/* @__PURE__ */ e(
|
|
2962
|
-
|
|
2971
|
+
xe,
|
|
2963
2972
|
{
|
|
2964
2973
|
value: n.to.toString(),
|
|
2965
2974
|
onChange: h,
|
|
@@ -2970,7 +2979,7 @@ function Rn({ dayLabel: t, config: n, onChange: s, disabled: o, hourOptions: a }
|
|
|
2970
2979
|
)
|
|
2971
2980
|
] });
|
|
2972
2981
|
}
|
|
2973
|
-
function
|
|
2982
|
+
function Tr({
|
|
2974
2983
|
value: t,
|
|
2975
2984
|
onChange: n,
|
|
2976
2985
|
isLocked: s = !1,
|
|
@@ -2983,34 +2992,34 @@ function Sr({
|
|
|
2983
2992
|
infoMessage: "Configure working hours for each day of the week. Non-working hours will be grayed out in day and week views.",
|
|
2984
2993
|
days: rt,
|
|
2985
2994
|
...a
|
|
2986
|
-
},
|
|
2995
|
+
}, v = Rn(), h = (c, w) => {
|
|
2987
2996
|
s || n({ ...t, [c]: w });
|
|
2988
2997
|
};
|
|
2989
2998
|
return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
|
|
2990
2999
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
2991
|
-
/* @__PURE__ */ e(
|
|
2992
|
-
s ? /* @__PURE__ */ e(
|
|
2993
|
-
/* @__PURE__ */ e(
|
|
2994
|
-
/* @__PURE__ */ e(
|
|
2995
|
-
] }) }) : /* @__PURE__ */ e(
|
|
2996
|
-
/* @__PURE__ */ e(
|
|
2997
|
-
/* @__PURE__ */ e(
|
|
3000
|
+
/* @__PURE__ */ e(he, { className: "text-sm font-semibold", children: l.title }),
|
|
3001
|
+
s ? /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
|
|
3002
|
+
/* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e(On, { className: "size-3 text-muted-foreground" }) }),
|
|
3003
|
+
/* @__PURE__ */ e(pe, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
|
|
3004
|
+
] }) }) : /* @__PURE__ */ e(me, { delayDuration: 100, children: /* @__PURE__ */ r(fe, { children: [
|
|
3005
|
+
/* @__PURE__ */ e(ge, { children: /* @__PURE__ */ e($n, { className: "size-3 text-muted-foreground" }) }),
|
|
3006
|
+
/* @__PURE__ */ e(pe, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
|
|
2998
3007
|
] }) })
|
|
2999
3008
|
] }),
|
|
3000
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children:
|
|
3001
|
-
|
|
3009
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: Bn.map((c) => /* @__PURE__ */ e(
|
|
3010
|
+
Un,
|
|
3002
3011
|
{
|
|
3003
3012
|
dayLabel: l.days?.[c] ?? rt[c],
|
|
3004
3013
|
config: t[c],
|
|
3005
3014
|
onChange: (w) => h(c, w),
|
|
3006
3015
|
disabled: s,
|
|
3007
|
-
hourOptions:
|
|
3016
|
+
hourOptions: v
|
|
3008
3017
|
},
|
|
3009
3018
|
c
|
|
3010
3019
|
)) })
|
|
3011
3020
|
] });
|
|
3012
3021
|
}
|
|
3013
|
-
const
|
|
3022
|
+
const Hr = {
|
|
3014
3023
|
sunday: { enabled: !1, from: 8, to: 18 },
|
|
3015
3024
|
monday: { enabled: !0, from: 8, to: 18 },
|
|
3016
3025
|
tuesday: { enabled: !0, from: 8, to: 18 },
|
|
@@ -3019,7 +3028,7 @@ const Tr = {
|
|
|
3019
3028
|
friday: { enabled: !0, from: 8, to: 18 },
|
|
3020
3029
|
saturday: { enabled: !1, from: 8, to: 18 }
|
|
3021
3030
|
};
|
|
3022
|
-
function
|
|
3031
|
+
function Be({ className: t }) {
|
|
3023
3032
|
return /* @__PURE__ */ e(
|
|
3024
3033
|
"svg",
|
|
3025
3034
|
{
|
|
@@ -3035,7 +3044,7 @@ function _e({ className: t }) {
|
|
|
3035
3044
|
}
|
|
3036
3045
|
);
|
|
3037
3046
|
}
|
|
3038
|
-
function
|
|
3047
|
+
function Vn({ className: t }) {
|
|
3039
3048
|
return /* @__PURE__ */ r(
|
|
3040
3049
|
"svg",
|
|
3041
3050
|
{
|
|
@@ -3054,7 +3063,7 @@ function Un({ className: t }) {
|
|
|
3054
3063
|
}
|
|
3055
3064
|
);
|
|
3056
3065
|
}
|
|
3057
|
-
function
|
|
3066
|
+
function Yn({ className: t }) {
|
|
3058
3067
|
return /* @__PURE__ */ r(
|
|
3059
3068
|
"svg",
|
|
3060
3069
|
{
|
|
@@ -3073,7 +3082,7 @@ function Vn({ className: t }) {
|
|
|
3073
3082
|
}
|
|
3074
3083
|
);
|
|
3075
3084
|
}
|
|
3076
|
-
function
|
|
3085
|
+
function Re({ checked: t, onCheckedChange: n, className: s, children: o }) {
|
|
3077
3086
|
return /* @__PURE__ */ e(
|
|
3078
3087
|
"button",
|
|
3079
3088
|
{
|
|
@@ -3086,8 +3095,8 @@ function Be({ checked: t, onCheckedChange: n, className: s, children: o }) {
|
|
|
3086
3095
|
}
|
|
3087
3096
|
);
|
|
3088
3097
|
}
|
|
3089
|
-
function
|
|
3090
|
-
const [a, l] =
|
|
3098
|
+
function Kn({ src: t, alt: n, fallback: s, className: o }) {
|
|
3099
|
+
const [a, l] = ie(!1);
|
|
3091
3100
|
return !t || a ? /* @__PURE__ */ e(
|
|
3092
3101
|
"div",
|
|
3093
3102
|
{
|
|
@@ -3109,7 +3118,7 @@ function Yn({ src: t, alt: n, fallback: s, className: o }) {
|
|
|
3109
3118
|
}
|
|
3110
3119
|
function ot({ value: t, onChange: n, placeholder: s, className: o }) {
|
|
3111
3120
|
return /* @__PURE__ */ r("div", { className: g("relative", o), children: [
|
|
3112
|
-
/* @__PURE__ */ e(
|
|
3121
|
+
/* @__PURE__ */ e(Vn, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
3113
3122
|
/* @__PURE__ */ e(
|
|
3114
3123
|
"input",
|
|
3115
3124
|
{
|
|
@@ -3127,7 +3136,7 @@ function st(t, n, s, o = 0.3) {
|
|
|
3127
3136
|
const a = n.toLowerCase();
|
|
3128
3137
|
return t.filter((l) => s(l).some((h) => h ? h.toLowerCase().includes(a) : !1));
|
|
3129
3138
|
}
|
|
3130
|
-
const
|
|
3139
|
+
const Gn = {
|
|
3131
3140
|
title: "Filters",
|
|
3132
3141
|
subtitle: "Filter calendar events",
|
|
3133
3142
|
scheduleTypes: "Event Types",
|
|
@@ -3140,28 +3149,28 @@ const Kn = {
|
|
|
3140
3149
|
noScheduleTypes: "No event types found",
|
|
3141
3150
|
noParticipants: "No participants found"
|
|
3142
3151
|
};
|
|
3143
|
-
function
|
|
3152
|
+
function Ir({
|
|
3144
3153
|
scheduleTypes: t,
|
|
3145
3154
|
users: n,
|
|
3146
3155
|
selectedScheduleTypeIds: s,
|
|
3147
3156
|
onScheduleTypeChange: o,
|
|
3148
3157
|
selectedUserIds: a,
|
|
3149
3158
|
onUserChange: l,
|
|
3150
|
-
onClearAll:
|
|
3159
|
+
onClearAll: v,
|
|
3151
3160
|
className: h,
|
|
3152
3161
|
scheduleTypesLoading: c = !1,
|
|
3153
3162
|
usersLoading: w = !1,
|
|
3154
3163
|
labels: P,
|
|
3155
|
-
getScheduleTypeName:
|
|
3164
|
+
getScheduleTypeName: y
|
|
3156
3165
|
}) {
|
|
3157
|
-
const
|
|
3166
|
+
const k = { ...Gn, ...P }, [B, A] = ie(""), [W, F] = ie(""), H = ee(() => B.trim() ? st(t, B, (m) => [
|
|
3158
3167
|
m.name,
|
|
3159
|
-
|
|
3160
|
-
]) : t, [t, B,
|
|
3168
|
+
y?.(m) || m.name
|
|
3169
|
+
]) : t, [t, B, y]), C = ee(() => W.trim() ? st(n, W, (m) => [m.name, m.email || ""]) : n, [n, W]), O = H.length > 0 && H.every((m) => s.includes(m.id)), R = C.length > 0 && C.every((m) => a.includes(m.id)), Y = s.length + a.length, M = (m, p) => {
|
|
3161
3170
|
const f = p ? [...s, m] : s.filter((E) => E !== m);
|
|
3162
3171
|
o(f);
|
|
3163
3172
|
}, V = () => {
|
|
3164
|
-
if (
|
|
3173
|
+
if (O) {
|
|
3165
3174
|
const m = new Set(H.map((p) => p.id));
|
|
3166
3175
|
o(s.filter((p) => !m.has(p)));
|
|
3167
3176
|
} else {
|
|
@@ -3176,15 +3185,15 @@ function Hr({
|
|
|
3176
3185
|
l(f);
|
|
3177
3186
|
}, z = () => {
|
|
3178
3187
|
if (R) {
|
|
3179
|
-
const m = new Set(
|
|
3188
|
+
const m = new Set(C.map((p) => p.id));
|
|
3180
3189
|
l(a.filter((p) => !m.has(p)));
|
|
3181
3190
|
} else {
|
|
3182
|
-
const m = /* @__PURE__ */ new Set([...a, ...
|
|
3191
|
+
const m = /* @__PURE__ */ new Set([...a, ...C.map((p) => p.id)]);
|
|
3183
3192
|
l(Array.from(m));
|
|
3184
3193
|
}
|
|
3185
3194
|
}, U = () => {
|
|
3186
|
-
o([]), l([]),
|
|
3187
|
-
}, G = (m) =>
|
|
3195
|
+
o([]), l([]), v?.();
|
|
3196
|
+
}, G = (m) => y ? y(m) : m.name, Q = (m) => m.colorHex || m.color || "#069AD7";
|
|
3188
3197
|
return /* @__PURE__ */ r(
|
|
3189
3198
|
"div",
|
|
3190
3199
|
{
|
|
@@ -3195,8 +3204,8 @@ function Hr({
|
|
|
3195
3204
|
children: [
|
|
3196
3205
|
/* @__PURE__ */ r("header", { className: "flex items-start justify-between gap-2 px-4 pb-2 pt-4", children: [
|
|
3197
3206
|
/* @__PURE__ */ r("div", { className: "flex flex-col", children: [
|
|
3198
|
-
/* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children:
|
|
3199
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children:
|
|
3207
|
+
/* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: k.title }),
|
|
3208
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: k.subtitle })
|
|
3200
3209
|
] }),
|
|
3201
3210
|
Y > 0 && /* @__PURE__ */ r(
|
|
3202
3211
|
"button",
|
|
@@ -3205,8 +3214,8 @@ function Hr({
|
|
|
3205
3214
|
onClick: U,
|
|
3206
3215
|
className: "flex h-auto items-center gap-1 rounded-md px-2 py-1 text-xs font-medium text-destructive transition-colors hover:bg-destructive/10",
|
|
3207
3216
|
children: [
|
|
3208
|
-
/* @__PURE__ */ e(
|
|
3209
|
-
|
|
3217
|
+
/* @__PURE__ */ e(Yn, { className: "h-3.5 w-3.5" }),
|
|
3218
|
+
k.clearAll
|
|
3210
3219
|
]
|
|
3211
3220
|
}
|
|
3212
3221
|
)
|
|
@@ -3214,14 +3223,14 @@ function Hr({
|
|
|
3214
3223
|
/* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
|
|
3215
3224
|
/* @__PURE__ */ r("section", { className: "flex flex-col", children: [
|
|
3216
3225
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between px-4 py-3", children: [
|
|
3217
|
-
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children:
|
|
3226
|
+
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: k.scheduleTypes }),
|
|
3218
3227
|
/* @__PURE__ */ e(
|
|
3219
3228
|
"button",
|
|
3220
3229
|
{
|
|
3221
3230
|
type: "button",
|
|
3222
3231
|
onClick: V,
|
|
3223
3232
|
className: "text-xs font-medium text-primary transition-colors hover:text-primary/80",
|
|
3224
|
-
children:
|
|
3233
|
+
children: O ? k.unselectAll : k.selectAll
|
|
3225
3234
|
}
|
|
3226
3235
|
)
|
|
3227
3236
|
] }),
|
|
@@ -3230,7 +3239,7 @@ function Hr({
|
|
|
3230
3239
|
{
|
|
3231
3240
|
value: B,
|
|
3232
3241
|
onChange: A,
|
|
3233
|
-
placeholder:
|
|
3242
|
+
placeholder: k.searchScheduleTypes
|
|
3234
3243
|
}
|
|
3235
3244
|
) }),
|
|
3236
3245
|
/* @__PURE__ */ r("div", { className: "flex max-h-[220px] flex-col gap-2 overflow-y-auto px-4 pb-2 scrollbar-thin", children: [
|
|
@@ -3248,9 +3257,9 @@ function Hr({
|
|
|
3248
3257
|
`skeleton-${p}`
|
|
3249
3258
|
))
|
|
3250
3259
|
) : H.map((m) => {
|
|
3251
|
-
const p = s.includes(m.id), f =
|
|
3260
|
+
const p = s.includes(m.id), f = Q(m);
|
|
3252
3261
|
return /* @__PURE__ */ r(
|
|
3253
|
-
|
|
3262
|
+
Re,
|
|
3254
3263
|
{
|
|
3255
3264
|
checked: p,
|
|
3256
3265
|
onCheckedChange: (E) => M(m.id, E),
|
|
@@ -3267,7 +3276,7 @@ function Hr({
|
|
|
3267
3276
|
"flex h-4 w-4 items-center justify-center rounded border border-border text-xs transition-colors",
|
|
3268
3277
|
p && "border-primary bg-primary text-primary-foreground"
|
|
3269
3278
|
),
|
|
3270
|
-
children: p && /* @__PURE__ */ e(
|
|
3279
|
+
children: p && /* @__PURE__ */ e(Be, { className: "h-3 w-3" })
|
|
3271
3280
|
}
|
|
3272
3281
|
),
|
|
3273
3282
|
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: G(m) })
|
|
@@ -3287,15 +3296,15 @@ function Hr({
|
|
|
3287
3296
|
m.id
|
|
3288
3297
|
);
|
|
3289
3298
|
}),
|
|
3290
|
-
!c && H.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children:
|
|
3299
|
+
!c && H.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: k.noScheduleTypes })
|
|
3291
3300
|
] })
|
|
3292
3301
|
] }),
|
|
3293
3302
|
/* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
|
|
3294
3303
|
/* @__PURE__ */ r("section", { className: "flex flex-col", children: [
|
|
3295
3304
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between px-4 py-3", children: [
|
|
3296
|
-
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children:
|
|
3305
|
+
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: k.participants }),
|
|
3297
3306
|
/* @__PURE__ */ e(
|
|
3298
|
-
|
|
3307
|
+
Re,
|
|
3299
3308
|
{
|
|
3300
3309
|
checked: R,
|
|
3301
3310
|
onCheckedChange: () => z(),
|
|
@@ -3303,7 +3312,7 @@ function Hr({
|
|
|
3303
3312
|
"flex h-5 w-5 items-center justify-center rounded border border-border bg-white transition-colors hover:border-primary/50",
|
|
3304
3313
|
R && "border-primary bg-primary text-primary-foreground"
|
|
3305
3314
|
),
|
|
3306
|
-
children: R && /* @__PURE__ */ e(
|
|
3315
|
+
children: R && /* @__PURE__ */ e(Be, { className: "h-3.5 w-3.5" })
|
|
3307
3316
|
}
|
|
3308
3317
|
)
|
|
3309
3318
|
] }),
|
|
@@ -3312,7 +3321,7 @@ function Hr({
|
|
|
3312
3321
|
{
|
|
3313
3322
|
value: W,
|
|
3314
3323
|
onChange: F,
|
|
3315
|
-
placeholder:
|
|
3324
|
+
placeholder: k.searchParticipants
|
|
3316
3325
|
}
|
|
3317
3326
|
) }),
|
|
3318
3327
|
/* @__PURE__ */ r("div", { className: "flex max-h-[400px] flex-col gap-2 overflow-y-auto px-4 pb-4 scrollbar-thin", children: [
|
|
@@ -3333,10 +3342,10 @@ function Hr({
|
|
|
3333
3342
|
},
|
|
3334
3343
|
`p-skeleton-${p}`
|
|
3335
3344
|
))
|
|
3336
|
-
) :
|
|
3345
|
+
) : C.map((m) => {
|
|
3337
3346
|
const p = a.includes(m.id);
|
|
3338
3347
|
return /* @__PURE__ */ r(
|
|
3339
|
-
|
|
3348
|
+
Re,
|
|
3340
3349
|
{
|
|
3341
3350
|
checked: p,
|
|
3342
3351
|
onCheckedChange: (f) => S(m.id, f),
|
|
@@ -3352,12 +3361,12 @@ function Hr({
|
|
|
3352
3361
|
"flex h-4 w-4 flex-shrink-0 items-center justify-center rounded border border-border transition-colors",
|
|
3353
3362
|
p && "border-primary bg-primary text-primary-foreground"
|
|
3354
3363
|
),
|
|
3355
|
-
children: p && /* @__PURE__ */ e(
|
|
3364
|
+
children: p && /* @__PURE__ */ e(Be, { className: "h-2.5 w-2.5" })
|
|
3356
3365
|
}
|
|
3357
3366
|
),
|
|
3358
3367
|
/* @__PURE__ */ r("div", { className: "flex flex-1 items-start gap-2", children: [
|
|
3359
3368
|
/* @__PURE__ */ e(
|
|
3360
|
-
|
|
3369
|
+
Kn,
|
|
3361
3370
|
{
|
|
3362
3371
|
src: m.avatar ?? null,
|
|
3363
3372
|
alt: m.name,
|
|
@@ -3382,14 +3391,14 @@ function Hr({
|
|
|
3382
3391
|
m.id
|
|
3383
3392
|
);
|
|
3384
3393
|
}),
|
|
3385
|
-
!w &&
|
|
3394
|
+
!w && C.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: k.noParticipants })
|
|
3386
3395
|
] })
|
|
3387
3396
|
] })
|
|
3388
3397
|
]
|
|
3389
3398
|
}
|
|
3390
3399
|
);
|
|
3391
3400
|
}
|
|
3392
|
-
function
|
|
3401
|
+
function Jn({ className: t }) {
|
|
3393
3402
|
return /* @__PURE__ */ r(
|
|
3394
3403
|
"svg",
|
|
3395
3404
|
{
|
|
@@ -3410,7 +3419,7 @@ function Gn({ className: t }) {
|
|
|
3410
3419
|
}
|
|
3411
3420
|
);
|
|
3412
3421
|
}
|
|
3413
|
-
function
|
|
3422
|
+
function zr({
|
|
3414
3423
|
scheduleTypes: t,
|
|
3415
3424
|
value: n,
|
|
3416
3425
|
onChange: s,
|
|
@@ -3418,11 +3427,11 @@ function Ir({
|
|
|
3418
3427
|
className: a,
|
|
3419
3428
|
label: l
|
|
3420
3429
|
}) {
|
|
3421
|
-
const
|
|
3430
|
+
const v = (c) => {
|
|
3422
3431
|
s(c.target.value);
|
|
3423
3432
|
}, h = t.find((c) => String(c.id) === n);
|
|
3424
3433
|
return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-1", a), children: [
|
|
3425
|
-
l && /* @__PURE__ */ e(
|
|
3434
|
+
l && /* @__PURE__ */ e(he, { className: "text-xs text-muted-foreground", children: l }),
|
|
3426
3435
|
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
3427
3436
|
h ? /* @__PURE__ */ e(
|
|
3428
3437
|
"span",
|
|
@@ -3430,12 +3439,12 @@ function Ir({
|
|
|
3430
3439
|
className: "pointer-events-none absolute left-2.5 top-1/2 size-3 -translate-y-1/2 rounded-full",
|
|
3431
3440
|
style: { backgroundColor: h.color }
|
|
3432
3441
|
}
|
|
3433
|
-
) : /* @__PURE__ */ e(
|
|
3442
|
+
) : /* @__PURE__ */ e(Jn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
|
|
3434
3443
|
/* @__PURE__ */ r(
|
|
3435
|
-
|
|
3444
|
+
xe,
|
|
3436
3445
|
{
|
|
3437
3446
|
value: n,
|
|
3438
|
-
onChange:
|
|
3447
|
+
onChange: v,
|
|
3439
3448
|
className: "h-9 w-full min-w-[140px] pl-8 pr-8 text-sm",
|
|
3440
3449
|
children: [
|
|
3441
3450
|
/* @__PURE__ */ e("option", { value: "all", children: o }),
|
|
@@ -3446,7 +3455,7 @@ function Ir({
|
|
|
3446
3455
|
] })
|
|
3447
3456
|
] });
|
|
3448
3457
|
}
|
|
3449
|
-
function
|
|
3458
|
+
function qn({ className: t }) {
|
|
3450
3459
|
return /* @__PURE__ */ r(
|
|
3451
3460
|
"svg",
|
|
3452
3461
|
{
|
|
@@ -3469,7 +3478,7 @@ function Jn({ className: t }) {
|
|
|
3469
3478
|
}
|
|
3470
3479
|
);
|
|
3471
3480
|
}
|
|
3472
|
-
function
|
|
3481
|
+
function jr({
|
|
3473
3482
|
users: t,
|
|
3474
3483
|
value: n,
|
|
3475
3484
|
onChange: s,
|
|
@@ -3477,18 +3486,18 @@ function zr({
|
|
|
3477
3486
|
className: a,
|
|
3478
3487
|
label: l
|
|
3479
3488
|
}) {
|
|
3480
|
-
const
|
|
3489
|
+
const v = (h) => {
|
|
3481
3490
|
s(h.target.value);
|
|
3482
3491
|
};
|
|
3483
3492
|
return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-1", a), children: [
|
|
3484
|
-
l && /* @__PURE__ */ e(
|
|
3493
|
+
l && /* @__PURE__ */ e(he, { className: "text-xs text-muted-foreground", children: l }),
|
|
3485
3494
|
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
3486
|
-
/* @__PURE__ */ e(
|
|
3495
|
+
/* @__PURE__ */ e(qn, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
|
|
3487
3496
|
/* @__PURE__ */ r(
|
|
3488
|
-
|
|
3497
|
+
xe,
|
|
3489
3498
|
{
|
|
3490
3499
|
value: n,
|
|
3491
|
-
onChange:
|
|
3500
|
+
onChange: v,
|
|
3492
3501
|
className: "h-9 w-full min-w-[120px] pl-8 pr-8 text-sm",
|
|
3493
3502
|
children: [
|
|
3494
3503
|
/* @__PURE__ */ e("option", { value: "all", children: o }),
|
|
@@ -3499,7 +3508,7 @@ function zr({
|
|
|
3499
3508
|
] })
|
|
3500
3509
|
] });
|
|
3501
3510
|
}
|
|
3502
|
-
function
|
|
3511
|
+
function Xn({ className: t }) {
|
|
3503
3512
|
return /* @__PURE__ */ r(
|
|
3504
3513
|
"svg",
|
|
3505
3514
|
{
|
|
@@ -3526,7 +3535,7 @@ function qn({ className: t }) {
|
|
|
3526
3535
|
}
|
|
3527
3536
|
);
|
|
3528
3537
|
}
|
|
3529
|
-
function
|
|
3538
|
+
function Qn({ className: t }) {
|
|
3530
3539
|
return /* @__PURE__ */ r(
|
|
3531
3540
|
"svg",
|
|
3532
3541
|
{
|
|
@@ -3549,7 +3558,7 @@ function Xn({ className: t }) {
|
|
|
3549
3558
|
}
|
|
3550
3559
|
);
|
|
3551
3560
|
}
|
|
3552
|
-
function
|
|
3561
|
+
function Zn({ className: t }) {
|
|
3553
3562
|
return /* @__PURE__ */ e(
|
|
3554
3563
|
"svg",
|
|
3555
3564
|
{
|
|
@@ -3565,7 +3574,7 @@ function Qn({ className: t }) {
|
|
|
3565
3574
|
}
|
|
3566
3575
|
);
|
|
3567
3576
|
}
|
|
3568
|
-
function
|
|
3577
|
+
function er({ className: t }) {
|
|
3569
3578
|
return /* @__PURE__ */ r(
|
|
3570
3579
|
"svg",
|
|
3571
3580
|
{
|
|
@@ -3585,7 +3594,7 @@ function Zn({ className: t }) {
|
|
|
3585
3594
|
}
|
|
3586
3595
|
);
|
|
3587
3596
|
}
|
|
3588
|
-
function
|
|
3597
|
+
function tr(t) {
|
|
3589
3598
|
const n = t.getFullYear(), s = String(t.getMonth() + 1).padStart(2, "0"), o = String(t.getDate()).padStart(2, "0");
|
|
3590
3599
|
return `${n}-${s}-${o}`;
|
|
3591
3600
|
}
|
|
@@ -3593,17 +3602,17 @@ function at(t) {
|
|
|
3593
3602
|
const n = t.getHours(), s = t.getMinutes(), o = n >= 12 ? "PM" : "AM", a = n % 12 || 12, l = String(s).padStart(2, "0");
|
|
3594
3603
|
return `${a}:${l} ${o}`;
|
|
3595
3604
|
}
|
|
3596
|
-
function
|
|
3605
|
+
function nr(t) {
|
|
3597
3606
|
const n = at(t.startDate), s = at(t.endDate);
|
|
3598
3607
|
return `${n} - ${s}`;
|
|
3599
3608
|
}
|
|
3600
|
-
function
|
|
3609
|
+
function rr(t) {
|
|
3601
3610
|
const n = mt(/* @__PURE__ */ new Date(), 1);
|
|
3602
3611
|
return t.getFullYear() === n.getFullYear() && t.getMonth() === n.getMonth() && t.getDate() === n.getDate();
|
|
3603
3612
|
}
|
|
3604
|
-
function
|
|
3605
|
-
if (
|
|
3606
|
-
if (
|
|
3613
|
+
function or(t) {
|
|
3614
|
+
if (ce(t)) return "Today";
|
|
3615
|
+
if (rr(t)) return "Tomorrow";
|
|
3607
3616
|
const n = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], s = [
|
|
3608
3617
|
"Jan",
|
|
3609
3618
|
"Feb",
|
|
@@ -3620,32 +3629,32 @@ function rr(t) {
|
|
|
3620
3629
|
], o = n[t.getDay()], a = s[t.getMonth()], l = t.getDate();
|
|
3621
3630
|
return `${o}, ${a} ${l}`;
|
|
3622
3631
|
}
|
|
3623
|
-
function
|
|
3632
|
+
function sr(t, n) {
|
|
3624
3633
|
const s = /* @__PURE__ */ new Map();
|
|
3625
3634
|
for (const o of t) {
|
|
3626
|
-
const a =
|
|
3635
|
+
const a = tr(o.startDate), l = s.get(a) ?? [];
|
|
3627
3636
|
l.push(o), s.set(a, l);
|
|
3628
3637
|
}
|
|
3629
3638
|
return Array.from(s.entries()).map(([o, a]) => {
|
|
3630
3639
|
const l = [...a].sort(
|
|
3631
3640
|
(h, c) => h.startDate.getTime() - c.startDate.getTime()
|
|
3632
|
-
),
|
|
3641
|
+
), v = n > 0 ? l.slice(0, n) : l;
|
|
3633
3642
|
return {
|
|
3634
3643
|
date: new Date(o),
|
|
3635
3644
|
dateKey: o,
|
|
3636
|
-
events:
|
|
3645
|
+
events: v,
|
|
3637
3646
|
hasMore: n > 0 && l.length > n
|
|
3638
3647
|
};
|
|
3639
3648
|
}).sort((o, a) => o.date.getTime() - a.date.getTime());
|
|
3640
3649
|
}
|
|
3641
|
-
function
|
|
3650
|
+
function ar(t) {
|
|
3642
3651
|
const n = We(/* @__PURE__ */ new Date()), s = ht(/* @__PURE__ */ new Date());
|
|
3643
3652
|
return t.filter((o) => o.startDate >= n && o.startDate <= s).length;
|
|
3644
3653
|
}
|
|
3645
|
-
function
|
|
3654
|
+
function Ue({ className: t }) {
|
|
3646
3655
|
return /* @__PURE__ */ e("div", { className: g("animate-pulse rounded-md bg-muted", t) });
|
|
3647
3656
|
}
|
|
3648
|
-
function
|
|
3657
|
+
function ir({ event: t, onClick: n }) {
|
|
3649
3658
|
return /* @__PURE__ */ r(
|
|
3650
3659
|
"button",
|
|
3651
3660
|
{
|
|
@@ -3666,45 +3675,45 @@ function ar({ event: t, onClick: n }) {
|
|
|
3666
3675
|
),
|
|
3667
3676
|
/* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
|
|
3668
3677
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium truncate", children: t.title }),
|
|
3669
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children:
|
|
3678
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: nr(t) })
|
|
3670
3679
|
] }),
|
|
3671
|
-
n && /* @__PURE__ */ e(
|
|
3680
|
+
n && /* @__PURE__ */ e(Zn, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
|
|
3672
3681
|
]
|
|
3673
3682
|
}
|
|
3674
3683
|
);
|
|
3675
3684
|
}
|
|
3676
|
-
function
|
|
3685
|
+
function lr({ group: t, onEventClick: n }) {
|
|
3677
3686
|
return /* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
3678
3687
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between px-2 py-1.5", children: [
|
|
3679
|
-
/* @__PURE__ */ e("h3", { className: g("text-xs font-semibold",
|
|
3688
|
+
/* @__PURE__ */ e("h3", { className: g("text-xs font-semibold", ce(t.date) && "text-primary"), children: or(t.date) }),
|
|
3680
3689
|
t.hasMore && /* @__PURE__ */ r("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
3681
3690
|
"+",
|
|
3682
3691
|
t.events.length,
|
|
3683
3692
|
" more"
|
|
3684
3693
|
] })
|
|
3685
3694
|
] }),
|
|
3686
|
-
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((s) => /* @__PURE__ */ e(
|
|
3695
|
+
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((s) => /* @__PURE__ */ e(ir, { event: s, onClick: n }, s.id)) })
|
|
3687
3696
|
] });
|
|
3688
3697
|
}
|
|
3689
|
-
function
|
|
3698
|
+
function Ar({
|
|
3690
3699
|
events: t,
|
|
3691
3700
|
isLoading: n = !1,
|
|
3692
3701
|
className: s,
|
|
3693
3702
|
daysAhead: o = 7,
|
|
3694
3703
|
maxEventsPerDay: a = 3,
|
|
3695
3704
|
onEventClick: l,
|
|
3696
|
-
onNavigateToAgenda:
|
|
3705
|
+
onNavigateToAgenda: v
|
|
3697
3706
|
}) {
|
|
3698
|
-
const [h, c] =
|
|
3707
|
+
const [h, c] = ie(!1), w = ee(() => {
|
|
3699
3708
|
const A = We(/* @__PURE__ */ new Date()), W = mt(A, o);
|
|
3700
3709
|
return t.filter((F) => F.endDate >= A && F.startDate < W);
|
|
3701
3710
|
}, [t, o]), P = ee(
|
|
3702
|
-
() =>
|
|
3711
|
+
() => sr(w, a),
|
|
3703
3712
|
[w, a]
|
|
3704
|
-
),
|
|
3713
|
+
), y = ee(() => ar(t), [t]), k = (A) => {
|
|
3705
3714
|
c(!1), l?.(A);
|
|
3706
3715
|
}, B = () => {
|
|
3707
|
-
c(!1),
|
|
3716
|
+
c(!1), v?.();
|
|
3708
3717
|
};
|
|
3709
3718
|
return /* @__PURE__ */ r(ct, { open: h, onOpenChange: c, children: [
|
|
3710
3719
|
/* @__PURE__ */ r(
|
|
@@ -3715,13 +3724,13 @@ function jr({
|
|
|
3715
3724
|
s
|
|
3716
3725
|
),
|
|
3717
3726
|
children: [
|
|
3718
|
-
/* @__PURE__ */ e(
|
|
3719
|
-
|
|
3720
|
-
|
|
3727
|
+
/* @__PURE__ */ e(Xn, { className: "h-4 w-4" }),
|
|
3728
|
+
y > 0 && /* @__PURE__ */ e(
|
|
3729
|
+
Tt,
|
|
3721
3730
|
{
|
|
3722
3731
|
variant: "destructive",
|
|
3723
3732
|
className: "absolute -right-4 -top-4 m-3 flex h-5 w-5 items-center justify-center rounded-full bg-primary p-0 text-[10px] font-medium hover:bg-primary",
|
|
3724
|
-
children:
|
|
3733
|
+
children: y > 99 ? "99+" : y
|
|
3725
3734
|
}
|
|
3726
3735
|
)
|
|
3727
3736
|
]
|
|
@@ -3731,9 +3740,9 @@ function jr({
|
|
|
3731
3740
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between border-b p-4", children: [
|
|
3732
3741
|
/* @__PURE__ */ r("div", { children: [
|
|
3733
3742
|
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Upcoming" }),
|
|
3734
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children:
|
|
3743
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: y > 0 ? `${y} event${y > 1 ? "s" : ""} today` : "No events today" })
|
|
3735
3744
|
] }),
|
|
3736
|
-
|
|
3745
|
+
v && /* @__PURE__ */ r(
|
|
3737
3746
|
"button",
|
|
3738
3747
|
{
|
|
3739
3748
|
type: "button",
|
|
@@ -3741,19 +3750,19 @@ function jr({
|
|
|
3741
3750
|
className: "text-xs text-primary hover:underline flex items-center gap-1",
|
|
3742
3751
|
children: [
|
|
3743
3752
|
"View all",
|
|
3744
|
-
/* @__PURE__ */ e(
|
|
3753
|
+
/* @__PURE__ */ e(er, { className: "size-3" })
|
|
3745
3754
|
]
|
|
3746
3755
|
}
|
|
3747
3756
|
)
|
|
3748
3757
|
] }),
|
|
3749
3758
|
/* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: n ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((A, W) => /* @__PURE__ */ r("div", { className: "flex space-x-3", children: [
|
|
3750
|
-
/* @__PURE__ */ e(
|
|
3759
|
+
/* @__PURE__ */ e(Ue, { className: "h-2 w-2 rounded-full mt-2" }),
|
|
3751
3760
|
/* @__PURE__ */ r("div", { className: "flex-1 space-y-2", children: [
|
|
3752
|
-
/* @__PURE__ */ e(
|
|
3753
|
-
/* @__PURE__ */ e(
|
|
3761
|
+
/* @__PURE__ */ e(Ue, { className: "h-4 w-full" }),
|
|
3762
|
+
/* @__PURE__ */ e(Ue, { className: "h-3 w-3/4" })
|
|
3754
3763
|
] })
|
|
3755
3764
|
] }, W)) }) : P.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
|
|
3756
|
-
/* @__PURE__ */ e(
|
|
3765
|
+
/* @__PURE__ */ e(Qn, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
|
|
3757
3766
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No upcoming events" }),
|
|
3758
3767
|
/* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground/70", children: [
|
|
3759
3768
|
"Your schedule is clear for the next ",
|
|
@@ -3761,17 +3770,17 @@ function jr({
|
|
|
3761
3770
|
" days"
|
|
3762
3771
|
] })
|
|
3763
3772
|
] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: P.map((A) => /* @__PURE__ */ e(
|
|
3764
|
-
|
|
3773
|
+
lr,
|
|
3765
3774
|
{
|
|
3766
3775
|
group: A,
|
|
3767
|
-
onEventClick:
|
|
3776
|
+
onEventClick: k
|
|
3768
3777
|
},
|
|
3769
3778
|
A.dateKey
|
|
3770
3779
|
)) }) })
|
|
3771
3780
|
] })
|
|
3772
3781
|
] });
|
|
3773
3782
|
}
|
|
3774
|
-
function
|
|
3783
|
+
function cr({ className: t }) {
|
|
3775
3784
|
return /* @__PURE__ */ r(
|
|
3776
3785
|
"svg",
|
|
3777
3786
|
{
|
|
@@ -3814,7 +3823,7 @@ function gt({ className: t }) {
|
|
|
3814
3823
|
}
|
|
3815
3824
|
);
|
|
3816
3825
|
}
|
|
3817
|
-
function
|
|
3826
|
+
function dr(t) {
|
|
3818
3827
|
const n = /* @__PURE__ */ new Date();
|
|
3819
3828
|
return n.setDate(n.getDate() + 1), t.getFullYear() === n.getFullYear() && t.getMonth() === n.getMonth() && t.getDate() === n.getDate();
|
|
3820
3829
|
}
|
|
@@ -3822,39 +3831,39 @@ function it(t) {
|
|
|
3822
3831
|
const n = t.getHours(), s = t.getMinutes(), o = n >= 12 ? "PM" : "AM";
|
|
3823
3832
|
return `${n % 12 || 12}:${s.toString().padStart(2, "0")} ${o}`;
|
|
3824
3833
|
}
|
|
3825
|
-
function
|
|
3834
|
+
function ur(t) {
|
|
3826
3835
|
return new Intl.DateTimeFormat("en-US", {
|
|
3827
3836
|
weekday: "long",
|
|
3828
3837
|
month: "short",
|
|
3829
3838
|
day: "numeric"
|
|
3830
3839
|
}).format(t);
|
|
3831
3840
|
}
|
|
3832
|
-
function
|
|
3841
|
+
function hr(t) {
|
|
3833
3842
|
const n = it(t.startDate), s = it(t.endDate);
|
|
3834
3843
|
return `${n} - ${s}`;
|
|
3835
3844
|
}
|
|
3836
|
-
function
|
|
3837
|
-
return
|
|
3845
|
+
function mr(t) {
|
|
3846
|
+
return ce(t) ? "Today" : dr(t) ? "Tomorrow" : ur(t);
|
|
3838
3847
|
}
|
|
3839
|
-
function
|
|
3848
|
+
function fr(t, n) {
|
|
3840
3849
|
const s = /* @__PURE__ */ new Map();
|
|
3841
3850
|
for (const o of t) {
|
|
3842
|
-
const a =
|
|
3851
|
+
const a = $t(o.startDate), l = s.get(a) ?? [];
|
|
3843
3852
|
l.push(o), s.set(a, l);
|
|
3844
3853
|
}
|
|
3845
3854
|
return Array.from(s.entries()).map(([o, a]) => {
|
|
3846
3855
|
const l = [...a].sort(
|
|
3847
3856
|
(h, c) => h.startDate.getTime() - c.startDate.getTime()
|
|
3848
|
-
),
|
|
3857
|
+
), v = n > 0 ? l.slice(0, n) : l;
|
|
3849
3858
|
return {
|
|
3850
3859
|
date: new Date(o),
|
|
3851
3860
|
dateKey: o,
|
|
3852
|
-
events:
|
|
3861
|
+
events: v,
|
|
3853
3862
|
hasMore: n > 0 && l.length > n
|
|
3854
3863
|
};
|
|
3855
3864
|
}).sort((o, a) => o.date.getTime() - a.date.getTime());
|
|
3856
3865
|
}
|
|
3857
|
-
function
|
|
3866
|
+
function gr({ event: t, onClick: n, compact: s }) {
|
|
3858
3867
|
return /* @__PURE__ */ r(
|
|
3859
3868
|
"button",
|
|
3860
3869
|
{
|
|
@@ -3876,7 +3885,7 @@ function fr({ event: t, onClick: n, compact: s }) {
|
|
|
3876
3885
|
),
|
|
3877
3886
|
/* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
|
|
3878
3887
|
/* @__PURE__ */ e("p", { className: g("font-medium truncate", s ? "text-xs" : "text-sm"), children: t.title }),
|
|
3879
|
-
/* @__PURE__ */ e("p", { className: g("text-muted-foreground truncate", s ? "text-[10px]" : "text-xs"), children:
|
|
3888
|
+
/* @__PURE__ */ e("p", { className: g("text-muted-foreground truncate", s ? "text-[10px]" : "text-xs"), children: hr(t) })
|
|
3880
3889
|
] }),
|
|
3881
3890
|
n && /* @__PURE__ */ e(
|
|
3882
3891
|
gt,
|
|
@@ -3888,7 +3897,7 @@ function fr({ event: t, onClick: n, compact: s }) {
|
|
|
3888
3897
|
}
|
|
3889
3898
|
);
|
|
3890
3899
|
}
|
|
3891
|
-
function
|
|
3900
|
+
function pr({
|
|
3892
3901
|
group: t,
|
|
3893
3902
|
onEventClick: n,
|
|
3894
3903
|
onViewMore: s,
|
|
@@ -3902,9 +3911,9 @@ function gr({
|
|
|
3902
3911
|
className: g(
|
|
3903
3912
|
"font-semibold",
|
|
3904
3913
|
o ? "text-xs" : "text-sm",
|
|
3905
|
-
|
|
3914
|
+
ce(t.date) && "text-primary"
|
|
3906
3915
|
),
|
|
3907
|
-
children:
|
|
3916
|
+
children: mr(t.date)
|
|
3908
3917
|
}
|
|
3909
3918
|
),
|
|
3910
3919
|
t.hasMore && s && /* @__PURE__ */ e(
|
|
@@ -3917,26 +3926,26 @@ function gr({
|
|
|
3917
3926
|
}
|
|
3918
3927
|
)
|
|
3919
3928
|
] }),
|
|
3920
|
-
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((a) => /* @__PURE__ */ e(
|
|
3929
|
+
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((a) => /* @__PURE__ */ e(gr, { event: a, onClick: n, compact: o }, a.id)) })
|
|
3921
3930
|
] });
|
|
3922
3931
|
}
|
|
3923
|
-
function
|
|
3932
|
+
function Pr({
|
|
3924
3933
|
events: t,
|
|
3925
3934
|
daysAhead: n = 7,
|
|
3926
3935
|
maxEventsPerDay: s = 3,
|
|
3927
3936
|
onEventClick: o,
|
|
3928
3937
|
onViewAll: a,
|
|
3929
3938
|
className: l,
|
|
3930
|
-
emptyState:
|
|
3939
|
+
emptyState: v,
|
|
3931
3940
|
title: h = "Upcoming",
|
|
3932
3941
|
showHeader: c = !0,
|
|
3933
3942
|
compact: w = !1
|
|
3934
3943
|
}) {
|
|
3935
|
-
const P = lt(),
|
|
3936
|
-
const H = We(
|
|
3937
|
-
return
|
|
3938
|
-
}, [B, n,
|
|
3939
|
-
() =>
|
|
3944
|
+
const P = lt(), y = P?.filteredEvents, k = P?.currentDate ?? /* @__PURE__ */ new Date(), B = t ?? y ?? [], A = ee(() => {
|
|
3945
|
+
const H = We(k), C = new Date(H);
|
|
3946
|
+
return C.setDate(C.getDate() + n), B.filter((O) => O.endDate >= H && O.startDate < C);
|
|
3947
|
+
}, [B, n, k]), W = ee(
|
|
3948
|
+
() => fr(A, s),
|
|
3940
3949
|
[A, s]
|
|
3941
3950
|
), F = A.length;
|
|
3942
3951
|
return W.length === 0 ? /* @__PURE__ */ r("div", { className: g("rounded-lg border bg-card", l), children: [
|
|
@@ -3957,9 +3966,9 @@ function Ar({
|
|
|
3957
3966
|
"flex flex-col items-center justify-center text-center",
|
|
3958
3967
|
w ? "py-6 px-4" : "py-10 px-6"
|
|
3959
3968
|
),
|
|
3960
|
-
children:
|
|
3969
|
+
children: v ?? /* @__PURE__ */ r(ye, { children: [
|
|
3961
3970
|
/* @__PURE__ */ e(
|
|
3962
|
-
|
|
3971
|
+
cr,
|
|
3963
3972
|
{
|
|
3964
3973
|
className: g("text-muted-foreground/50 mb-2", w ? "size-8" : "size-10")
|
|
3965
3974
|
}
|
|
@@ -4016,11 +4025,11 @@ function Ar({
|
|
|
4016
4025
|
w ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
|
|
4017
4026
|
),
|
|
4018
4027
|
children: W.map((H) => /* @__PURE__ */ e(
|
|
4019
|
-
|
|
4028
|
+
pr,
|
|
4020
4029
|
{
|
|
4021
4030
|
group: H,
|
|
4022
4031
|
onEventClick: o,
|
|
4023
|
-
onViewMore: a ? (
|
|
4032
|
+
onViewMore: a ? (C) => a(C) : void 0,
|
|
4024
4033
|
compact: w
|
|
4025
4034
|
},
|
|
4026
4035
|
H.dateKey
|
|
@@ -4030,20 +4039,20 @@ function Ar({
|
|
|
4030
4039
|
] });
|
|
4031
4040
|
}
|
|
4032
4041
|
export {
|
|
4033
|
-
|
|
4034
|
-
|
|
4035
|
-
|
|
4036
|
-
|
|
4037
|
-
|
|
4038
|
-
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
|
|
4042
|
-
|
|
4043
|
-
|
|
4044
|
-
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4042
|
+
Ar as A,
|
|
4043
|
+
Lr as B,
|
|
4044
|
+
Cr as C,
|
|
4045
|
+
Hr as D,
|
|
4046
|
+
Dr as E,
|
|
4047
|
+
Mr as I,
|
|
4048
|
+
zr as S,
|
|
4049
|
+
Se as T,
|
|
4050
|
+
jr as U,
|
|
4051
|
+
Sr as V,
|
|
4052
|
+
Tr as W,
|
|
4053
|
+
xn as Y,
|
|
4054
|
+
Pr as a,
|
|
4055
|
+
Ir as b,
|
|
4056
|
+
Er as c
|
|
4048
4057
|
};
|
|
4049
|
-
//# sourceMappingURL=agenda-widget-
|
|
4058
|
+
//# sourceMappingURL=agenda-widget-nh_h1yy6.js.map
|