@innosolutions/inno-calendar 1.0.35 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agenda-widget-CyRPG-1p.js → agenda-widget-BKIaXFpN.js} +723 -745
- package/dist/agenda-widget-BKIaXFpN.js.map +1 -0
- package/dist/agenda-widget-BtTvMs9i.cjs +2 -0
- package/dist/agenda-widget-BtTvMs9i.cjs.map +1 -0
- package/dist/components/event/event-card.d.ts +1 -0
- package/dist/components/event/event-card.d.ts.map +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/components/inno-calendar.d.ts.map +1 -1
- package/dist/components/views/timeline-view.d.ts.map +1 -1
- package/dist/core/utils/position-utils.d.ts +5 -1
- package/dist/core/utils/position-utils.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/presets/index.cjs +1 -1
- package/dist/presets/index.mjs +1 -1
- package/dist/{tailwind-calendar-BaJAw6io.cjs → tailwind-calendar-3IAm_TdP.cjs} +2 -2
- package/dist/{tailwind-calendar-BaJAw6io.cjs.map → tailwind-calendar-3IAm_TdP.cjs.map} +1 -1
- package/dist/{tailwind-calendar-D-8ALvNh.js → tailwind-calendar-B3HuJrjX.js} +2 -2
- package/dist/{tailwind-calendar-D-8ALvNh.js.map → tailwind-calendar-B3HuJrjX.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.mjs +334 -326
- package/dist/utils.mjs.map +1 -1
- package/dist/{week-view-5nw-Hvod.js → week-view-1EUqFIRS.js} +433 -417
- package/dist/week-view-1EUqFIRS.js.map +1 -0
- package/dist/{week-view-C0iWG7_6.cjs → week-view-DXilsY50.cjs} +3 -3
- package/dist/week-view-DXilsY50.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/agenda-widget-CuQxfYVI.cjs +0 -2
- package/dist/agenda-widget-CuQxfYVI.cjs.map +0 -1
- package/dist/agenda-widget-CyRPG-1p.js.map +0 -1
- package/dist/week-view-5nw-Hvod.js.map +0 -1
- package/dist/week-view-C0iWG7_6.cjs.map +0 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { jsx as e, jsxs as n, Fragment as
|
|
2
|
-
import { o as
|
|
3
|
-
import { useCallback as
|
|
1
|
+
import { jsx as e, jsxs as n, Fragment as oe } from "react/jsx-runtime";
|
|
2
|
+
import { o as Oe, c as Ke, C as qe, I as Je, j as Xe } from "./use-calendar-DR2emWYC.js";
|
|
3
|
+
import { useCallback as se, useState as ae, useEffect as he, forwardRef as fe, useRef as ke, useMemo as O, useLayoutEffect as Qe, useImperativeHandle as Ze } from "react";
|
|
4
4
|
import { c as m } from "./index-DtaLkIY8.js";
|
|
5
|
-
import { P as
|
|
6
|
-
import { D as
|
|
7
|
-
import { isToday as
|
|
8
|
-
function
|
|
5
|
+
import { P as _e, h as Pe, g as Re, l as Z, p as et, q as tt, B as ie, r as rt, s as Ce, j as ee, m as te, k as re, c as nt, C as ot, M as De, A as st, W as at, b as it, t as lt } from "./week-view-1EUqFIRS.js";
|
|
6
|
+
import { D as ct, S as dt } from "./slot-selection-context-D2eu2o-7.js";
|
|
7
|
+
import { isToday as q, startOfDay as ge, endOfDay as Ve, getYearMonths as ut, generateMonthGrid as ht, getEventsForDay as mt, addDays as Ue, formatDateISO as ft } from "./utils.mjs";
|
|
8
|
+
function gt({ view: t, className: r = "" }) {
|
|
9
9
|
return /* @__PURE__ */ e(
|
|
10
10
|
"div",
|
|
11
11
|
{
|
|
@@ -29,10 +29,10 @@ function yt({ view: t, className: r = "" }) {
|
|
|
29
29
|
}
|
|
30
30
|
);
|
|
31
31
|
}
|
|
32
|
-
function
|
|
33
|
-
return /* @__PURE__ */ e(
|
|
32
|
+
function Me({ view: t, className: r }) {
|
|
33
|
+
return /* @__PURE__ */ e(gt, { view: t, className: r });
|
|
34
34
|
}
|
|
35
|
-
function
|
|
35
|
+
function Vr(t) {
|
|
36
36
|
const {
|
|
37
37
|
events: r,
|
|
38
38
|
resources: o,
|
|
@@ -42,19 +42,19 @@ function Jr(t) {
|
|
|
42
42
|
initialFilters: x,
|
|
43
43
|
preferences: g,
|
|
44
44
|
locale: c,
|
|
45
|
-
slots:
|
|
45
|
+
slots: d,
|
|
46
46
|
renderEvent: w,
|
|
47
47
|
onViewChange: C,
|
|
48
48
|
onDateChange: z,
|
|
49
|
-
onEventClick:
|
|
50
|
-
onSlotSelect:
|
|
49
|
+
onEventClick: I,
|
|
50
|
+
onSlotSelect: H,
|
|
51
51
|
onFiltersChange: N,
|
|
52
52
|
className: p,
|
|
53
53
|
children: D
|
|
54
|
-
} = t, k =
|
|
54
|
+
} = t, k = Oe();
|
|
55
55
|
if (k)
|
|
56
|
-
return /* @__PURE__ */ e("div", { className: p, style: { position: "relative" }, children: D ?? /* @__PURE__ */ e(
|
|
57
|
-
const
|
|
56
|
+
return /* @__PURE__ */ e("div", { className: p, style: { position: "relative" }, children: D ?? /* @__PURE__ */ e(Me, { view: k.view, className: p }) });
|
|
57
|
+
const S = Ke({
|
|
58
58
|
events: r,
|
|
59
59
|
resources: o,
|
|
60
60
|
scheduleTypes: s,
|
|
@@ -65,13 +65,13 @@ function Jr(t) {
|
|
|
65
65
|
locale: c,
|
|
66
66
|
onViewChange: C,
|
|
67
67
|
onDateChange: z,
|
|
68
|
-
onEventClick:
|
|
69
|
-
onSlotSelect:
|
|
68
|
+
onEventClick: I,
|
|
69
|
+
onSlotSelect: H,
|
|
70
70
|
onFiltersChange: N
|
|
71
71
|
});
|
|
72
|
-
return /* @__PURE__ */ e(
|
|
72
|
+
return /* @__PURE__ */ e(qe, { value: S, children: /* @__PURE__ */ e("div", { className: p, style: { position: "relative" }, children: D ?? /* @__PURE__ */ e(Me, { view: S.view, className: p }) }) });
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function xt({ className: t }) {
|
|
75
75
|
return /* @__PURE__ */ n(
|
|
76
76
|
"svg",
|
|
77
77
|
{
|
|
@@ -90,7 +90,7 @@ function kt({ className: t }) {
|
|
|
90
90
|
}
|
|
91
91
|
);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function Ye({ className: t }) {
|
|
94
94
|
return /* @__PURE__ */ n(
|
|
95
95
|
"svg",
|
|
96
96
|
{
|
|
@@ -112,7 +112,7 @@ function Je({ className: t }) {
|
|
|
112
112
|
}
|
|
113
113
|
);
|
|
114
114
|
}
|
|
115
|
-
function
|
|
115
|
+
function me({ className: t }) {
|
|
116
116
|
return /* @__PURE__ */ n(
|
|
117
117
|
"svg",
|
|
118
118
|
{
|
|
@@ -131,7 +131,7 @@ function xe({ className: t }) {
|
|
|
131
131
|
}
|
|
132
132
|
);
|
|
133
133
|
}
|
|
134
|
-
function
|
|
134
|
+
function pt({ className: t }) {
|
|
135
135
|
return /* @__PURE__ */ n(
|
|
136
136
|
"svg",
|
|
137
137
|
{
|
|
@@ -150,7 +150,7 @@ function Nt({ className: t }) {
|
|
|
150
150
|
}
|
|
151
151
|
);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function de({ className: t }) {
|
|
154
154
|
return /* @__PURE__ */ e(
|
|
155
155
|
"svg",
|
|
156
156
|
{
|
|
@@ -166,7 +166,7 @@ function me({ className: t }) {
|
|
|
166
166
|
}
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function vt({ className: t }) {
|
|
170
170
|
return /* @__PURE__ */ n(
|
|
171
171
|
"svg",
|
|
172
172
|
{
|
|
@@ -185,7 +185,7 @@ function Ct({ className: t }) {
|
|
|
185
185
|
}
|
|
186
186
|
);
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function wt({ className: t }) {
|
|
189
189
|
return /* @__PURE__ */ e(
|
|
190
190
|
"svg",
|
|
191
191
|
{
|
|
@@ -201,7 +201,7 @@ function Dt({ className: t }) {
|
|
|
201
201
|
}
|
|
202
202
|
);
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function bt({ className: t }) {
|
|
205
205
|
return /* @__PURE__ */ n(
|
|
206
206
|
"svg",
|
|
207
207
|
{
|
|
@@ -222,7 +222,7 @@ function Mt({ className: t }) {
|
|
|
222
222
|
}
|
|
223
223
|
);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function yt({ className: t }) {
|
|
226
226
|
return /* @__PURE__ */ n(
|
|
227
227
|
"svg",
|
|
228
228
|
{
|
|
@@ -241,7 +241,7 @@ function Et({ className: t }) {
|
|
|
241
241
|
}
|
|
242
242
|
);
|
|
243
243
|
}
|
|
244
|
-
function
|
|
244
|
+
function kt({ className: t }) {
|
|
245
245
|
return /* @__PURE__ */ n(
|
|
246
246
|
"svg",
|
|
247
247
|
{
|
|
@@ -262,7 +262,7 @@ function St({ className: t }) {
|
|
|
262
262
|
}
|
|
263
263
|
);
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function Nt({ className: t }) {
|
|
266
266
|
return /* @__PURE__ */ n(
|
|
267
267
|
"svg",
|
|
268
268
|
{
|
|
@@ -284,7 +284,7 @@ function zt({ className: t }) {
|
|
|
284
284
|
}
|
|
285
285
|
);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function le({ className: t }) {
|
|
288
288
|
return /* @__PURE__ */ e(
|
|
289
289
|
"svg",
|
|
290
290
|
{
|
|
@@ -300,7 +300,7 @@ function ue({ className: t }) {
|
|
|
300
300
|
}
|
|
301
301
|
);
|
|
302
302
|
}
|
|
303
|
-
const
|
|
303
|
+
const Ct = {
|
|
304
304
|
edit: "Edit",
|
|
305
305
|
delete: "Delete",
|
|
306
306
|
cancel: "Cancel Event",
|
|
@@ -325,9 +325,9 @@ const Ht = {
|
|
|
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: r, children: o, className: s, variant: a = "ghost", ...i }, x) => /* @__PURE__ */ n(
|
|
330
|
-
/* @__PURE__ */ e(
|
|
328
|
+
}, ue = fe(
|
|
329
|
+
({ onClick: t, label: r, children: o, className: s, variant: a = "ghost", ...i }, x) => /* @__PURE__ */ n(ee, { children: [
|
|
330
|
+
/* @__PURE__ */ e(te, { asChild: !0, children: /* @__PURE__ */ e(
|
|
331
331
|
"button",
|
|
332
332
|
{
|
|
333
333
|
type: "button",
|
|
@@ -344,12 +344,12 @@ const Ht = {
|
|
|
344
344
|
children: o
|
|
345
345
|
}
|
|
346
346
|
) }),
|
|
347
|
-
/* @__PURE__ */ e(
|
|
347
|
+
/* @__PURE__ */ e(re, { side: "bottom", className: "text-xs", children: r })
|
|
348
348
|
] })
|
|
349
349
|
);
|
|
350
|
-
|
|
351
|
-
function
|
|
352
|
-
const [i, x] =
|
|
350
|
+
ue.displayName = "IconButton";
|
|
351
|
+
function Dt({ src: t, alt: r, initials: o, className: s, isClient: a }) {
|
|
352
|
+
const [i, x] = ae(!1);
|
|
353
353
|
return /* @__PURE__ */ e(
|
|
354
354
|
"div",
|
|
355
355
|
{
|
|
@@ -378,12 +378,12 @@ function Lt({ src: t, alt: r, initials: o, className: s, isClient: a }) {
|
|
|
378
378
|
}
|
|
379
379
|
);
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function Se({
|
|
382
382
|
participant: t,
|
|
383
383
|
isEventCanceled: r = !1,
|
|
384
384
|
labels: o
|
|
385
385
|
}) {
|
|
386
|
-
const s = t.name || "Unknown", a = s.split(" ").map((z) => z[0]).join("").toUpperCase().slice(0, 2), i = t.isOrganizer ?? !1, x = t.isConfirmed, g = x === !0, c = x === !1,
|
|
386
|
+
const s = t.name || "Unknown", a = s.split(" ").map((z) => z[0]).join("").toUpperCase().slice(0, 2), i = t.isOrganizer ?? !1, x = t.isConfirmed, g = x === !0, c = x === !1, d = t.isClient ?? !1, w = t.profilePicture || t.avatar, C = r;
|
|
387
387
|
return /* @__PURE__ */ n(
|
|
388
388
|
"div",
|
|
389
389
|
{
|
|
@@ -394,16 +394,16 @@ function Le({
|
|
|
394
394
|
children: [
|
|
395
395
|
/* @__PURE__ */ n("div", { className: "relative", children: [
|
|
396
396
|
/* @__PURE__ */ e(
|
|
397
|
-
|
|
397
|
+
Dt,
|
|
398
398
|
{
|
|
399
399
|
src: w,
|
|
400
400
|
alt: s,
|
|
401
401
|
initials: a,
|
|
402
|
-
isClient:
|
|
402
|
+
isClient: d,
|
|
403
403
|
className: m(C && "grayscale")
|
|
404
404
|
}
|
|
405
405
|
),
|
|
406
|
-
C || 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(
|
|
406
|
+
C || 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(me, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : g ? /* @__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(de, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
|
|
407
407
|
] }),
|
|
408
408
|
/* @__PURE__ */ n("div", { className: "!h-fit min-w-0 gap-0", children: [
|
|
409
409
|
/* @__PURE__ */ e("div", { className: "gap-0", children: /* @__PURE__ */ e(
|
|
@@ -416,26 +416,26 @@ function Le({
|
|
|
416
416
|
children: s
|
|
417
417
|
}
|
|
418
418
|
) }),
|
|
419
|
-
|
|
419
|
+
d && /* @__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: o.client }),
|
|
420
420
|
i && !C && /* @__PURE__ */ e("div", { className: "text-xs text-zinc-500", children: o.organizer })
|
|
421
421
|
] })
|
|
422
422
|
]
|
|
423
423
|
}
|
|
424
424
|
);
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function Mt({
|
|
427
427
|
open: t,
|
|
428
428
|
onOpenChange: r,
|
|
429
429
|
title: o,
|
|
430
430
|
children: s
|
|
431
431
|
}) {
|
|
432
|
-
return
|
|
432
|
+
return he(() => {
|
|
433
433
|
if (!t) return;
|
|
434
434
|
const a = (i) => {
|
|
435
435
|
i.key === "Escape" && r(!1);
|
|
436
436
|
};
|
|
437
437
|
return document.addEventListener("keydown", a), () => document.removeEventListener("keydown", a);
|
|
438
|
-
}, [t, r]),
|
|
438
|
+
}, [t, r]), he(() => (t ? document.body.style.overflow = "hidden" : document.body.style.overflow = "", () => {
|
|
439
439
|
document.body.style.overflow = "";
|
|
440
440
|
}), [t]), t ? /* @__PURE__ */ n("div", { className: "fixed inset-0 z-50", children: [
|
|
441
441
|
/* @__PURE__ */ e(
|
|
@@ -454,7 +454,7 @@ function Tt({
|
|
|
454
454
|
] }) })
|
|
455
455
|
] }) : null;
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function St({
|
|
458
458
|
open: t,
|
|
459
459
|
onOpenChange: r,
|
|
460
460
|
title: o,
|
|
@@ -480,7 +480,7 @@ function It({
|
|
|
480
480
|
/* @__PURE__ */ e("p", { className: "mt-2 text-sm text-zinc-600 dark:text-zinc-400", children: s }),
|
|
481
481
|
/* @__PURE__ */ n("div", { className: "mt-4 flex justify-end gap-3", children: [
|
|
482
482
|
/* @__PURE__ */ e(
|
|
483
|
-
|
|
483
|
+
ie,
|
|
484
484
|
{
|
|
485
485
|
variant: "outline",
|
|
486
486
|
size: "sm",
|
|
@@ -489,15 +489,15 @@ function It({
|
|
|
489
489
|
}
|
|
490
490
|
),
|
|
491
491
|
/* @__PURE__ */ n(
|
|
492
|
-
|
|
492
|
+
ie,
|
|
493
493
|
{
|
|
494
494
|
variant: "destructive",
|
|
495
495
|
size: "sm",
|
|
496
496
|
onClick: x,
|
|
497
497
|
disabled: g,
|
|
498
498
|
children: [
|
|
499
|
-
g && /* @__PURE__ */ e(
|
|
500
|
-
/* @__PURE__ */ e(
|
|
499
|
+
g && /* @__PURE__ */ e(le, { className: "h-4 w-4 mr-2" }),
|
|
500
|
+
/* @__PURE__ */ e(Ye, { className: "h-4 w-4 mr-2" }),
|
|
501
501
|
i
|
|
502
502
|
]
|
|
503
503
|
}
|
|
@@ -506,14 +506,14 @@ function It({
|
|
|
506
506
|
] }) })
|
|
507
507
|
] }) : null;
|
|
508
508
|
}
|
|
509
|
-
function
|
|
509
|
+
function Et(t, r) {
|
|
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 zt(t, r) {
|
|
517
517
|
const o = {
|
|
518
518
|
hour: "2-digit",
|
|
519
519
|
minute: "2-digit",
|
|
@@ -521,7 +521,7 @@ function Wt(t, r) {
|
|
|
521
521
|
};
|
|
522
522
|
return `${t.toLocaleTimeString(void 0, o)} – ${r.toLocaleTimeString(void 0, o)}`;
|
|
523
523
|
}
|
|
524
|
-
function
|
|
524
|
+
function Lt(t) {
|
|
525
525
|
return t.toLocaleDateString(void 0, {
|
|
526
526
|
day: "2-digit",
|
|
527
527
|
month: "short",
|
|
@@ -530,15 +530,15 @@ function At(t) {
|
|
|
530
530
|
minute: "2-digit"
|
|
531
531
|
});
|
|
532
532
|
}
|
|
533
|
-
function
|
|
534
|
-
const [r, o] =
|
|
535
|
-
return
|
|
533
|
+
function Ht(t) {
|
|
534
|
+
const [r, o] = ae(() => typeof window < "u" ? window.matchMedia(t).matches : !1);
|
|
535
|
+
return he(() => {
|
|
536
536
|
if (typeof window > "u") return;
|
|
537
537
|
const s = window.matchMedia(t), a = (i) => o(i.matches);
|
|
538
538
|
return s.addEventListener("change", a), () => s.removeEventListener("change", a);
|
|
539
539
|
}, [t]), r;
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function Ee({
|
|
542
542
|
event: t,
|
|
543
543
|
labels: r,
|
|
544
544
|
isLoading: o,
|
|
@@ -548,55 +548,55 @@ function Te({
|
|
|
548
548
|
onCancel: x,
|
|
549
549
|
onAccept: g,
|
|
550
550
|
onDecline: c,
|
|
551
|
-
onConfirmMeeting:
|
|
551
|
+
onConfirmMeeting: d,
|
|
552
552
|
canEdit: w = !0,
|
|
553
553
|
canDelete: C = !1,
|
|
554
554
|
canCancel: z = !0,
|
|
555
|
-
isCurrentUserParticipant:
|
|
556
|
-
isCurrentUserClient:
|
|
555
|
+
isCurrentUserParticipant: I = !1,
|
|
556
|
+
isCurrentUserClient: H = !1,
|
|
557
557
|
currentUserAcceptStatus: N,
|
|
558
558
|
isAcceptLoading: p = !1,
|
|
559
559
|
isDeclineLoading: D = !1,
|
|
560
560
|
isConfirmLoading: k = !1,
|
|
561
|
-
isDeleteLoading:
|
|
562
|
-
renderParticipant:
|
|
561
|
+
isDeleteLoading: S = !1,
|
|
562
|
+
renderParticipant: T,
|
|
563
563
|
renderHeaderActions: G,
|
|
564
|
-
renderCancelReason:
|
|
565
|
-
renderDeleteConfirmation:
|
|
566
|
-
formatDate:
|
|
567
|
-
formatTimeRange:
|
|
564
|
+
renderCancelReason: V,
|
|
565
|
+
renderDeleteConfirmation: B,
|
|
566
|
+
formatDate: j = Et,
|
|
567
|
+
formatTimeRange: P = zt
|
|
568
568
|
}) {
|
|
569
|
-
const [$,
|
|
569
|
+
const [$, W] = ae(!1), U = !(t.isCanceled || t.meetingTookPlace), f = t.isRecurring ?? !1, l = t.participantDetails, h = t.participantsNames || [], v = l && l.length > 0, b = N === !0, y = N === !1, L = I && !H && U, M = v ? l.filter((R) => R.isConfirmed).length : t.isAccepted ? h.length : 0, _ = v ? l.length : h.length, J = t.scheduleTypeColor || t.hexColor || "#039BE5", K = se(() => t.startDate ? j(t.startDate) : r.noDateProvided, [t.startDate, j, r.noDateProvided]), u = se(() => t.startDate && t.endDate ? P(t.startDate, t.endDate) : null, [t.startDate, t.endDate, P]), E = () => {
|
|
570
570
|
s(), a?.(t);
|
|
571
|
-
},
|
|
571
|
+
}, A = () => {
|
|
572
572
|
s(), x?.(t);
|
|
573
|
-
},
|
|
574
|
-
|
|
575
|
-
},
|
|
576
|
-
i?.(t),
|
|
573
|
+
}, F = () => {
|
|
574
|
+
W(!0);
|
|
575
|
+
}, Y = () => {
|
|
576
|
+
i?.(t), W(!1);
|
|
577
577
|
};
|
|
578
|
-
return o ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(
|
|
578
|
+
return o ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(le, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ n(Z, { delayDuration: 300, children: [
|
|
579
579
|
/* @__PURE__ */ n("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: G ? G({ onClose: s }) : /* @__PURE__ */ n(
|
|
581
|
-
U && w && a && /* @__PURE__ */ e(
|
|
582
|
-
U && z && x && /* @__PURE__ */ e(
|
|
580
|
+
/* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: G ? G({ onClose: s }) : /* @__PURE__ */ n(oe, { children: [
|
|
581
|
+
U && w && a && /* @__PURE__ */ e(ue, { onClick: E, label: r.edit, children: /* @__PURE__ */ e(xt, { className: "h-[18px] w-[18px]" }) }),
|
|
582
|
+
U && z && x && /* @__PURE__ */ e(ue, { onClick: A, label: r.cancel, children: /* @__PURE__ */ e(pt, { className: "h-[18px] w-[18px]" }) }),
|
|
583
583
|
C && i && /* @__PURE__ */ e(
|
|
584
|
-
|
|
584
|
+
ue,
|
|
585
585
|
{
|
|
586
|
-
onClick:
|
|
586
|
+
onClick: F,
|
|
587
587
|
label: r.delete,
|
|
588
588
|
variant: "destructive",
|
|
589
|
-
children: /* @__PURE__ */ e(
|
|
589
|
+
children: /* @__PURE__ */ e(Ye, { className: "h-[18px] w-[18px]" })
|
|
590
590
|
}
|
|
591
591
|
),
|
|
592
|
-
/* @__PURE__ */ e(
|
|
592
|
+
/* @__PURE__ */ e(ue, { onClick: s, label: r.close, children: /* @__PURE__ */ e(me, { className: "h-[18px] w-[18px]" }) })
|
|
593
593
|
] }) }),
|
|
594
594
|
/* @__PURE__ */ e("div", { children: /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
|
|
595
595
|
/* @__PURE__ */ e(
|
|
596
596
|
"div",
|
|
597
597
|
{
|
|
598
598
|
className: "w-4 h-4 rounded mt-1 shrink-0",
|
|
599
|
-
style: { backgroundColor:
|
|
599
|
+
style: { backgroundColor: J }
|
|
600
600
|
}
|
|
601
601
|
),
|
|
602
602
|
/* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
|
|
@@ -612,25 +612,25 @@ function Te({
|
|
|
612
612
|
}
|
|
613
613
|
),
|
|
614
614
|
t.meetingTookPlace && /* @__PURE__ */ n("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(vt, { className: "h-3 w-3" }),
|
|
616
616
|
r.completed
|
|
617
617
|
] }),
|
|
618
618
|
t.isCanceled && /* @__PURE__ */ n("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: [
|
|
619
|
-
/* @__PURE__ */ e(
|
|
619
|
+
/* @__PURE__ */ e(me, { className: "h-3 w-3" }),
|
|
620
620
|
r.canceled
|
|
621
621
|
] })
|
|
622
622
|
] }),
|
|
623
623
|
/* @__PURE__ */ n("div", { className: "mt-1 text-sm text-zinc-600 dark:text-zinc-400", children: [
|
|
624
624
|
/* @__PURE__ */ e("span", { children: K() }),
|
|
625
|
-
|
|
625
|
+
u() && /* @__PURE__ */ n(oe, { children: [
|
|
626
626
|
/* @__PURE__ */ e("span", { className: "mx-1.5", children: "·" }),
|
|
627
|
-
/* @__PURE__ */ e("span", { children:
|
|
627
|
+
/* @__PURE__ */ e("span", { children: u() })
|
|
628
628
|
] })
|
|
629
629
|
] }),
|
|
630
630
|
f && t.recurrenceSummary && /* @__PURE__ */ e("div", { className: "text-sm text-zinc-500 dark:text-zinc-500", children: t.recurrenceSummary })
|
|
631
631
|
] })
|
|
632
632
|
] }) }),
|
|
633
|
-
t.isCanceled && /* @__PURE__ */ e("div", { className: "mx-4 p-3 rounded-lg bg-red-50 dark:bg-red-950/30", children:
|
|
633
|
+
t.isCanceled && /* @__PURE__ */ e("div", { className: "mx-4 p-3 rounded-lg bg-red-50 dark:bg-red-950/30", children: V ? V(t) : /* @__PURE__ */ e("div", { className: "flex items-start gap-0", children: /* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
|
|
634
634
|
/* @__PURE__ */ e("div", { className: "text-sm font-medium text-red-700 dark:text-red-400", children: r.cancellationNote }),
|
|
635
635
|
t.cancelReason && /* @__PURE__ */ n("div", { className: "mt-1 text-sm text-red-600/80 dark:text-red-400/80 italic", children: [
|
|
636
636
|
'"',
|
|
@@ -640,24 +640,24 @@ function Te({
|
|
|
640
640
|
t.canceledDate && /* @__PURE__ */ n("div", { className: "mt-1.5 text-xs text-red-500/70 dark:text-red-400/60", children: [
|
|
641
641
|
r.canceledOn,
|
|
642
642
|
" ",
|
|
643
|
-
|
|
643
|
+
Lt(t.canceledDate)
|
|
644
644
|
] })
|
|
645
645
|
] }) }) }),
|
|
646
646
|
/* @__PURE__ */ n("div", { className: "space-y-0.5", children: [
|
|
647
647
|
t.address && /* @__PURE__ */ n("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
|
(v || h.length > 0) && /* @__PURE__ */ n("div", { className: "flex items-start gap-2 py-0", children: [
|
|
652
|
-
/* @__PURE__ */ e(
|
|
652
|
+
/* @__PURE__ */ e(bt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
|
|
653
653
|
/* @__PURE__ */ n("div", { className: "flex-1", children: [
|
|
654
654
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-0", children: [
|
|
655
655
|
/* @__PURE__ */ n("span", { className: "text-sm text-zinc-900 dark:text-zinc-100 font-medium", children: [
|
|
656
|
-
|
|
656
|
+
_,
|
|
657
657
|
" ",
|
|
658
|
-
|
|
658
|
+
_ !== 1 ? r.guests : r.guest
|
|
659
659
|
] }),
|
|
660
|
-
|
|
660
|
+
_ > 0 && /* @__PURE__ */ n("span", { className: "text-xs text-zinc-500", children: [
|
|
661
661
|
"(",
|
|
662
662
|
M,
|
|
663
663
|
" ",
|
|
@@ -667,37 +667,37 @@ function Te({
|
|
|
667
667
|
] }),
|
|
668
668
|
/* @__PURE__ */ n("div", { className: "mt-2 space-y-2", children: [
|
|
669
669
|
v ? l.slice(0, 6).map(
|
|
670
|
-
(
|
|
671
|
-
|
|
670
|
+
(R, X) => T ? T(R, X) : /* @__PURE__ */ e(
|
|
671
|
+
Se,
|
|
672
672
|
{
|
|
673
|
-
participant:
|
|
673
|
+
participant: R,
|
|
674
674
|
isEventCanceled: t.isCanceled,
|
|
675
675
|
labels: r
|
|
676
676
|
},
|
|
677
|
-
|
|
677
|
+
R.id
|
|
678
678
|
)
|
|
679
|
-
) : h.slice(0, 6).map((
|
|
680
|
-
const
|
|
681
|
-
id: String(
|
|
682
|
-
name:
|
|
679
|
+
) : h.slice(0, 6).map((R, X) => {
|
|
680
|
+
const Ne = {
|
|
681
|
+
id: String(X),
|
|
682
|
+
name: R,
|
|
683
683
|
email: "",
|
|
684
684
|
isConfirmed: t.isAccepted,
|
|
685
|
-
isOrganizer:
|
|
685
|
+
isOrganizer: X === 0,
|
|
686
686
|
isClient: !1
|
|
687
687
|
};
|
|
688
|
-
return
|
|
689
|
-
|
|
688
|
+
return T ? T(Ne, X) : /* @__PURE__ */ e(
|
|
689
|
+
Se,
|
|
690
690
|
{
|
|
691
|
-
participant:
|
|
691
|
+
participant: Ne,
|
|
692
692
|
isEventCanceled: t.isCanceled,
|
|
693
693
|
labels: r
|
|
694
694
|
},
|
|
695
|
-
|
|
695
|
+
R
|
|
696
696
|
);
|
|
697
697
|
}),
|
|
698
|
-
|
|
698
|
+
_ > 6 && /* @__PURE__ */ n("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
|
|
699
699
|
"+",
|
|
700
|
-
|
|
700
|
+
_ - 6,
|
|
701
701
|
" ",
|
|
702
702
|
r.more
|
|
703
703
|
] })
|
|
@@ -705,19 +705,19 @@ function Te({
|
|
|
705
705
|
] })
|
|
706
706
|
] }),
|
|
707
707
|
t.description && /* @__PURE__ */ n("div", { className: "flex items-start gap-2", children: [
|
|
708
|
-
/* @__PURE__ */ e(
|
|
708
|
+
/* @__PURE__ */ e(Nt, { 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__ */ n("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: v && l.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: v && l.find((R) => R.isOrganizer)?.name || h[0] || "Calendar" })
|
|
714
714
|
] })
|
|
715
715
|
] }),
|
|
716
|
-
|
|
717
|
-
f ? /* @__PURE__ */ n(
|
|
718
|
-
/* @__PURE__ */ e(
|
|
716
|
+
L && g && c && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
717
|
+
f ? /* @__PURE__ */ n(et, { children: [
|
|
718
|
+
/* @__PURE__ */ e(tt, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex", children: [
|
|
719
719
|
/* @__PURE__ */ e(
|
|
720
|
-
|
|
720
|
+
ie,
|
|
721
721
|
{
|
|
722
722
|
size: "sm",
|
|
723
723
|
variant: "outline",
|
|
@@ -725,18 +725,18 @@ function Te({
|
|
|
725
725
|
"rounded-r-none gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
|
|
726
726
|
b && "!bg-green-700 !text-white hover:!bg-green-700"
|
|
727
727
|
),
|
|
728
|
-
onClick: (
|
|
729
|
-
|
|
728
|
+
onClick: (R) => {
|
|
729
|
+
R.stopPropagation(), b || g(t);
|
|
730
730
|
},
|
|
731
731
|
disabled: p,
|
|
732
|
-
children: p ? /* @__PURE__ */ e(
|
|
733
|
-
b && /* @__PURE__ */ e(
|
|
732
|
+
children: p ? /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(oe, { children: [
|
|
733
|
+
b && /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5" }),
|
|
734
734
|
r.going
|
|
735
735
|
] })
|
|
736
736
|
}
|
|
737
737
|
),
|
|
738
738
|
/* @__PURE__ */ e(
|
|
739
|
-
|
|
739
|
+
ie,
|
|
740
740
|
{
|
|
741
741
|
size: "sm",
|
|
742
742
|
variant: "outline",
|
|
@@ -744,13 +744,13 @@ function Te({
|
|
|
744
744
|
"rounded-l-none px-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
|
|
745
745
|
b && "!bg-green-700 !text-white hover:!bg-green-700"
|
|
746
746
|
),
|
|
747
|
-
children: /* @__PURE__ */ e(
|
|
747
|
+
children: /* @__PURE__ */ e(wt, { className: "h-3.5 w-3.5" })
|
|
748
748
|
}
|
|
749
749
|
)
|
|
750
750
|
] }) }),
|
|
751
|
-
/* @__PURE__ */ n(
|
|
751
|
+
/* @__PURE__ */ n(rt, { align: "start", children: [
|
|
752
752
|
/* @__PURE__ */ n(
|
|
753
|
-
|
|
753
|
+
Ce,
|
|
754
754
|
{
|
|
755
755
|
className: m(
|
|
756
756
|
"gap-1.5 h-8 !border-none !bg-green-50 text-green-800 hover:!bg-green-100",
|
|
@@ -758,18 +758,18 @@ function Te({
|
|
|
758
758
|
),
|
|
759
759
|
onClick: () => g(t),
|
|
760
760
|
children: [
|
|
761
|
-
/* @__PURE__ */ e(
|
|
761
|
+
/* @__PURE__ */ e(de, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
|
|
762
762
|
r.acceptThisEvent
|
|
763
763
|
]
|
|
764
764
|
}
|
|
765
765
|
),
|
|
766
|
-
/* @__PURE__ */ n(
|
|
767
|
-
/* @__PURE__ */ e(
|
|
766
|
+
/* @__PURE__ */ n(Ce, { onClick: () => g(t), children: [
|
|
767
|
+
/* @__PURE__ */ e(de, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
|
|
768
768
|
r.acceptAllEvents
|
|
769
769
|
] })
|
|
770
770
|
] })
|
|
771
771
|
] }) : /* @__PURE__ */ e(
|
|
772
|
-
|
|
772
|
+
ie,
|
|
773
773
|
{
|
|
774
774
|
size: "sm",
|
|
775
775
|
variant: "outline",
|
|
@@ -781,14 +781,14 @@ function Te({
|
|
|
781
781
|
b || g(t);
|
|
782
782
|
},
|
|
783
783
|
disabled: p,
|
|
784
|
-
children: p ? /* @__PURE__ */ e(
|
|
785
|
-
b && /* @__PURE__ */ e(
|
|
784
|
+
children: p ? /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(oe, { children: [
|
|
785
|
+
b && /* @__PURE__ */ e(de, { className: "h-3.5 w-3.5" }),
|
|
786
786
|
r.going
|
|
787
787
|
] })
|
|
788
788
|
}
|
|
789
789
|
),
|
|
790
790
|
/* @__PURE__ */ e(
|
|
791
|
-
|
|
791
|
+
ie,
|
|
792
792
|
{
|
|
793
793
|
size: "sm",
|
|
794
794
|
variant: "outline",
|
|
@@ -800,48 +800,48 @@ function Te({
|
|
|
800
800
|
y || c(t);
|
|
801
801
|
},
|
|
802
802
|
disabled: D,
|
|
803
|
-
children: D ? /* @__PURE__ */ e(
|
|
804
|
-
y && /* @__PURE__ */ e(
|
|
803
|
+
children: D ? /* @__PURE__ */ e(le, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ n(oe, { children: [
|
|
804
|
+
y && /* @__PURE__ */ e(me, { className: "h-3.5 w-3.5" }),
|
|
805
805
|
r.notGoing
|
|
806
806
|
] })
|
|
807
807
|
}
|
|
808
808
|
)
|
|
809
809
|
] }) }),
|
|
810
|
-
|
|
811
|
-
|
|
810
|
+
I && b && !t.meetingTookPlace && !t.isCanceled && d && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 py-3", children: /* @__PURE__ */ n(
|
|
811
|
+
ie,
|
|
812
812
|
{
|
|
813
813
|
size: "sm",
|
|
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
|
-
onClick: () =>
|
|
816
|
+
onClick: () => d(t),
|
|
817
817
|
disabled: k,
|
|
818
818
|
children: [
|
|
819
|
-
k && /* @__PURE__ */ e(
|
|
819
|
+
k && /* @__PURE__ */ e(le, { className: "h-4 w-4 mr-2" }),
|
|
820
820
|
r.confirmMeeting
|
|
821
821
|
]
|
|
822
822
|
}
|
|
823
823
|
) })
|
|
824
824
|
] }),
|
|
825
|
-
|
|
826
|
-
onConfirm:
|
|
827
|
-
onCancel: () =>
|
|
828
|
-
isLoading:
|
|
825
|
+
B ? $ && B({
|
|
826
|
+
onConfirm: Y,
|
|
827
|
+
onCancel: () => W(!1),
|
|
828
|
+
isLoading: S
|
|
829
829
|
}) : /* @__PURE__ */ e(
|
|
830
|
-
|
|
830
|
+
St,
|
|
831
831
|
{
|
|
832
832
|
open: $,
|
|
833
|
-
onOpenChange:
|
|
833
|
+
onOpenChange: W,
|
|
834
834
|
title: r.deleteConfirmTitle,
|
|
835
835
|
description: r.deleteConfirmDescription,
|
|
836
836
|
cancelLabel: r.cancel,
|
|
837
837
|
confirmLabel: r.delete,
|
|
838
|
-
onConfirm:
|
|
839
|
-
isLoading:
|
|
838
|
+
onConfirm: Y,
|
|
839
|
+
isLoading: S
|
|
840
840
|
}
|
|
841
841
|
)
|
|
842
842
|
] });
|
|
843
843
|
}
|
|
844
|
-
function
|
|
844
|
+
function Ur({
|
|
845
845
|
event: t,
|
|
846
846
|
children: r,
|
|
847
847
|
open: o,
|
|
@@ -851,29 +851,29 @@ function Xr({
|
|
|
851
851
|
onEdit: x,
|
|
852
852
|
onDelete: g,
|
|
853
853
|
onCancel: c,
|
|
854
|
-
onAccept:
|
|
854
|
+
onAccept: d,
|
|
855
855
|
onDecline: w,
|
|
856
856
|
onConfirmMeeting: C,
|
|
857
857
|
canEdit: z = !0,
|
|
858
|
-
canDelete:
|
|
859
|
-
canCancel:
|
|
858
|
+
canDelete: I = !1,
|
|
859
|
+
canCancel: H = !0,
|
|
860
860
|
isCurrentUserParticipant: N,
|
|
861
861
|
isCurrentUserClient: p,
|
|
862
862
|
currentUserAcceptStatus: D,
|
|
863
863
|
isAcceptLoading: k,
|
|
864
|
-
isDeclineLoading:
|
|
865
|
-
isConfirmLoading:
|
|
864
|
+
isDeclineLoading: S,
|
|
865
|
+
isConfirmLoading: T,
|
|
866
866
|
isDeleteLoading: G,
|
|
867
|
-
renderParticipant:
|
|
868
|
-
renderHeaderActions:
|
|
869
|
-
renderCancelReason:
|
|
870
|
-
renderDeleteConfirmation:
|
|
867
|
+
renderParticipant: V,
|
|
868
|
+
renderHeaderActions: B,
|
|
869
|
+
renderCancelReason: j,
|
|
870
|
+
renderDeleteConfirmation: P,
|
|
871
871
|
formatDate: $,
|
|
872
|
-
formatTimeRange:
|
|
872
|
+
formatTimeRange: W,
|
|
873
873
|
className: U,
|
|
874
874
|
width: f = 360
|
|
875
875
|
}) {
|
|
876
|
-
const l =
|
|
876
|
+
const l = Ht("(min-width: 768px)"), h = { ...Ct, ...i }, v = se(() => {
|
|
877
877
|
s?.(!1);
|
|
878
878
|
}, [s]), b = {
|
|
879
879
|
event: t,
|
|
@@ -883,31 +883,31 @@ function Xr({
|
|
|
883
883
|
onEdit: x,
|
|
884
884
|
onDelete: g,
|
|
885
885
|
onCancel: c,
|
|
886
|
-
onAccept:
|
|
886
|
+
onAccept: d,
|
|
887
887
|
onDecline: w,
|
|
888
888
|
onConfirmMeeting: C,
|
|
889
889
|
canEdit: z,
|
|
890
|
-
canDelete:
|
|
891
|
-
canCancel:
|
|
890
|
+
canDelete: I,
|
|
891
|
+
canCancel: H,
|
|
892
892
|
isCurrentUserParticipant: N,
|
|
893
893
|
isCurrentUserClient: p,
|
|
894
894
|
currentUserAcceptStatus: D,
|
|
895
895
|
isAcceptLoading: k,
|
|
896
|
-
isDeclineLoading:
|
|
897
|
-
isConfirmLoading:
|
|
896
|
+
isDeclineLoading: S,
|
|
897
|
+
isConfirmLoading: T,
|
|
898
898
|
isDeleteLoading: G,
|
|
899
|
-
renderParticipant:
|
|
900
|
-
renderHeaderActions:
|
|
901
|
-
renderCancelReason:
|
|
902
|
-
renderDeleteConfirmation:
|
|
899
|
+
renderParticipant: V,
|
|
900
|
+
renderHeaderActions: B,
|
|
901
|
+
renderCancelReason: j,
|
|
902
|
+
renderDeleteConfirmation: P,
|
|
903
903
|
formatDate: $,
|
|
904
|
-
formatTimeRange:
|
|
904
|
+
formatTimeRange: W
|
|
905
905
|
};
|
|
906
|
-
return l ? /* @__PURE__ */ n(
|
|
906
|
+
return l ? /* @__PURE__ */ n(_e, { open: o ?? !1, onOpenChange: s ?? (() => {
|
|
907
907
|
}), children: [
|
|
908
|
-
/* @__PURE__ */ e(
|
|
908
|
+
/* @__PURE__ */ e(Pe, { asChild: !0, children: r }),
|
|
909
909
|
/* @__PURE__ */ e(
|
|
910
|
-
|
|
910
|
+
Re,
|
|
911
911
|
{
|
|
912
912
|
className: m(
|
|
913
913
|
"p-0 shadow-lg !rounded-2xl bg-white dark:bg-zinc-900 overflow-hidden border z-50",
|
|
@@ -917,28 +917,28 @@ function Xr({
|
|
|
917
917
|
align: "center",
|
|
918
918
|
side: "bottom",
|
|
919
919
|
sideOffset: 4,
|
|
920
|
-
children: /* @__PURE__ */ e(
|
|
920
|
+
children: /* @__PURE__ */ e(Ee, { ...b })
|
|
921
921
|
}
|
|
922
922
|
)
|
|
923
|
-
] }) : /* @__PURE__ */ n(
|
|
923
|
+
] }) : /* @__PURE__ */ n(oe, { children: [
|
|
924
924
|
r,
|
|
925
925
|
/* @__PURE__ */ e(
|
|
926
|
-
|
|
926
|
+
Mt,
|
|
927
927
|
{
|
|
928
928
|
open: o ?? !1,
|
|
929
929
|
onOpenChange: s ?? (() => {
|
|
930
930
|
}),
|
|
931
931
|
title: t.title,
|
|
932
|
-
children: /* @__PURE__ */ e(
|
|
932
|
+
children: /* @__PURE__ */ e(Ee, { ...b })
|
|
933
933
|
}
|
|
934
934
|
)
|
|
935
935
|
] });
|
|
936
936
|
}
|
|
937
|
-
const
|
|
938
|
-
function
|
|
937
|
+
const xe = 44, ze = 4, Tt = 56, Le = 8, pe = 80, ce = 140, He = 100, Te = 2, It = 8, jt = 18;
|
|
938
|
+
function Wt(t) {
|
|
939
939
|
return t.split(" ").map((r) => r[0]).join("").toUpperCase().slice(0, 2);
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function At(t, r) {
|
|
942
942
|
const o = [];
|
|
943
943
|
for (let s = 0; s < r; s++) {
|
|
944
944
|
const a = new Date(t);
|
|
@@ -946,24 +946,24 @@ function Ot(t, r) {
|
|
|
946
946
|
}
|
|
947
947
|
return o;
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function Ft(t, r, o) {
|
|
950
950
|
const s = [];
|
|
951
951
|
return t.forEach((a, i) => {
|
|
952
952
|
for (let x = r; x < o; x++)
|
|
953
953
|
s.push({ hour: x, dayIndex: i, date: a });
|
|
954
954
|
}), s;
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Bt(t) {
|
|
957
957
|
return `${t.toString().padStart(2, "0")}:00`;
|
|
958
958
|
}
|
|
959
|
-
function
|
|
959
|
+
function $t(t) {
|
|
960
960
|
return t.toLocaleDateString("en-US", {
|
|
961
961
|
weekday: "short",
|
|
962
962
|
month: "short",
|
|
963
963
|
day: "numeric"
|
|
964
964
|
});
|
|
965
965
|
}
|
|
966
|
-
function
|
|
966
|
+
function Ie(t) {
|
|
967
967
|
const r = [...t].sort((a, i) => a.startCol !== i.startCol ? a.startCol - i.startCol : i.spanCols - a.spanCols), o = [], s = [];
|
|
968
968
|
for (const a of r) {
|
|
969
969
|
let i = 0;
|
|
@@ -976,7 +976,7 @@ function Be(t) {
|
|
|
976
976
|
}
|
|
977
977
|
return o;
|
|
978
978
|
}
|
|
979
|
-
function
|
|
979
|
+
function Ot({ src: t, alt: r, fallback: o, className: s }) {
|
|
980
980
|
return /* @__PURE__ */ e(
|
|
981
981
|
"div",
|
|
982
982
|
{
|
|
@@ -995,9 +995,9 @@ function Yt({ src: t, alt: r, fallback: o, className: s }) {
|
|
|
995
995
|
}
|
|
996
996
|
);
|
|
997
997
|
}
|
|
998
|
-
const
|
|
999
|
-
function
|
|
1000
|
-
daysToShow: t =
|
|
998
|
+
const _t = 7;
|
|
999
|
+
function ve({
|
|
1000
|
+
daysToShow: t = _t,
|
|
1001
1001
|
events: r,
|
|
1002
1002
|
users: o = [],
|
|
1003
1003
|
selectedDate: s,
|
|
@@ -1006,30 +1006,30 @@ function Ne({
|
|
|
1006
1006
|
visibleHours: x,
|
|
1007
1007
|
className: g,
|
|
1008
1008
|
getEventUserId: c,
|
|
1009
|
-
renderPopover:
|
|
1009
|
+
renderPopover: d,
|
|
1010
1010
|
slots: w,
|
|
1011
1011
|
classNames: C
|
|
1012
1012
|
}) {
|
|
1013
|
-
const z =
|
|
1014
|
-
const l = new Date(
|
|
1013
|
+
const z = ke(null), I = s ?? /* @__PURE__ */ new Date(), H = !0, N = x?.from ?? It, p = x?.to ?? jt, D = p - N, k = O(() => {
|
|
1014
|
+
const l = new Date(I);
|
|
1015
1015
|
if (t === 1 || t === 3)
|
|
1016
1016
|
return l.setHours(0, 0, 0, 0), l;
|
|
1017
1017
|
const h = l.getDay(), v = h === 0 ? -6 : 1 - h;
|
|
1018
1018
|
return l.setDate(l.getDate() + v), l.setHours(0, 0, 0, 0), l;
|
|
1019
|
-
}, [
|
|
1020
|
-
() =>
|
|
1019
|
+
}, [I, t]), S = O(
|
|
1020
|
+
() => At(k, t),
|
|
1021
1021
|
[k, t]
|
|
1022
|
-
),
|
|
1023
|
-
() =>
|
|
1024
|
-
[
|
|
1025
|
-
),
|
|
1022
|
+
), T = O(
|
|
1023
|
+
() => Ft(S, N, p),
|
|
1024
|
+
[H, S, N, p]
|
|
1025
|
+
), V = c ?? ((l) => {
|
|
1026
1026
|
const h = l.data;
|
|
1027
1027
|
if (h?.userId) return String(h.userId);
|
|
1028
1028
|
if (h?.user && typeof h.user == "object" && h.user.id)
|
|
1029
1029
|
return String(h.user.id);
|
|
1030
1030
|
if (l.user?.id) return l.user.id;
|
|
1031
1031
|
if (l.participants?.[0]?.id) return l.participants[0].id;
|
|
1032
|
-
}),
|
|
1032
|
+
}), B = O(() => {
|
|
1033
1033
|
const l = /* @__PURE__ */ new Map();
|
|
1034
1034
|
for (const h of o)
|
|
1035
1035
|
l.set(h.id, {
|
|
@@ -1060,57 +1060,57 @@ function Ne({
|
|
|
1060
1060
|
});
|
|
1061
1061
|
}
|
|
1062
1062
|
return Array.from(l.values());
|
|
1063
|
-
}, [o, r]),
|
|
1063
|
+
}, [o, r]), j = O(() => {
|
|
1064
1064
|
const l = [], h = /* @__PURE__ */ new Map();
|
|
1065
|
-
for (const y of
|
|
1065
|
+
for (const y of B)
|
|
1066
1066
|
h.set(y.id, []);
|
|
1067
1067
|
h.set("unassigned", []);
|
|
1068
1068
|
for (const y of r) {
|
|
1069
|
-
const
|
|
1070
|
-
(h.get(
|
|
1069
|
+
const L = V(y) ?? "unassigned";
|
|
1070
|
+
(h.get(L) ?? h.get("unassigned")).push(y);
|
|
1071
1071
|
}
|
|
1072
1072
|
const v = (y) => {
|
|
1073
|
-
const
|
|
1073
|
+
const L = [];
|
|
1074
1074
|
for (const M of y) {
|
|
1075
|
-
const
|
|
1076
|
-
for (let K = 0; K <
|
|
1077
|
-
const
|
|
1078
|
-
if (M.startDate <=
|
|
1079
|
-
let
|
|
1080
|
-
if (M.startDate >=
|
|
1075
|
+
const _ = M.startDate.getHours() + M.startDate.getMinutes() / 60, J = M.endDate.getHours() + M.endDate.getMinutes() / 60;
|
|
1076
|
+
for (let K = 0; K < S.length; K++) {
|
|
1077
|
+
const u = S[K], E = ge(u), A = Ve(u);
|
|
1078
|
+
if (M.startDate <= A && M.endDate >= E) {
|
|
1079
|
+
let F = N, Y = p;
|
|
1080
|
+
if (M.startDate >= E && (F = Math.max(N, _)), M.endDate <= A && (Y = Math.min(p, J)), F = Math.max(
|
|
1081
1081
|
N,
|
|
1082
|
-
Math.min(p,
|
|
1083
|
-
),
|
|
1082
|
+
Math.min(p, F)
|
|
1083
|
+
), Y = Math.max(
|
|
1084
1084
|
N,
|
|
1085
|
-
Math.min(p,
|
|
1086
|
-
),
|
|
1087
|
-
const
|
|
1088
|
-
|
|
1085
|
+
Math.min(p, Y)
|
|
1086
|
+
), Y > F) {
|
|
1087
|
+
const R = K * D + Math.floor(F - N), X = K * D + Math.ceil(Y - N);
|
|
1088
|
+
L.push({
|
|
1089
1089
|
event: M,
|
|
1090
|
-
startCol:
|
|
1091
|
-
spanCols: Math.max(1,
|
|
1090
|
+
startCol: R,
|
|
1091
|
+
spanCols: Math.max(1, X - R)
|
|
1092
1092
|
});
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
1096
|
}
|
|
1097
|
-
return
|
|
1097
|
+
return L;
|
|
1098
1098
|
};
|
|
1099
|
-
for (const y of
|
|
1100
|
-
const
|
|
1101
|
-
(K,
|
|
1099
|
+
for (const y of B) {
|
|
1100
|
+
const L = h.get(y.id) ?? [], M = v(L), _ = Ie(M), J = _.reduce(
|
|
1101
|
+
(K, u) => Math.max(K, u.stackIndex + 1),
|
|
1102
1102
|
0
|
|
1103
1103
|
);
|
|
1104
1104
|
l.push({
|
|
1105
1105
|
user: y,
|
|
1106
|
-
events:
|
|
1107
|
-
maxStack: Math.max(
|
|
1106
|
+
events: _,
|
|
1107
|
+
maxStack: Math.max(J, 1)
|
|
1108
1108
|
});
|
|
1109
1109
|
}
|
|
1110
1110
|
const b = h.get("unassigned") ?? [];
|
|
1111
1111
|
if (b.length > 0) {
|
|
1112
|
-
const y = v(b),
|
|
1113
|
-
(
|
|
1112
|
+
const y = v(b), L = Ie(y), M = L.reduce(
|
|
1113
|
+
(_, J) => Math.max(_, J.stackIndex + 1),
|
|
1114
1114
|
0
|
|
1115
1115
|
);
|
|
1116
1116
|
l.push({
|
|
@@ -1120,79 +1120,79 @@ function Ne({
|
|
|
1120
1120
|
avatar: void 0,
|
|
1121
1121
|
email: void 0
|
|
1122
1122
|
},
|
|
1123
|
-
events:
|
|
1123
|
+
events: L,
|
|
1124
1124
|
maxStack: Math.max(M, 1)
|
|
1125
1125
|
});
|
|
1126
1126
|
}
|
|
1127
1127
|
return l.filter((y) => y.events.length > 0);
|
|
1128
1128
|
}, [
|
|
1129
|
-
|
|
1129
|
+
B,
|
|
1130
1130
|
r,
|
|
1131
|
-
|
|
1132
|
-
|
|
1131
|
+
S,
|
|
1132
|
+
H,
|
|
1133
1133
|
D,
|
|
1134
1134
|
N,
|
|
1135
1135
|
p,
|
|
1136
|
-
|
|
1137
|
-
]),
|
|
1136
|
+
V
|
|
1137
|
+
]), P = O(() => {
|
|
1138
1138
|
const l = /* @__PURE__ */ new Map();
|
|
1139
|
-
for (const h of
|
|
1139
|
+
for (const h of j)
|
|
1140
1140
|
for (const v of h.events)
|
|
1141
1141
|
if (v.spanCols === 1) {
|
|
1142
1142
|
const b = l.get(v.startCol) ?? 0;
|
|
1143
1143
|
l.set(v.startCol, b + 1);
|
|
1144
1144
|
}
|
|
1145
1145
|
return l;
|
|
1146
|
-
}, [
|
|
1147
|
-
const l =
|
|
1146
|
+
}, [j]), $ = O(() => {
|
|
1147
|
+
const l = T.length, h = pe, v = [];
|
|
1148
1148
|
for (let b = 0; b < l; b++) {
|
|
1149
|
-
const y =
|
|
1150
|
-
y >
|
|
1151
|
-
|
|
1152
|
-
) : y > 0 ? v.push(Math.max(h,
|
|
1149
|
+
const y = P.get(b) ?? 0;
|
|
1150
|
+
y > Te ? v.push(
|
|
1151
|
+
He + (y - Te) * 20
|
|
1152
|
+
) : y > 0 ? v.push(Math.max(h, He)) : v.push(h);
|
|
1153
1153
|
}
|
|
1154
1154
|
return v;
|
|
1155
1155
|
}, [
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
]),
|
|
1161
|
-
|
|
1162
|
-
l * (
|
|
1163
|
-
), U =
|
|
1156
|
+
H,
|
|
1157
|
+
T.length,
|
|
1158
|
+
S.length,
|
|
1159
|
+
P
|
|
1160
|
+
]), W = (l) => Math.max(
|
|
1161
|
+
Tt,
|
|
1162
|
+
l * (xe + ze) + Le * 2
|
|
1163
|
+
), U = ce + $.reduce((l, h) => l + h, 0), f = O(() => {
|
|
1164
1164
|
const l = [0];
|
|
1165
1165
|
for (let h = 0; h < $.length; h++)
|
|
1166
1166
|
l.push(l[h] + $[h]);
|
|
1167
1167
|
return l;
|
|
1168
1168
|
}, [$]);
|
|
1169
|
-
return
|
|
1169
|
+
return Qe(() => {
|
|
1170
1170
|
const l = z.current;
|
|
1171
1171
|
if (!l) return;
|
|
1172
1172
|
const h = () => {
|
|
1173
1173
|
let v = -1;
|
|
1174
1174
|
const y = (/* @__PURE__ */ new Date()).getHours();
|
|
1175
1175
|
{
|
|
1176
|
-
for (let
|
|
1177
|
-
const M =
|
|
1178
|
-
if (M &&
|
|
1179
|
-
v =
|
|
1176
|
+
for (let L = 0; L < T.length; L++) {
|
|
1177
|
+
const M = T[L];
|
|
1178
|
+
if (M && q(M.date) && M.hour <= y && M.hour + 1 > y) {
|
|
1179
|
+
v = L;
|
|
1180
1180
|
break;
|
|
1181
1181
|
}
|
|
1182
1182
|
}
|
|
1183
1183
|
if (v === -1)
|
|
1184
|
-
for (let
|
|
1185
|
-
const M =
|
|
1186
|
-
if (M &&
|
|
1187
|
-
v =
|
|
1184
|
+
for (let L = 0; L < T.length; L++) {
|
|
1185
|
+
const M = T[L];
|
|
1186
|
+
if (M && q(M.date)) {
|
|
1187
|
+
v = L;
|
|
1188
1188
|
break;
|
|
1189
1189
|
}
|
|
1190
1190
|
}
|
|
1191
1191
|
}
|
|
1192
1192
|
if (v !== -1) {
|
|
1193
|
-
const
|
|
1193
|
+
const L = (f[v] ?? 0) + ce, M = l.clientWidth, _ = Math.max(0, L - M / 3);
|
|
1194
1194
|
l.scrollTo({
|
|
1195
|
-
left:
|
|
1195
|
+
left: _,
|
|
1196
1196
|
behavior: "instant"
|
|
1197
1197
|
});
|
|
1198
1198
|
}
|
|
@@ -1200,7 +1200,7 @@ function Ne({
|
|
|
1200
1200
|
requestAnimationFrame(() => {
|
|
1201
1201
|
requestAnimationFrame(h);
|
|
1202
1202
|
});
|
|
1203
|
-
}, [
|
|
1203
|
+
}, [I, T, S, f, H]), /* @__PURE__ */ e("div", { className: m("flex h-full flex-col", g), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: z, children: /* @__PURE__ */ n("div", { className: "relative", style: { minWidth: U }, children: [
|
|
1204
1204
|
// Hour mode: Day headers + Hour sub-headers - sticky wrapper with flex child (sticky + flex breaks sticky)
|
|
1205
1205
|
/* @__PURE__ */ e("div", { className: "ic-timeline-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
|
|
1206
1206
|
t > 1 && /* @__PURE__ */ n("div", { className: "flex border-b", children: [
|
|
@@ -1208,12 +1208,12 @@ function Ne({
|
|
|
1208
1208
|
"div",
|
|
1209
1209
|
{
|
|
1210
1210
|
className: "flex shrink-0 items-center border-r bg-background px-2 py-1",
|
|
1211
|
-
style: { width:
|
|
1211
|
+
style: { width: ce },
|
|
1212
1212
|
children: /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
|
|
1213
1213
|
}
|
|
1214
1214
|
),
|
|
1215
|
-
|
|
1216
|
-
const v =
|
|
1215
|
+
S.map((l, h) => {
|
|
1216
|
+
const v = q(l), b = h * D, y = $.slice(b, b + D).reduce((L, M) => L + M, 0);
|
|
1217
1217
|
return /* @__PURE__ */ e(
|
|
1218
1218
|
"div",
|
|
1219
1219
|
{
|
|
@@ -1222,7 +1222,7 @@ function Ne({
|
|
|
1222
1222
|
v ? "bg-primary/10 text-primary" : "bg-muted/30"
|
|
1223
1223
|
),
|
|
1224
1224
|
style: { width: y },
|
|
1225
|
-
children: /* @__PURE__ */ e("span", { className: "text-xs", children:
|
|
1225
|
+
children: /* @__PURE__ */ e("span", { className: "text-xs", children: $t(l) })
|
|
1226
1226
|
},
|
|
1227
1227
|
`day-${l.toISOString()}`
|
|
1228
1228
|
);
|
|
@@ -1236,12 +1236,12 @@ function Ne({
|
|
|
1236
1236
|
"flex shrink-0 items-center border-r bg-background px-2 py-2",
|
|
1237
1237
|
t > 1 && "sticky left-0 z-10"
|
|
1238
1238
|
),
|
|
1239
|
-
style: { width:
|
|
1239
|
+
style: { width: ce },
|
|
1240
1240
|
children: t === 1 && /* @__PURE__ */ e("span", { className: "text-[10px] font-medium uppercase text-muted-foreground", children: "Resources" })
|
|
1241
1241
|
}
|
|
1242
1242
|
),
|
|
1243
|
-
|
|
1244
|
-
const v = l.hour === N, b =
|
|
1243
|
+
T.map((l, h) => {
|
|
1244
|
+
const v = l.hour === N, b = q(l.date), y = $[h] ?? pe;
|
|
1245
1245
|
return /* @__PURE__ */ e(
|
|
1246
1246
|
"div",
|
|
1247
1247
|
{
|
|
@@ -1251,15 +1251,15 @@ function Ne({
|
|
|
1251
1251
|
b && "bg-primary/5"
|
|
1252
1252
|
),
|
|
1253
1253
|
style: { width: y },
|
|
1254
|
-
children:
|
|
1254
|
+
children: Bt(l.hour)
|
|
1255
1255
|
},
|
|
1256
1256
|
`hour-${l.dayIndex}-${l.hour}`
|
|
1257
1257
|
);
|
|
1258
1258
|
})
|
|
1259
1259
|
] })
|
|
1260
1260
|
] }) }),
|
|
1261
|
-
|
|
1262
|
-
const h =
|
|
1261
|
+
j.map((l) => {
|
|
1262
|
+
const h = W(l.maxStack);
|
|
1263
1263
|
return /* @__PURE__ */ n(
|
|
1264
1264
|
"div",
|
|
1265
1265
|
{
|
|
@@ -1273,7 +1273,7 @@ function Ne({
|
|
|
1273
1273
|
"div",
|
|
1274
1274
|
{
|
|
1275
1275
|
className: "sticky left-0 z-10",
|
|
1276
|
-
style: { width:
|
|
1276
|
+
style: { width: ce },
|
|
1277
1277
|
children: /* @__PURE__ */ n(
|
|
1278
1278
|
"div",
|
|
1279
1279
|
{
|
|
@@ -1283,12 +1283,12 @@ function Ne({
|
|
|
1283
1283
|
),
|
|
1284
1284
|
children: [
|
|
1285
1285
|
/* @__PURE__ */ e(
|
|
1286
|
-
|
|
1286
|
+
Ot,
|
|
1287
1287
|
{
|
|
1288
1288
|
className: "size-7",
|
|
1289
1289
|
src: l.user.avatar,
|
|
1290
1290
|
alt: l.user.name,
|
|
1291
|
-
fallback:
|
|
1291
|
+
fallback: Wt(l.user.name)
|
|
1292
1292
|
}
|
|
1293
1293
|
),
|
|
1294
1294
|
/* @__PURE__ */ e("span", { className: "truncate text-xs sm:text-sm font-medium", children: l.user.name })
|
|
@@ -1299,23 +1299,23 @@ function Ne({
|
|
|
1299
1299
|
),
|
|
1300
1300
|
/* @__PURE__ */ n("div", { className: "relative flex", children: [
|
|
1301
1301
|
// Hour mode cells
|
|
1302
|
-
|
|
1303
|
-
const y = v.hour === N && b > 0,
|
|
1302
|
+
T.map((v, b) => {
|
|
1303
|
+
const y = v.hour === N && b > 0, L = $[b] ?? pe;
|
|
1304
1304
|
return /* @__PURE__ */ e(
|
|
1305
1305
|
"div",
|
|
1306
1306
|
{
|
|
1307
1307
|
className: m(
|
|
1308
1308
|
"shrink-0",
|
|
1309
1309
|
y ? "border-l-2 border-l-border" : "border-r border-r-border/50",
|
|
1310
|
-
|
|
1310
|
+
q(v.date) && "bg-primary/5"
|
|
1311
1311
|
),
|
|
1312
|
-
style: { width:
|
|
1312
|
+
style: { width: L }
|
|
1313
1313
|
},
|
|
1314
1314
|
`cell-${v.dayIndex}-${v.hour}`
|
|
1315
1315
|
);
|
|
1316
1316
|
}),
|
|
1317
1317
|
l.events.map((v) => {
|
|
1318
|
-
const b = (f[v.startCol] ?? 0) + 2, y = f[v.startCol + v.spanCols] ?? f[f.length - 1] ?? 0,
|
|
1318
|
+
const b = (f[v.startCol] ?? 0) + 2, y = f[v.startCol + v.spanCols] ?? f[f.length - 1] ?? 0, L = f[v.startCol] ?? 0, M = y - L - 4, _ = Le + v.stackIndex * (xe + ze);
|
|
1319
1319
|
return /* @__PURE__ */ e(
|
|
1320
1320
|
"div",
|
|
1321
1321
|
{
|
|
@@ -1324,16 +1324,16 @@ function Ne({
|
|
|
1324
1324
|
left: b,
|
|
1325
1325
|
width: Math.max(M, 0),
|
|
1326
1326
|
// No forced minimum - columns are guaranteed wide enough
|
|
1327
|
-
top:
|
|
1328
|
-
height:
|
|
1327
|
+
top: _,
|
|
1328
|
+
height: xe
|
|
1329
1329
|
},
|
|
1330
1330
|
children: /* @__PURE__ */ e(
|
|
1331
|
-
|
|
1331
|
+
nt,
|
|
1332
1332
|
{
|
|
1333
1333
|
event: v.event,
|
|
1334
1334
|
variant: "compact",
|
|
1335
1335
|
onClick: i,
|
|
1336
|
-
renderPopover:
|
|
1336
|
+
renderPopover: d,
|
|
1337
1337
|
className: m(
|
|
1338
1338
|
"h-full w-full",
|
|
1339
1339
|
C?.eventCardCompact
|
|
@@ -1350,10 +1350,10 @@ function Ne({
|
|
|
1350
1350
|
l.user.id
|
|
1351
1351
|
);
|
|
1352
1352
|
}),
|
|
1353
|
-
|
|
1353
|
+
j.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
|
|
1354
1354
|
] }) }) });
|
|
1355
1355
|
}
|
|
1356
|
-
const
|
|
1356
|
+
const Pt = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], Rt = [
|
|
1357
1357
|
"January",
|
|
1358
1358
|
"February",
|
|
1359
1359
|
"March",
|
|
@@ -1367,12 +1367,12 @@ const Kt = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], qt = [
|
|
|
1367
1367
|
"November",
|
|
1368
1368
|
"December"
|
|
1369
1369
|
];
|
|
1370
|
-
function
|
|
1370
|
+
function je(t) {
|
|
1371
1371
|
const r = t.hexColor;
|
|
1372
1372
|
return r ? { backgroundColor: r } : {};
|
|
1373
1373
|
}
|
|
1374
|
-
function
|
|
1375
|
-
const i =
|
|
1374
|
+
function Vt({ day: t, date: r, events: o, isCurrentMonth: s, onDayClick: a }) {
|
|
1375
|
+
const i = q(r), x = 3, g = o.length;
|
|
1376
1376
|
return /* @__PURE__ */ n(
|
|
1377
1377
|
"button",
|
|
1378
1378
|
{
|
|
@@ -1399,15 +1399,15 @@ function Jt({ day: t, date: r, events: o, isCurrentMonth: s, onDayClick: a }) {
|
|
|
1399
1399
|
"div",
|
|
1400
1400
|
{
|
|
1401
1401
|
className: "size-1 sm:size-1.5 rounded-full bg-primary",
|
|
1402
|
-
style:
|
|
1402
|
+
style: je(c)
|
|
1403
1403
|
},
|
|
1404
1404
|
c.id
|
|
1405
|
-
)) : /* @__PURE__ */ n(
|
|
1405
|
+
)) : /* @__PURE__ */ n(oe, { children: [
|
|
1406
1406
|
o.slice(0, x).map((c) => /* @__PURE__ */ e(
|
|
1407
1407
|
"div",
|
|
1408
1408
|
{
|
|
1409
1409
|
className: "size-1 sm:size-1.5 rounded-full bg-primary",
|
|
1410
|
-
style:
|
|
1410
|
+
style: je(c)
|
|
1411
1411
|
},
|
|
1412
1412
|
c.id
|
|
1413
1413
|
)),
|
|
@@ -1420,13 +1420,13 @@ function Jt({ day: t, date: r, events: o, isCurrentMonth: s, onDayClick: a }) {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
);
|
|
1422
1422
|
}
|
|
1423
|
-
function
|
|
1423
|
+
function Ut({
|
|
1424
1424
|
date: t,
|
|
1425
1425
|
events: r,
|
|
1426
1426
|
onMonthClick: o,
|
|
1427
1427
|
onDayClick: s
|
|
1428
1428
|
}) {
|
|
1429
|
-
const a =
|
|
1429
|
+
const a = O(() => ht(t, 0), [t]);
|
|
1430
1430
|
return /* @__PURE__ */ n("div", { className: "flex flex-col", children: [
|
|
1431
1431
|
/* @__PURE__ */ e(
|
|
1432
1432
|
"button",
|
|
@@ -1438,18 +1438,18 @@ function Xt({
|
|
|
1438
1438
|
"hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1439
1439
|
"transition-colors"
|
|
1440
1440
|
),
|
|
1441
|
-
children:
|
|
1441
|
+
children: Rt[t.getMonth()]
|
|
1442
1442
|
}
|
|
1443
1443
|
),
|
|
1444
1444
|
/* @__PURE__ */ n("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: [
|
|
1445
|
-
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children:
|
|
1445
|
+
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 text-center", children: Pt.map((i, x) => /* @__PURE__ */ n("div", { className: "text-[9px] sm:text-xs font-medium text-muted-foreground", children: [
|
|
1446
1446
|
/* @__PURE__ */ e("span", { className: "sm:hidden", children: i[0] }),
|
|
1447
1447
|
/* @__PURE__ */ e("span", { className: "hidden sm:inline", children: i })
|
|
1448
1448
|
] }, x)) }),
|
|
1449
1449
|
/* @__PURE__ */ e("div", { className: "grid grid-cols-7 gap-x-0.5 gap-y-1", children: a.map((i, x) => {
|
|
1450
|
-
const g =
|
|
1450
|
+
const g = mt(r, i.date);
|
|
1451
1451
|
return /* @__PURE__ */ e(
|
|
1452
|
-
|
|
1452
|
+
Vt,
|
|
1453
1453
|
{
|
|
1454
1454
|
day: i.date.getDate(),
|
|
1455
1455
|
date: i.date,
|
|
@@ -1463,7 +1463,7 @@ function Xt({
|
|
|
1463
1463
|
] })
|
|
1464
1464
|
] });
|
|
1465
1465
|
}
|
|
1466
|
-
function
|
|
1466
|
+
function Yt({
|
|
1467
1467
|
events: t,
|
|
1468
1468
|
year: r,
|
|
1469
1469
|
onMonthClick: o,
|
|
@@ -1472,11 +1472,11 @@ function Qt({
|
|
|
1472
1472
|
slots: i,
|
|
1473
1473
|
classNames: x
|
|
1474
1474
|
}) {
|
|
1475
|
-
const g =
|
|
1475
|
+
const g = O(() => ut(r), [r]);
|
|
1476
1476
|
return /* @__PURE__ */ n("div", { className: m("flex flex-col h-full", a), children: [
|
|
1477
1477
|
/* @__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: r }) }),
|
|
1478
1478
|
/* @__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: g.map((c) => /* @__PURE__ */ e(
|
|
1479
|
-
|
|
1479
|
+
Ut,
|
|
1480
1480
|
{
|
|
1481
1481
|
date: c,
|
|
1482
1482
|
events: t,
|
|
@@ -1487,7 +1487,7 @@ function Qt({
|
|
|
1487
1487
|
)) }) })
|
|
1488
1488
|
] });
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1490
|
+
function Gt(t) {
|
|
1491
1491
|
switch (t) {
|
|
1492
1492
|
case "day":
|
|
1493
1493
|
case "week":
|
|
@@ -1496,7 +1496,7 @@ function Zt(t) {
|
|
|
1496
1496
|
return "day";
|
|
1497
1497
|
}
|
|
1498
1498
|
}
|
|
1499
|
-
function
|
|
1499
|
+
function Kt({
|
|
1500
1500
|
onEventClick: t,
|
|
1501
1501
|
onSlotClick: r,
|
|
1502
1502
|
onSlotSelect: o,
|
|
@@ -1506,56 +1506,56 @@ function er({
|
|
|
1506
1506
|
minSelectionMinutes: x = 30,
|
|
1507
1507
|
showMoreEventsInPopover: g = !1,
|
|
1508
1508
|
isLoading: c = !1,
|
|
1509
|
-
slots:
|
|
1509
|
+
slots: d,
|
|
1510
1510
|
classNames: w,
|
|
1511
1511
|
settingsContent: C,
|
|
1512
1512
|
filterContent: z,
|
|
1513
|
-
headerActions:
|
|
1514
|
-
renderPopover:
|
|
1513
|
+
headerActions: I,
|
|
1514
|
+
renderPopover: H,
|
|
1515
1515
|
calendarRef: N
|
|
1516
1516
|
}) {
|
|
1517
1517
|
const {
|
|
1518
1518
|
view: p,
|
|
1519
1519
|
setView: D,
|
|
1520
1520
|
selectedDate: k,
|
|
1521
|
-
setSelectedDate:
|
|
1522
|
-
slotDuration:
|
|
1521
|
+
setSelectedDate: S,
|
|
1522
|
+
slotDuration: T,
|
|
1523
1523
|
filteredEvents: G,
|
|
1524
|
-
users:
|
|
1525
|
-
visibleHours:
|
|
1526
|
-
workingHours:
|
|
1527
|
-
badgeVariant:
|
|
1524
|
+
users: V,
|
|
1525
|
+
visibleHours: B,
|
|
1526
|
+
workingHours: j,
|
|
1527
|
+
badgeVariant: P,
|
|
1528
1528
|
showWorkingHoursOnly: $
|
|
1529
|
-
} =
|
|
1530
|
-
if (!$ || !
|
|
1529
|
+
} = Xe(), W = O(() => {
|
|
1530
|
+
if (!$ || !j)
|
|
1531
1531
|
return {
|
|
1532
|
-
startHour:
|
|
1533
|
-
endHour:
|
|
1532
|
+
startHour: B.start,
|
|
1533
|
+
endHour: B.end
|
|
1534
1534
|
};
|
|
1535
|
-
let
|
|
1536
|
-
for (const
|
|
1537
|
-
const
|
|
1538
|
-
!
|
|
1535
|
+
let u = 24, E = 0;
|
|
1536
|
+
for (const A of Object.keys(j)) {
|
|
1537
|
+
const F = j[Number(A)];
|
|
1538
|
+
!F || F.enabled === !1 || (F.from < u && (u = F.from), F.to > E && (E = F.to));
|
|
1539
1539
|
}
|
|
1540
|
-
return
|
|
1541
|
-
startHour:
|
|
1542
|
-
endHour:
|
|
1543
|
-
} : { startHour:
|
|
1544
|
-
}, [$,
|
|
1545
|
-
|
|
1540
|
+
return u >= E ? {
|
|
1541
|
+
startHour: B.start,
|
|
1542
|
+
endHour: B.end
|
|
1543
|
+
} : { startHour: u, endHour: E };
|
|
1544
|
+
}, [$, j, B]), U = W, f = ke(null);
|
|
1545
|
+
Ze(
|
|
1546
1546
|
N,
|
|
1547
1547
|
() => ({
|
|
1548
1548
|
scrollToToday: () => {
|
|
1549
|
-
const
|
|
1550
|
-
|
|
1549
|
+
const u = /* @__PURE__ */ new Date();
|
|
1550
|
+
S(u, p), requestAnimationFrame(() => {
|
|
1551
1551
|
requestAnimationFrame(() => {
|
|
1552
|
-
const
|
|
1552
|
+
const E = f.current?.querySelector(
|
|
1553
1553
|
".ic-timeline-scroll-container, [class*='overflow-auto']"
|
|
1554
1554
|
);
|
|
1555
|
-
if (!
|
|
1556
|
-
const
|
|
1557
|
-
|
|
1558
|
-
top: Math.max(0,
|
|
1555
|
+
if (!E) return;
|
|
1556
|
+
const Y = (u.getHours() - W.startHour) * 96;
|
|
1557
|
+
Y > 0 && E.scrollTo({
|
|
1558
|
+
top: Math.max(0, Y - 100),
|
|
1559
1559
|
// Offset to show some context
|
|
1560
1560
|
behavior: "smooth"
|
|
1561
1561
|
});
|
|
@@ -1563,21 +1563,21 @@ function er({
|
|
|
1563
1563
|
});
|
|
1564
1564
|
},
|
|
1565
1565
|
scrollToWorkingHours: () => {
|
|
1566
|
-
let
|
|
1567
|
-
if (
|
|
1568
|
-
for (const
|
|
1569
|
-
const
|
|
1570
|
-
|
|
1566
|
+
let u = 8;
|
|
1567
|
+
if (j)
|
|
1568
|
+
for (const E of Object.keys(j)) {
|
|
1569
|
+
const A = j[Number(E)];
|
|
1570
|
+
A?.enabled && A.from < u && (u = Math.max(A.from - 1, 0));
|
|
1571
1571
|
}
|
|
1572
1572
|
requestAnimationFrame(() => {
|
|
1573
1573
|
requestAnimationFrame(() => {
|
|
1574
|
-
const
|
|
1574
|
+
const E = f.current?.querySelector(
|
|
1575
1575
|
".ic-timeline-scroll-container, [class*='overflow-auto']"
|
|
1576
1576
|
);
|
|
1577
|
-
if (!
|
|
1578
|
-
const
|
|
1579
|
-
|
|
1580
|
-
top: Math.max(0,
|
|
1577
|
+
if (!E) return;
|
|
1578
|
+
const F = (u - W.startHour) * 96;
|
|
1579
|
+
E.scrollTo({
|
|
1580
|
+
top: Math.max(0, F),
|
|
1581
1581
|
behavior: "smooth"
|
|
1582
1582
|
});
|
|
1583
1583
|
});
|
|
@@ -1585,229 +1585,206 @@ function er({
|
|
|
1585
1585
|
},
|
|
1586
1586
|
getViewRect: () => f.current?.getBoundingClientRect() ?? null
|
|
1587
1587
|
}),
|
|
1588
|
-
[
|
|
1588
|
+
[S, p, W, j]
|
|
1589
1589
|
);
|
|
1590
|
-
const l =
|
|
1591
|
-
(
|
|
1590
|
+
const l = O(() => Gt(p), [p]), h = se(
|
|
1591
|
+
(u) => {
|
|
1592
1592
|
if (o) {
|
|
1593
|
-
o(
|
|
1593
|
+
o(u);
|
|
1594
1594
|
return;
|
|
1595
1595
|
}
|
|
1596
1596
|
if (r) {
|
|
1597
|
-
const
|
|
1598
|
-
r(
|
|
1597
|
+
const E = u.startDate.getHours();
|
|
1598
|
+
r(u.startDate, E);
|
|
1599
1599
|
}
|
|
1600
1600
|
},
|
|
1601
1601
|
[o, r]
|
|
1602
|
-
), v =
|
|
1603
|
-
(
|
|
1604
|
-
D("day"),
|
|
1602
|
+
), v = se(
|
|
1603
|
+
(u) => {
|
|
1604
|
+
D("day"), S(u, "day");
|
|
1605
1605
|
},
|
|
1606
|
-
[
|
|
1607
|
-
), b =
|
|
1608
|
-
(
|
|
1609
|
-
D("month"),
|
|
1606
|
+
[S, D]
|
|
1607
|
+
), b = se(
|
|
1608
|
+
(u) => {
|
|
1609
|
+
D("month"), S(u, "month");
|
|
1610
1610
|
},
|
|
1611
|
-
[
|
|
1612
|
-
), y =
|
|
1613
|
-
(
|
|
1614
|
-
t?.(
|
|
1611
|
+
[S, D]
|
|
1612
|
+
), y = se(
|
|
1613
|
+
(u) => {
|
|
1614
|
+
t?.(u);
|
|
1615
1615
|
},
|
|
1616
1616
|
[t]
|
|
1617
|
-
),
|
|
1618
|
-
const
|
|
1617
|
+
), L = () => {
|
|
1618
|
+
const u = G, E = y, A = H;
|
|
1619
1619
|
switch (p) {
|
|
1620
1620
|
case "day":
|
|
1621
1621
|
return /* @__PURE__ */ e(
|
|
1622
|
-
|
|
1622
|
+
it,
|
|
1623
1623
|
{
|
|
1624
|
-
events:
|
|
1624
|
+
events: u,
|
|
1625
1625
|
date: k,
|
|
1626
1626
|
visibleHours: U,
|
|
1627
|
-
workingHours:
|
|
1628
|
-
slotDuration:
|
|
1629
|
-
badgeVariant:
|
|
1630
|
-
onEventClick:
|
|
1631
|
-
renderPopover:
|
|
1632
|
-
...
|
|
1627
|
+
workingHours: j,
|
|
1628
|
+
slotDuration: T,
|
|
1629
|
+
badgeVariant: P,
|
|
1630
|
+
onEventClick: E,
|
|
1631
|
+
renderPopover: A,
|
|
1632
|
+
...d && { slots: d },
|
|
1633
1633
|
...w && { classNames: w }
|
|
1634
1634
|
}
|
|
1635
1635
|
);
|
|
1636
1636
|
case "week":
|
|
1637
1637
|
return /* @__PURE__ */ e(
|
|
1638
|
-
|
|
1638
|
+
at,
|
|
1639
1639
|
{
|
|
1640
|
-
events:
|
|
1640
|
+
events: u,
|
|
1641
1641
|
date: k,
|
|
1642
1642
|
visibleHours: U,
|
|
1643
|
-
workingHours:
|
|
1644
|
-
slotDuration:
|
|
1645
|
-
badgeVariant:
|
|
1646
|
-
onEventClick:
|
|
1647
|
-
renderPopover:
|
|
1648
|
-
...
|
|
1643
|
+
workingHours: j,
|
|
1644
|
+
slotDuration: T,
|
|
1645
|
+
badgeVariant: P,
|
|
1646
|
+
onEventClick: E,
|
|
1647
|
+
renderPopover: A,
|
|
1648
|
+
...d && { slots: d },
|
|
1649
1649
|
...w && { classNames: w }
|
|
1650
1650
|
}
|
|
1651
1651
|
);
|
|
1652
1652
|
case "month":
|
|
1653
1653
|
return /* @__PURE__ */ e(
|
|
1654
|
-
|
|
1654
|
+
De,
|
|
1655
1655
|
{
|
|
1656
|
-
events:
|
|
1656
|
+
events: u,
|
|
1657
1657
|
date: k,
|
|
1658
|
-
badgeVariant:
|
|
1659
|
-
onEventClick:
|
|
1658
|
+
badgeVariant: P,
|
|
1659
|
+
onEventClick: E,
|
|
1660
1660
|
onDayClick: v,
|
|
1661
|
-
renderPopover:
|
|
1661
|
+
renderPopover: A,
|
|
1662
1662
|
showMoreEventsInPopover: g,
|
|
1663
|
-
...
|
|
1663
|
+
...d && { slots: d },
|
|
1664
1664
|
...w && { classNames: w }
|
|
1665
1665
|
}
|
|
1666
1666
|
);
|
|
1667
1667
|
case "year":
|
|
1668
1668
|
return /* @__PURE__ */ e(
|
|
1669
|
-
|
|
1669
|
+
Yt,
|
|
1670
1670
|
{
|
|
1671
|
-
events:
|
|
1671
|
+
events: u,
|
|
1672
1672
|
year: k.getFullYear(),
|
|
1673
1673
|
onMonthClick: b,
|
|
1674
1674
|
onDayClick: v,
|
|
1675
|
-
...
|
|
1675
|
+
...d && { slots: d },
|
|
1676
1676
|
...w && { classNames: w }
|
|
1677
1677
|
}
|
|
1678
1678
|
);
|
|
1679
1679
|
case "agenda":
|
|
1680
1680
|
return /* @__PURE__ */ e(
|
|
1681
|
-
|
|
1681
|
+
st,
|
|
1682
1682
|
{
|
|
1683
|
-
events:
|
|
1683
|
+
events: u,
|
|
1684
1684
|
date: k,
|
|
1685
|
-
onEventClick:
|
|
1686
|
-
renderPopover:
|
|
1687
|
-
...
|
|
1685
|
+
onEventClick: E,
|
|
1686
|
+
renderPopover: A,
|
|
1687
|
+
...d && { slots: d },
|
|
1688
1688
|
...w && { classNames: w }
|
|
1689
1689
|
}
|
|
1690
1690
|
);
|
|
1691
1691
|
// Timeline views
|
|
1692
1692
|
case "timeline-day":
|
|
1693
1693
|
return /* @__PURE__ */ e(
|
|
1694
|
-
|
|
1694
|
+
ve,
|
|
1695
1695
|
{
|
|
1696
1696
|
daysToShow: 1,
|
|
1697
|
-
events:
|
|
1698
|
-
users:
|
|
1697
|
+
events: u,
|
|
1698
|
+
users: V,
|
|
1699
1699
|
selectedDate: k,
|
|
1700
1700
|
visibleHours: {
|
|
1701
|
-
from:
|
|
1702
|
-
to:
|
|
1701
|
+
from: W.startHour,
|
|
1702
|
+
to: W.endHour
|
|
1703
1703
|
},
|
|
1704
|
-
onEventClick:
|
|
1705
|
-
renderPopover:
|
|
1706
|
-
...
|
|
1704
|
+
onEventClick: E,
|
|
1705
|
+
renderPopover: A,
|
|
1706
|
+
...d && { slots: d },
|
|
1707
1707
|
...w && { classNames: w }
|
|
1708
1708
|
}
|
|
1709
1709
|
);
|
|
1710
1710
|
case "timeline-3day":
|
|
1711
1711
|
return /* @__PURE__ */ e(
|
|
1712
|
-
|
|
1712
|
+
ve,
|
|
1713
1713
|
{
|
|
1714
1714
|
daysToShow: 3,
|
|
1715
|
-
events:
|
|
1716
|
-
users:
|
|
1715
|
+
events: u,
|
|
1716
|
+
users: V,
|
|
1717
1717
|
selectedDate: k,
|
|
1718
1718
|
visibleHours: {
|
|
1719
|
-
from:
|
|
1720
|
-
to:
|
|
1719
|
+
from: W.startHour,
|
|
1720
|
+
to: W.endHour
|
|
1721
1721
|
},
|
|
1722
|
-
onEventClick:
|
|
1723
|
-
renderPopover:
|
|
1724
|
-
...
|
|
1722
|
+
onEventClick: E,
|
|
1723
|
+
renderPopover: A,
|
|
1724
|
+
...d && { slots: d },
|
|
1725
1725
|
...w && { classNames: w }
|
|
1726
1726
|
}
|
|
1727
1727
|
);
|
|
1728
1728
|
case "timeline-week":
|
|
1729
1729
|
return /* @__PURE__ */ e(
|
|
1730
|
-
|
|
1730
|
+
ve,
|
|
1731
1731
|
{
|
|
1732
1732
|
daysToShow: 7,
|
|
1733
|
-
events:
|
|
1734
|
-
users:
|
|
1733
|
+
events: u,
|
|
1734
|
+
users: V,
|
|
1735
1735
|
selectedDate: k,
|
|
1736
1736
|
visibleHours: {
|
|
1737
|
-
from:
|
|
1738
|
-
to:
|
|
1737
|
+
from: W.startHour,
|
|
1738
|
+
to: W.endHour
|
|
1739
1739
|
},
|
|
1740
|
-
onEventClick:
|
|
1741
|
-
renderPopover:
|
|
1742
|
-
...
|
|
1740
|
+
onEventClick: E,
|
|
1741
|
+
renderPopover: A,
|
|
1742
|
+
...d && { slots: d },
|
|
1743
1743
|
...w && { classNames: w }
|
|
1744
1744
|
}
|
|
1745
1745
|
);
|
|
1746
1746
|
default:
|
|
1747
1747
|
return /* @__PURE__ */ e(
|
|
1748
|
-
|
|
1748
|
+
De,
|
|
1749
1749
|
{
|
|
1750
|
-
events:
|
|
1750
|
+
events: u,
|
|
1751
1751
|
date: k,
|
|
1752
|
-
badgeVariant:
|
|
1753
|
-
onEventClick:
|
|
1752
|
+
badgeVariant: P,
|
|
1753
|
+
onEventClick: E,
|
|
1754
1754
|
onDayClick: v,
|
|
1755
|
-
...
|
|
1755
|
+
...d && { slots: d },
|
|
1756
1756
|
...w && { classNames: w }
|
|
1757
1757
|
}
|
|
1758
1758
|
);
|
|
1759
1759
|
}
|
|
1760
|
-
}, M =
|
|
1761
|
-
|
|
1760
|
+
}, M = ke(null), [_, J] = ae(!1);
|
|
1761
|
+
he(() => {
|
|
1762
1762
|
f.current = M.current;
|
|
1763
|
-
}),
|
|
1764
|
-
const
|
|
1765
|
-
if (!
|
|
1766
|
-
const
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
for (const ae of Array.from(Y.children))
|
|
1770
|
-
if (ae instanceof HTMLElement && ae.scrollHeight > ae.clientHeight + 2)
|
|
1771
|
-
return ae;
|
|
1772
|
-
return Y;
|
|
1773
|
-
}
|
|
1774
|
-
return null;
|
|
1775
|
-
}, W = () => {
|
|
1776
|
-
const { scrollLeft: Y, scrollWidth: ae, clientWidth: be } = d;
|
|
1777
|
-
X(Y + be < ae - 2);
|
|
1778
|
-
}, T = () => {
|
|
1779
|
-
const Y = d.scrollHeight > d.clientHeight + 2 ? d : S();
|
|
1780
|
-
if (Y) {
|
|
1781
|
-
const ae = d.getBoundingClientRect(), be = Y.getBoundingClientRect(), Qe = Y.scrollTop + Y.clientHeight / 2, Ze = be.top - ae.top + Qe;
|
|
1782
|
-
q(Ze);
|
|
1783
|
-
} else
|
|
1784
|
-
q(null);
|
|
1785
|
-
}, V = () => {
|
|
1786
|
-
W(), T();
|
|
1763
|
+
}), he(() => {
|
|
1764
|
+
const u = M.current;
|
|
1765
|
+
if (!u) return;
|
|
1766
|
+
const E = () => {
|
|
1767
|
+
const { scrollLeft: Y, scrollWidth: R, clientWidth: X } = u;
|
|
1768
|
+
J(Y + X < R - 4);
|
|
1787
1769
|
};
|
|
1788
|
-
|
|
1789
|
-
const
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
})
|
|
1793
|
-
|
|
1794
|
-
we.observe(d);
|
|
1795
|
-
for (const Y of Array.from(d.children))
|
|
1796
|
-
we.observe(Y);
|
|
1797
|
-
return () => {
|
|
1798
|
-
d.removeEventListener("scroll", V), Q && Q !== d && Q.removeEventListener("scroll", T), we.disconnect();
|
|
1770
|
+
E(), u.addEventListener("scroll", E, { passive: !0 });
|
|
1771
|
+
const A = new ResizeObserver(E);
|
|
1772
|
+
A.observe(u);
|
|
1773
|
+
const F = new MutationObserver(E);
|
|
1774
|
+
return F.observe(u, { childList: !0, subtree: !0 }), () => {
|
|
1775
|
+
u.removeEventListener("scroll", E), A.disconnect(), F.disconnect();
|
|
1799
1776
|
};
|
|
1800
1777
|
}, [p]);
|
|
1801
|
-
const
|
|
1802
|
-
M.current?.scrollBy({ left:
|
|
1778
|
+
const K = se(() => {
|
|
1779
|
+
M.current?.scrollBy({ left: 300, behavior: "smooth" });
|
|
1803
1780
|
}, []);
|
|
1804
1781
|
return /* @__PURE__ */ e(
|
|
1805
|
-
|
|
1782
|
+
dt,
|
|
1806
1783
|
{
|
|
1807
1784
|
mode: l,
|
|
1808
1785
|
onSelect: h,
|
|
1809
1786
|
minDurationMinutes: x,
|
|
1810
|
-
slotDurationMinutes:
|
|
1787
|
+
slotDurationMinutes: T,
|
|
1811
1788
|
enabled: !!(o || r),
|
|
1812
1789
|
children: /* @__PURE__ */ n(
|
|
1813
1790
|
"div",
|
|
@@ -1819,20 +1796,20 @@ function er({
|
|
|
1819
1796
|
),
|
|
1820
1797
|
children: [
|
|
1821
1798
|
i && /* @__PURE__ */ e(
|
|
1822
|
-
|
|
1799
|
+
ot,
|
|
1823
1800
|
{
|
|
1824
1801
|
currentDate: k,
|
|
1825
1802
|
view: p,
|
|
1826
1803
|
events: G,
|
|
1827
1804
|
onViewChange: D,
|
|
1828
|
-
onNavigateToday: () =>
|
|
1805
|
+
onNavigateToday: () => S(/* @__PURE__ */ new Date(), p),
|
|
1829
1806
|
onNavigatePrev: () => {
|
|
1830
|
-
const
|
|
1831
|
-
p === "day" || p === "timeline-day" ?
|
|
1807
|
+
const u = new Date(k);
|
|
1808
|
+
p === "day" || p === "timeline-day" ? u.setDate(u.getDate() - 1) : p === "timeline-3day" ? u.setDate(u.getDate() - 3) : p === "week" || p === "timeline-week" ? u.setDate(u.getDate() - 7) : p === "month" ? u.setMonth(u.getMonth() - 1) : p === "year" ? u.setFullYear(u.getFullYear() - 1) : u.setDate(u.getDate() - 7), S(u, p);
|
|
1832
1809
|
},
|
|
1833
1810
|
onNavigateNext: () => {
|
|
1834
|
-
const
|
|
1835
|
-
p === "day" || p === "timeline-day" ?
|
|
1811
|
+
const u = new Date(k);
|
|
1812
|
+
p === "day" || p === "timeline-day" ? u.setDate(u.getDate() + 1) : p === "timeline-3day" ? u.setDate(u.getDate() + 3) : p === "week" || p === "timeline-week" ? u.setDate(u.getDate() + 7) : p === "month" ? u.setMonth(u.getMonth() + 1) : p === "year" ? u.setFullYear(u.getFullYear() + 1) : u.setDate(u.getDate() + 7), S(u, p);
|
|
1836
1813
|
},
|
|
1837
1814
|
availableViews: [
|
|
1838
1815
|
"day",
|
|
@@ -1843,8 +1820,8 @@ function er({
|
|
|
1843
1820
|
],
|
|
1844
1821
|
showTimelineViews: !0,
|
|
1845
1822
|
showSettings: !!C,
|
|
1846
|
-
...!
|
|
1847
|
-
actions:
|
|
1823
|
+
...!I && s && { onAddEvent: s },
|
|
1824
|
+
actions: I,
|
|
1848
1825
|
settingsContent: C,
|
|
1849
1826
|
filterContent: z
|
|
1850
1827
|
}
|
|
@@ -1858,21 +1835,18 @@ function er({
|
|
|
1858
1835
|
"h-full border rounded-lg bg-white overflow-x-auto",
|
|
1859
1836
|
w?.viewContainer
|
|
1860
1837
|
),
|
|
1861
|
-
children:
|
|
1838
|
+
children: L()
|
|
1862
1839
|
}
|
|
1863
1840
|
),
|
|
1864
1841
|
c && /* @__PURE__ */ e("div", { className: "inno-calendar-loading-overlay", children: /* @__PURE__ */ e("div", { className: "inno-calendar-spinner" }) }),
|
|
1865
|
-
|
|
1842
|
+
_ && /* @__PURE__ */ e(
|
|
1866
1843
|
"button",
|
|
1867
1844
|
{
|
|
1868
1845
|
type: "button",
|
|
1869
|
-
onClick:
|
|
1846
|
+
onClick: K,
|
|
1870
1847
|
className: "inno-scroll-right-btn",
|
|
1871
1848
|
"aria-label": "Scroll right",
|
|
1872
|
-
|
|
1873
|
-
style: { top: K, transform: "translateY(-50%)" }
|
|
1874
|
-
},
|
|
1875
|
-
children: /* @__PURE__ */ e(
|
|
1849
|
+
children: /* @__PURE__ */ n(
|
|
1876
1850
|
"svg",
|
|
1877
1851
|
{
|
|
1878
1852
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -1884,7 +1858,11 @@ function er({
|
|
|
1884
1858
|
strokeWidth: "2",
|
|
1885
1859
|
strokeLinecap: "round",
|
|
1886
1860
|
strokeLinejoin: "round",
|
|
1887
|
-
|
|
1861
|
+
"aria-hidden": "true",
|
|
1862
|
+
children: [
|
|
1863
|
+
/* @__PURE__ */ e("title", { children: "Scroll right" }),
|
|
1864
|
+
/* @__PURE__ */ e("path", { d: "m9 18 6-6-6-6" })
|
|
1865
|
+
]
|
|
1888
1866
|
}
|
|
1889
1867
|
)
|
|
1890
1868
|
}
|
|
@@ -1896,7 +1874,7 @@ function er({
|
|
|
1896
1874
|
}
|
|
1897
1875
|
);
|
|
1898
1876
|
}
|
|
1899
|
-
function
|
|
1877
|
+
function qt({
|
|
1900
1878
|
events: t,
|
|
1901
1879
|
users: r = [],
|
|
1902
1880
|
scheduleTypes: o = [],
|
|
@@ -1906,29 +1884,29 @@ function tr({
|
|
|
1906
1884
|
initialScheduleTypeIds: x,
|
|
1907
1885
|
initialParticipantIds: g,
|
|
1908
1886
|
initialWorkingHoursView: c,
|
|
1909
|
-
initialSearchQuery:
|
|
1887
|
+
initialSearchQuery: d,
|
|
1910
1888
|
preferencesConfig: w,
|
|
1911
1889
|
onEventClick: C,
|
|
1912
1890
|
onSlotClick: z,
|
|
1913
|
-
onSlotSelect:
|
|
1914
|
-
onAddEvent:
|
|
1891
|
+
onSlotSelect: I,
|
|
1892
|
+
onAddEvent: H,
|
|
1915
1893
|
onEventDrop: N,
|
|
1916
1894
|
onDateChange: p,
|
|
1917
1895
|
onViewChange: D,
|
|
1918
1896
|
className: k,
|
|
1919
|
-
showHeader:
|
|
1920
|
-
minSelectionMinutes:
|
|
1897
|
+
showHeader: S = !0,
|
|
1898
|
+
minSelectionMinutes: T = 30,
|
|
1921
1899
|
showMoreEventsInPopover: G = !1,
|
|
1922
|
-
isLoading:
|
|
1923
|
-
renderPopover:
|
|
1924
|
-
slots:
|
|
1925
|
-
classNames:
|
|
1900
|
+
isLoading: V = !1,
|
|
1901
|
+
renderPopover: B,
|
|
1902
|
+
slots: j,
|
|
1903
|
+
classNames: P,
|
|
1926
1904
|
settingsContent: $,
|
|
1927
|
-
filterContent:
|
|
1905
|
+
filterContent: W,
|
|
1928
1906
|
headerActions: U
|
|
1929
1907
|
}, f) {
|
|
1930
|
-
return /* @__PURE__ */ e(
|
|
1931
|
-
|
|
1908
|
+
return /* @__PURE__ */ e(ct, { ...N && { onEventDrop: N }, children: /* @__PURE__ */ e(
|
|
1909
|
+
Je,
|
|
1932
1910
|
{
|
|
1933
1911
|
initialEvents: t,
|
|
1934
1912
|
initialUsers: r,
|
|
@@ -1939,27 +1917,27 @@ function tr({
|
|
|
1939
1917
|
...x && { initialScheduleTypeIds: x },
|
|
1940
1918
|
...g && { initialParticipantIds: g },
|
|
1941
1919
|
...c && { initialWorkingHoursView: c },
|
|
1942
|
-
...
|
|
1920
|
+
...d && { initialSearchQuery: d },
|
|
1943
1921
|
...w && { preferencesConfig: w },
|
|
1944
1922
|
...p && { onDateChange: p },
|
|
1945
1923
|
...D && { onViewChange: D },
|
|
1946
1924
|
children: /* @__PURE__ */ e(
|
|
1947
|
-
|
|
1925
|
+
Kt,
|
|
1948
1926
|
{
|
|
1949
1927
|
...C && { onEventClick: C },
|
|
1950
1928
|
...z && { onSlotClick: z },
|
|
1951
|
-
...
|
|
1952
|
-
...
|
|
1953
|
-
...
|
|
1929
|
+
...I && { onSlotSelect: I },
|
|
1930
|
+
...H && { onAddEvent: H },
|
|
1931
|
+
...B && { renderPopover: B },
|
|
1954
1932
|
className: k,
|
|
1955
|
-
showHeader:
|
|
1956
|
-
minSelectionMinutes:
|
|
1933
|
+
showHeader: S,
|
|
1934
|
+
minSelectionMinutes: T,
|
|
1957
1935
|
showMoreEventsInPopover: G,
|
|
1958
|
-
isLoading:
|
|
1959
|
-
...
|
|
1960
|
-
...
|
|
1936
|
+
isLoading: V,
|
|
1937
|
+
...j && { slots: j },
|
|
1938
|
+
...P && { classNames: P },
|
|
1961
1939
|
settingsContent: $,
|
|
1962
|
-
filterContent:
|
|
1940
|
+
filterContent: W,
|
|
1963
1941
|
headerActions: U,
|
|
1964
1942
|
calendarRef: f
|
|
1965
1943
|
}
|
|
@@ -1967,7 +1945,7 @@ function tr({
|
|
|
1967
1945
|
}
|
|
1968
1946
|
) });
|
|
1969
1947
|
}
|
|
1970
|
-
const
|
|
1948
|
+
const Yr = fe(qt), ne = fe(
|
|
1971
1949
|
({ className: t, children: r, ...o }, s) => /* @__PURE__ */ e(
|
|
1972
1950
|
"select",
|
|
1973
1951
|
{
|
|
@@ -1985,8 +1963,8 @@ const Qr = pe(tr), se = pe(
|
|
|
1985
1963
|
}
|
|
1986
1964
|
)
|
|
1987
1965
|
);
|
|
1988
|
-
|
|
1989
|
-
const
|
|
1966
|
+
ne.displayName = "Select";
|
|
1967
|
+
const Q = fe(({ className: t, ...r }, o) => /* @__PURE__ */ e(
|
|
1990
1968
|
"label",
|
|
1991
1969
|
{
|
|
1992
1970
|
ref: o,
|
|
@@ -1997,8 +1975,8 @@ const Z = pe(({ className: t, ...r }, o) => /* @__PURE__ */ e(
|
|
|
1997
1975
|
...r
|
|
1998
1976
|
}
|
|
1999
1977
|
));
|
|
2000
|
-
|
|
2001
|
-
function
|
|
1978
|
+
Q.displayName = "Label";
|
|
1979
|
+
function Jt({ className: t }) {
|
|
2002
1980
|
return /* @__PURE__ */ n(
|
|
2003
1981
|
"svg",
|
|
2004
1982
|
{
|
|
@@ -2020,7 +1998,7 @@ function rr({ className: t }) {
|
|
|
2020
1998
|
}
|
|
2021
1999
|
);
|
|
2022
2000
|
}
|
|
2023
|
-
function
|
|
2001
|
+
function Xt({ className: t }) {
|
|
2024
2002
|
return /* @__PURE__ */ n(
|
|
2025
2003
|
"svg",
|
|
2026
2004
|
{
|
|
@@ -2041,12 +2019,12 @@ function nr({ className: t }) {
|
|
|
2041
2019
|
}
|
|
2042
2020
|
);
|
|
2043
2021
|
}
|
|
2044
|
-
const
|
|
2022
|
+
const Qt = [
|
|
2045
2023
|
{ value: 15, label: "15 minutes" },
|
|
2046
2024
|
{ value: 30, label: "30 minutes" },
|
|
2047
2025
|
{ value: 60, label: "1 hour" }
|
|
2048
2026
|
];
|
|
2049
|
-
function
|
|
2027
|
+
function Gr({
|
|
2050
2028
|
value: t,
|
|
2051
2029
|
onChange: r,
|
|
2052
2030
|
isLocked: o = !1,
|
|
@@ -2063,28 +2041,28 @@ function Zr({
|
|
|
2063
2041
|
};
|
|
2064
2042
|
return /* @__PURE__ */ n("div", { className: m("flex flex-col gap-3", s), children: [
|
|
2065
2043
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
2066
|
-
/* @__PURE__ */ e(
|
|
2067
|
-
o ? /* @__PURE__ */ e(
|
|
2068
|
-
/* @__PURE__ */ e(
|
|
2069
|
-
/* @__PURE__ */ e(
|
|
2070
|
-
] }) }) : /* @__PURE__ */ e(
|
|
2071
|
-
/* @__PURE__ */ e(
|
|
2072
|
-
/* @__PURE__ */ e(
|
|
2044
|
+
/* @__PURE__ */ e(Q, { className: "text-sm font-semibold", children: i.title }),
|
|
2045
|
+
o ? /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
|
|
2046
|
+
/* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(Xt, { className: "size-3 text-muted-foreground" }) }),
|
|
2047
|
+
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
|
|
2048
|
+
] }) }) : /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
|
|
2049
|
+
/* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(Jt, { className: "size-3 text-muted-foreground" }) }),
|
|
2050
|
+
/* @__PURE__ */ e(re, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
|
|
2073
2051
|
] }) })
|
|
2074
2052
|
] }),
|
|
2075
2053
|
/* @__PURE__ */ e(
|
|
2076
|
-
|
|
2054
|
+
ne,
|
|
2077
2055
|
{
|
|
2078
2056
|
value: t.toString(),
|
|
2079
2057
|
onChange: x,
|
|
2080
2058
|
disabled: o,
|
|
2081
2059
|
className: "h-9 w-[128px] text-sm",
|
|
2082
|
-
children:
|
|
2060
|
+
children: Qt.map((g) => /* @__PURE__ */ e("option", { value: g.value.toString(), children: g.label }, g.value))
|
|
2083
2061
|
}
|
|
2084
2062
|
)
|
|
2085
2063
|
] });
|
|
2086
2064
|
}
|
|
2087
|
-
function
|
|
2065
|
+
function Zt({ className: t }) {
|
|
2088
2066
|
return /* @__PURE__ */ n(
|
|
2089
2067
|
"svg",
|
|
2090
2068
|
{
|
|
@@ -2106,7 +2084,7 @@ function sr({ className: t }) {
|
|
|
2106
2084
|
}
|
|
2107
2085
|
);
|
|
2108
2086
|
}
|
|
2109
|
-
function
|
|
2087
|
+
function er({ className: t }) {
|
|
2110
2088
|
return /* @__PURE__ */ n(
|
|
2111
2089
|
"svg",
|
|
2112
2090
|
{
|
|
@@ -2127,12 +2105,12 @@ function ar({ className: t }) {
|
|
|
2127
2105
|
}
|
|
2128
2106
|
);
|
|
2129
2107
|
}
|
|
2130
|
-
const
|
|
2108
|
+
const tr = [
|
|
2131
2109
|
{ value: "dot", label: "Dot indicator" },
|
|
2132
2110
|
{ value: "colored", label: "Full color" },
|
|
2133
2111
|
{ value: "mixed", label: "Mixed" }
|
|
2134
2112
|
];
|
|
2135
|
-
function
|
|
2113
|
+
function Kr({
|
|
2136
2114
|
value: t,
|
|
2137
2115
|
onChange: r,
|
|
2138
2116
|
isLocked: o = !1,
|
|
@@ -2154,28 +2132,28 @@ function en({
|
|
|
2154
2132
|
};
|
|
2155
2133
|
return /* @__PURE__ */ n("div", { className: m("flex flex-col gap-3", s), children: [
|
|
2156
2134
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
2157
|
-
/* @__PURE__ */ e(
|
|
2158
|
-
o ? /* @__PURE__ */ e(
|
|
2159
|
-
/* @__PURE__ */ e(
|
|
2160
|
-
/* @__PURE__ */ e(
|
|
2161
|
-
] }) }) : /* @__PURE__ */ e(
|
|
2162
|
-
/* @__PURE__ */ e(
|
|
2163
|
-
/* @__PURE__ */ e(
|
|
2135
|
+
/* @__PURE__ */ e(Q, { className: "text-sm font-semibold", children: i.title }),
|
|
2136
|
+
o ? /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
|
|
2137
|
+
/* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(er, { className: "size-3 text-muted-foreground" }) }),
|
|
2138
|
+
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
|
|
2139
|
+
] }) }) : /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
|
|
2140
|
+
/* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(Zt, { className: "size-3 text-muted-foreground" }) }),
|
|
2141
|
+
/* @__PURE__ */ e(re, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
|
|
2164
2142
|
] }) })
|
|
2165
2143
|
] }),
|
|
2166
2144
|
/* @__PURE__ */ e(
|
|
2167
|
-
|
|
2145
|
+
ne,
|
|
2168
2146
|
{
|
|
2169
2147
|
value: t,
|
|
2170
2148
|
onChange: g,
|
|
2171
2149
|
disabled: o,
|
|
2172
2150
|
className: "h-9 w-[128px] text-sm",
|
|
2173
|
-
children:
|
|
2151
|
+
children: tr.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: x(c.value) }, c.value))
|
|
2174
2152
|
}
|
|
2175
2153
|
)
|
|
2176
2154
|
] });
|
|
2177
2155
|
}
|
|
2178
|
-
function
|
|
2156
|
+
function rr({ className: t }) {
|
|
2179
2157
|
return /* @__PURE__ */ n(
|
|
2180
2158
|
"svg",
|
|
2181
2159
|
{
|
|
@@ -2197,7 +2175,7 @@ function lr({ className: t }) {
|
|
|
2197
2175
|
}
|
|
2198
2176
|
);
|
|
2199
2177
|
}
|
|
2200
|
-
function
|
|
2178
|
+
function nr({ className: t }) {
|
|
2201
2179
|
return /* @__PURE__ */ n(
|
|
2202
2180
|
"svg",
|
|
2203
2181
|
{
|
|
@@ -2218,13 +2196,13 @@ function cr({ className: t }) {
|
|
|
2218
2196
|
}
|
|
2219
2197
|
);
|
|
2220
2198
|
}
|
|
2221
|
-
function
|
|
2199
|
+
function or() {
|
|
2222
2200
|
return Array.from({ length: 25 }, (t, r) => ({
|
|
2223
2201
|
value: r,
|
|
2224
2202
|
label: `${String(r).padStart(2, "0")}:00`
|
|
2225
2203
|
}));
|
|
2226
2204
|
}
|
|
2227
|
-
function
|
|
2205
|
+
function qr({
|
|
2228
2206
|
value: t,
|
|
2229
2207
|
onChange: r,
|
|
2230
2208
|
isLocked: o = !1,
|
|
@@ -2238,66 +2216,66 @@ function tn({
|
|
|
2238
2216
|
lockedMessage: "This setting is locked by the administrator",
|
|
2239
2217
|
infoMessage: "Set the visible hour range for day and week views. Hours outside this range will be hidden.",
|
|
2240
2218
|
...a
|
|
2241
|
-
}, x =
|
|
2219
|
+
}, x = or(), g = (d) => {
|
|
2242
2220
|
if (o) return;
|
|
2243
|
-
const w = Number(
|
|
2221
|
+
const w = Number(d.target.value);
|
|
2244
2222
|
w < t.endHour && r({ ...t, startHour: w });
|
|
2245
|
-
}, c = (
|
|
2223
|
+
}, c = (d) => {
|
|
2246
2224
|
if (o) return;
|
|
2247
|
-
const w = Number(
|
|
2225
|
+
const w = Number(d.target.value);
|
|
2248
2226
|
w > t.startHour && r({ ...t, endHour: w });
|
|
2249
2227
|
};
|
|
2250
2228
|
return /* @__PURE__ */ n("div", { className: m("flex flex-col gap-3", s), children: [
|
|
2251
2229
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
2252
|
-
/* @__PURE__ */ e(
|
|
2253
|
-
o ? /* @__PURE__ */ e(
|
|
2254
|
-
/* @__PURE__ */ e(
|
|
2255
|
-
/* @__PURE__ */ e(
|
|
2256
|
-
] }) }) : /* @__PURE__ */ e(
|
|
2257
|
-
/* @__PURE__ */ e(
|
|
2258
|
-
/* @__PURE__ */ e(
|
|
2230
|
+
/* @__PURE__ */ e(Q, { className: "text-sm font-semibold", children: i.title }),
|
|
2231
|
+
o ? /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
|
|
2232
|
+
/* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(nr, { className: "size-3 text-muted-foreground" }) }),
|
|
2233
|
+
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
|
|
2234
|
+
] }) }) : /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
|
|
2235
|
+
/* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(rr, { className: "size-3 text-muted-foreground" }) }),
|
|
2236
|
+
/* @__PURE__ */ e(re, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
|
|
2259
2237
|
] }) })
|
|
2260
2238
|
] }),
|
|
2261
2239
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
2262
2240
|
/* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
2263
|
-
/* @__PURE__ */ e(
|
|
2241
|
+
/* @__PURE__ */ e(Q, { className: "text-xs text-muted-foreground", children: i.from }),
|
|
2264
2242
|
/* @__PURE__ */ e(
|
|
2265
|
-
|
|
2243
|
+
ne,
|
|
2266
2244
|
{
|
|
2267
2245
|
value: t.startHour.toString(),
|
|
2268
2246
|
onChange: g,
|
|
2269
2247
|
disabled: o,
|
|
2270
2248
|
className: "h-9 w-[88px] text-sm",
|
|
2271
|
-
children: x.map((
|
|
2249
|
+
children: x.map((d) => /* @__PURE__ */ e(
|
|
2272
2250
|
"option",
|
|
2273
2251
|
{
|
|
2274
|
-
value:
|
|
2275
|
-
disabled:
|
|
2276
|
-
children:
|
|
2252
|
+
value: d.value.toString(),
|
|
2253
|
+
disabled: d.value >= t.endHour,
|
|
2254
|
+
children: d.label
|
|
2277
2255
|
},
|
|
2278
|
-
|
|
2256
|
+
d.value
|
|
2279
2257
|
))
|
|
2280
2258
|
}
|
|
2281
2259
|
)
|
|
2282
2260
|
] }),
|
|
2283
2261
|
/* @__PURE__ */ e("span", { className: "mt-5 text-muted-foreground", children: "—" }),
|
|
2284
2262
|
/* @__PURE__ */ n("div", { className: "flex flex-col gap-1", children: [
|
|
2285
|
-
/* @__PURE__ */ e(
|
|
2263
|
+
/* @__PURE__ */ e(Q, { className: "text-xs text-muted-foreground", children: i.to }),
|
|
2286
2264
|
/* @__PURE__ */ e(
|
|
2287
|
-
|
|
2265
|
+
ne,
|
|
2288
2266
|
{
|
|
2289
2267
|
value: t.endHour.toString(),
|
|
2290
2268
|
onChange: c,
|
|
2291
2269
|
disabled: o,
|
|
2292
2270
|
className: "h-9 w-[88px] text-sm",
|
|
2293
|
-
children: x.map((
|
|
2271
|
+
children: x.map((d) => /* @__PURE__ */ e(
|
|
2294
2272
|
"option",
|
|
2295
2273
|
{
|
|
2296
|
-
value:
|
|
2297
|
-
disabled:
|
|
2298
|
-
children:
|
|
2274
|
+
value: d.value.toString(),
|
|
2275
|
+
disabled: d.value <= t.startHour,
|
|
2276
|
+
children: d.label
|
|
2299
2277
|
},
|
|
2300
|
-
|
|
2278
|
+
d.value
|
|
2301
2279
|
))
|
|
2302
2280
|
}
|
|
2303
2281
|
)
|
|
@@ -2305,7 +2283,7 @@ function tn({
|
|
|
2305
2283
|
] })
|
|
2306
2284
|
] });
|
|
2307
2285
|
}
|
|
2308
|
-
function
|
|
2286
|
+
function sr({ className: t }) {
|
|
2309
2287
|
return /* @__PURE__ */ n(
|
|
2310
2288
|
"svg",
|
|
2311
2289
|
{
|
|
@@ -2327,7 +2305,7 @@ function ur({ className: t }) {
|
|
|
2327
2305
|
}
|
|
2328
2306
|
);
|
|
2329
2307
|
}
|
|
2330
|
-
function
|
|
2308
|
+
function ar({ className: t }) {
|
|
2331
2309
|
return /* @__PURE__ */ n(
|
|
2332
2310
|
"svg",
|
|
2333
2311
|
{
|
|
@@ -2348,7 +2326,7 @@ function hr({ className: t }) {
|
|
|
2348
2326
|
}
|
|
2349
2327
|
);
|
|
2350
2328
|
}
|
|
2351
|
-
function
|
|
2329
|
+
function ir({ className: t }) {
|
|
2352
2330
|
return /* @__PURE__ */ e(
|
|
2353
2331
|
"svg",
|
|
2354
2332
|
{
|
|
@@ -2366,7 +2344,7 @@ function mr({ className: t }) {
|
|
|
2366
2344
|
}
|
|
2367
2345
|
);
|
|
2368
2346
|
}
|
|
2369
|
-
const
|
|
2347
|
+
const lr = [
|
|
2370
2348
|
"monday",
|
|
2371
2349
|
"tuesday",
|
|
2372
2350
|
"wednesday",
|
|
@@ -2375,13 +2353,13 @@ const fr = [
|
|
|
2375
2353
|
"saturday",
|
|
2376
2354
|
"sunday"
|
|
2377
2355
|
];
|
|
2378
|
-
function
|
|
2356
|
+
function cr() {
|
|
2379
2357
|
return Array.from({ length: 25 }, (t, r) => ({
|
|
2380
2358
|
value: r,
|
|
2381
2359
|
label: `${String(r).padStart(2, "0")}:00`
|
|
2382
2360
|
}));
|
|
2383
2361
|
}
|
|
2384
|
-
const
|
|
2362
|
+
const We = {
|
|
2385
2363
|
sunday: "Sun",
|
|
2386
2364
|
monday: "Mon",
|
|
2387
2365
|
tuesday: "Tue",
|
|
@@ -2390,17 +2368,17 @@ const $e = {
|
|
|
2390
2368
|
friday: "Fri",
|
|
2391
2369
|
saturday: "Sat"
|
|
2392
2370
|
};
|
|
2393
|
-
function
|
|
2371
|
+
function dr({ dayLabel: t, config: r, onChange: o, disabled: s, hourOptions: a }) {
|
|
2394
2372
|
const i = () => {
|
|
2395
2373
|
s || o({ ...r, enabled: !r.enabled });
|
|
2396
2374
|
}, x = (c) => {
|
|
2397
2375
|
if (s) return;
|
|
2398
|
-
const
|
|
2399
|
-
|
|
2376
|
+
const d = Number(c.target.value);
|
|
2377
|
+
d < r.to && o({ ...r, from: d });
|
|
2400
2378
|
}, g = (c) => {
|
|
2401
2379
|
if (s) return;
|
|
2402
|
-
const
|
|
2403
|
-
|
|
2380
|
+
const d = Number(c.target.value);
|
|
2381
|
+
d > r.from && o({ ...r, to: d });
|
|
2404
2382
|
};
|
|
2405
2383
|
return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
2406
2384
|
/* @__PURE__ */ e(
|
|
@@ -2417,12 +2395,12 @@ function xr({ dayLabel: t, config: r, onChange: o, disabled: s, hourOptions: a }
|
|
|
2417
2395
|
r.enabled ? "border-primary bg-primary text-primary-foreground" : "border-input bg-background",
|
|
2418
2396
|
s && "cursor-not-allowed opacity-50"
|
|
2419
2397
|
),
|
|
2420
|
-
children: r.enabled && /* @__PURE__ */ e(
|
|
2398
|
+
children: r.enabled && /* @__PURE__ */ e(ir, { className: "size-3" })
|
|
2421
2399
|
}
|
|
2422
2400
|
),
|
|
2423
2401
|
/* @__PURE__ */ e("span", { className: m("w-10 text-sm", !r.enabled && "text-muted-foreground"), children: t }),
|
|
2424
2402
|
/* @__PURE__ */ e(
|
|
2425
|
-
|
|
2403
|
+
ne,
|
|
2426
2404
|
{
|
|
2427
2405
|
value: r.from.toString(),
|
|
2428
2406
|
onChange: x,
|
|
@@ -2433,7 +2411,7 @@ function xr({ dayLabel: t, config: r, onChange: o, disabled: s, hourOptions: a }
|
|
|
2433
2411
|
),
|
|
2434
2412
|
/* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "—" }),
|
|
2435
2413
|
/* @__PURE__ */ e(
|
|
2436
|
-
|
|
2414
|
+
ne,
|
|
2437
2415
|
{
|
|
2438
2416
|
value: r.to.toString(),
|
|
2439
2417
|
onChange: g,
|
|
@@ -2444,7 +2422,7 @@ function xr({ dayLabel: t, config: r, onChange: o, disabled: s, hourOptions: a }
|
|
|
2444
2422
|
)
|
|
2445
2423
|
] });
|
|
2446
2424
|
}
|
|
2447
|
-
function
|
|
2425
|
+
function Jr({
|
|
2448
2426
|
value: t,
|
|
2449
2427
|
onChange: r,
|
|
2450
2428
|
isLocked: o = !1,
|
|
@@ -2455,28 +2433,28 @@ function rn({
|
|
|
2455
2433
|
title: "Working hours",
|
|
2456
2434
|
lockedMessage: "This setting is locked by the administrator",
|
|
2457
2435
|
infoMessage: "Configure working hours for each day of the week. Non-working hours will be grayed out in day and week views.",
|
|
2458
|
-
days:
|
|
2436
|
+
days: We,
|
|
2459
2437
|
...a
|
|
2460
|
-
}, x =
|
|
2461
|
-
o || r({ ...t, [c]:
|
|
2438
|
+
}, x = cr(), g = (c, d) => {
|
|
2439
|
+
o || r({ ...t, [c]: d });
|
|
2462
2440
|
};
|
|
2463
2441
|
return /* @__PURE__ */ n("div", { className: m("flex flex-col gap-3", s), children: [
|
|
2464
2442
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
2465
|
-
/* @__PURE__ */ e(
|
|
2466
|
-
o ? /* @__PURE__ */ e(
|
|
2467
|
-
/* @__PURE__ */ e(
|
|
2468
|
-
/* @__PURE__ */ e(
|
|
2469
|
-
] }) }) : /* @__PURE__ */ e(
|
|
2470
|
-
/* @__PURE__ */ e(
|
|
2471
|
-
/* @__PURE__ */ e(
|
|
2443
|
+
/* @__PURE__ */ e(Q, { className: "text-sm font-semibold", children: i.title }),
|
|
2444
|
+
o ? /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
|
|
2445
|
+
/* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(ar, { className: "size-3 text-muted-foreground" }) }),
|
|
2446
|
+
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ e("p", { children: i.lockedMessage }) })
|
|
2447
|
+
] }) }) : /* @__PURE__ */ e(Z, { delayDuration: 100, children: /* @__PURE__ */ n(ee, { children: [
|
|
2448
|
+
/* @__PURE__ */ e(te, { children: /* @__PURE__ */ e(sr, { className: "size-3 text-muted-foreground" }) }),
|
|
2449
|
+
/* @__PURE__ */ e(re, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: i.infoMessage }) })
|
|
2472
2450
|
] }) })
|
|
2473
2451
|
] }),
|
|
2474
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children:
|
|
2475
|
-
|
|
2452
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: lr.map((c) => /* @__PURE__ */ e(
|
|
2453
|
+
dr,
|
|
2476
2454
|
{
|
|
2477
|
-
dayLabel: i.days?.[c] ??
|
|
2455
|
+
dayLabel: i.days?.[c] ?? We[c],
|
|
2478
2456
|
config: t[c],
|
|
2479
|
-
onChange: (
|
|
2457
|
+
onChange: (d) => g(c, d),
|
|
2480
2458
|
disabled: o,
|
|
2481
2459
|
hourOptions: x
|
|
2482
2460
|
},
|
|
@@ -2484,7 +2462,7 @@ function rn({
|
|
|
2484
2462
|
)) })
|
|
2485
2463
|
] });
|
|
2486
2464
|
}
|
|
2487
|
-
const
|
|
2465
|
+
const Xr = {
|
|
2488
2466
|
sunday: { enabled: !1, from: 8, to: 18 },
|
|
2489
2467
|
monday: { enabled: !0, from: 8, to: 18 },
|
|
2490
2468
|
tuesday: { enabled: !0, from: 8, to: 18 },
|
|
@@ -2493,7 +2471,7 @@ const nn = {
|
|
|
2493
2471
|
friday: { enabled: !0, from: 8, to: 18 },
|
|
2494
2472
|
saturday: { enabled: !1, from: 8, to: 18 }
|
|
2495
2473
|
};
|
|
2496
|
-
function
|
|
2474
|
+
function we({ className: t }) {
|
|
2497
2475
|
return /* @__PURE__ */ e(
|
|
2498
2476
|
"svg",
|
|
2499
2477
|
{
|
|
@@ -2509,7 +2487,7 @@ function Ce({ className: t }) {
|
|
|
2509
2487
|
}
|
|
2510
2488
|
);
|
|
2511
2489
|
}
|
|
2512
|
-
function
|
|
2490
|
+
function ur({ className: t }) {
|
|
2513
2491
|
return /* @__PURE__ */ n(
|
|
2514
2492
|
"svg",
|
|
2515
2493
|
{
|
|
@@ -2528,7 +2506,7 @@ function pr({ className: t }) {
|
|
|
2528
2506
|
}
|
|
2529
2507
|
);
|
|
2530
2508
|
}
|
|
2531
|
-
function
|
|
2509
|
+
function hr({ className: t }) {
|
|
2532
2510
|
return /* @__PURE__ */ n(
|
|
2533
2511
|
"svg",
|
|
2534
2512
|
{
|
|
@@ -2547,7 +2525,7 @@ function vr({ className: t }) {
|
|
|
2547
2525
|
}
|
|
2548
2526
|
);
|
|
2549
2527
|
}
|
|
2550
|
-
function
|
|
2528
|
+
function be({ checked: t, onCheckedChange: r, className: o, children: s }) {
|
|
2551
2529
|
return /* @__PURE__ */ e(
|
|
2552
2530
|
"button",
|
|
2553
2531
|
{
|
|
@@ -2560,8 +2538,8 @@ function De({ checked: t, onCheckedChange: r, className: o, children: s }) {
|
|
|
2560
2538
|
}
|
|
2561
2539
|
);
|
|
2562
2540
|
}
|
|
2563
|
-
function
|
|
2564
|
-
const [a, i] =
|
|
2541
|
+
function mr({ src: t, alt: r, fallback: o, className: s }) {
|
|
2542
|
+
const [a, i] = ae(!1);
|
|
2565
2543
|
return !t || a ? /* @__PURE__ */ e(
|
|
2566
2544
|
"div",
|
|
2567
2545
|
{
|
|
@@ -2581,9 +2559,9 @@ function wr({ src: t, alt: r, fallback: o, className: s }) {
|
|
|
2581
2559
|
}
|
|
2582
2560
|
);
|
|
2583
2561
|
}
|
|
2584
|
-
function
|
|
2562
|
+
function Ae({ value: t, onChange: r, placeholder: o, className: s }) {
|
|
2585
2563
|
return /* @__PURE__ */ n("div", { className: m("relative", s), children: [
|
|
2586
|
-
/* @__PURE__ */ e(
|
|
2564
|
+
/* @__PURE__ */ e(ur, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
|
|
2587
2565
|
/* @__PURE__ */ e(
|
|
2588
2566
|
"input",
|
|
2589
2567
|
{
|
|
@@ -2596,12 +2574,12 @@ function _e({ value: t, onChange: r, placeholder: o, className: s }) {
|
|
|
2596
2574
|
)
|
|
2597
2575
|
] });
|
|
2598
2576
|
}
|
|
2599
|
-
function
|
|
2577
|
+
function Fe(t, r, o, s = 0.3) {
|
|
2600
2578
|
if (!r.trim()) return t;
|
|
2601
2579
|
const a = r.toLowerCase();
|
|
2602
2580
|
return t.filter((i) => o(i).some((g) => g ? g.toLowerCase().includes(a) : !1));
|
|
2603
2581
|
}
|
|
2604
|
-
const
|
|
2582
|
+
const fr = {
|
|
2605
2583
|
title: "Filters",
|
|
2606
2584
|
subtitle: "Filter calendar events",
|
|
2607
2585
|
scheduleTypes: "Event Types",
|
|
@@ -2614,7 +2592,7 @@ const br = {
|
|
|
2614
2592
|
noScheduleTypes: "No event types found",
|
|
2615
2593
|
noParticipants: "No participants found"
|
|
2616
2594
|
};
|
|
2617
|
-
function
|
|
2595
|
+
function Qr({
|
|
2618
2596
|
scheduleTypes: t,
|
|
2619
2597
|
users: r,
|
|
2620
2598
|
selectedScheduleTypeIds: o,
|
|
@@ -2624,18 +2602,18 @@ function on({
|
|
|
2624
2602
|
onClearAll: x,
|
|
2625
2603
|
className: g,
|
|
2626
2604
|
scheduleTypesLoading: c = !1,
|
|
2627
|
-
usersLoading:
|
|
2605
|
+
usersLoading: d = !1,
|
|
2628
2606
|
labels: w,
|
|
2629
2607
|
getScheduleTypeName: C
|
|
2630
2608
|
}) {
|
|
2631
|
-
const z = { ...
|
|
2609
|
+
const z = { ...fr, ...w }, [I, H] = ae(""), [N, p] = ae(""), D = O(() => I.trim() ? Fe(t, I, (f) => [
|
|
2632
2610
|
f.name,
|
|
2633
2611
|
C?.(f) || f.name
|
|
2634
|
-
]) : t, [t,
|
|
2612
|
+
]) : t, [t, I, C]), k = O(() => N.trim() ? Fe(r, N, (f) => [f.name, f.email || ""]) : r, [r, N]), S = D.length > 0 && D.every((f) => o.includes(f.id)), T = k.length > 0 && k.every((f) => a.includes(f.id)), G = o.length + a.length, V = (f, l) => {
|
|
2635
2613
|
const h = l ? [...o, f] : o.filter((v) => v !== f);
|
|
2636
2614
|
s(h);
|
|
2637
|
-
},
|
|
2638
|
-
if (
|
|
2615
|
+
}, B = () => {
|
|
2616
|
+
if (S) {
|
|
2639
2617
|
const f = new Set(D.map((l) => l.id));
|
|
2640
2618
|
s(o.filter((l) => !f.has(l)));
|
|
2641
2619
|
} else {
|
|
@@ -2645,11 +2623,11 @@ function on({
|
|
|
2645
2623
|
]);
|
|
2646
2624
|
s(Array.from(f));
|
|
2647
2625
|
}
|
|
2648
|
-
},
|
|
2626
|
+
}, j = (f, l) => {
|
|
2649
2627
|
const h = l ? [...a, f] : a.filter((v) => v !== f);
|
|
2650
2628
|
i(h);
|
|
2651
|
-
},
|
|
2652
|
-
if (
|
|
2629
|
+
}, P = () => {
|
|
2630
|
+
if (T) {
|
|
2653
2631
|
const f = new Set(k.map((l) => l.id));
|
|
2654
2632
|
i(a.filter((l) => !f.has(l)));
|
|
2655
2633
|
} else {
|
|
@@ -2658,7 +2636,7 @@ function on({
|
|
|
2658
2636
|
}
|
|
2659
2637
|
}, $ = () => {
|
|
2660
2638
|
s([]), i([]), x?.();
|
|
2661
|
-
},
|
|
2639
|
+
}, W = (f) => C ? C(f) : f.name, U = (f) => f.colorHex || f.color || "#069AD7";
|
|
2662
2640
|
return /* @__PURE__ */ n(
|
|
2663
2641
|
"div",
|
|
2664
2642
|
{
|
|
@@ -2679,7 +2657,7 @@ function on({
|
|
|
2679
2657
|
onClick: $,
|
|
2680
2658
|
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",
|
|
2681
2659
|
children: [
|
|
2682
|
-
/* @__PURE__ */ e(
|
|
2660
|
+
/* @__PURE__ */ e(hr, { className: "h-3.5 w-3.5" }),
|
|
2683
2661
|
z.clearAll
|
|
2684
2662
|
]
|
|
2685
2663
|
}
|
|
@@ -2693,17 +2671,17 @@ function on({
|
|
|
2693
2671
|
"button",
|
|
2694
2672
|
{
|
|
2695
2673
|
type: "button",
|
|
2696
|
-
onClick:
|
|
2674
|
+
onClick: B,
|
|
2697
2675
|
className: "text-xs font-medium text-primary transition-colors hover:text-primary/80",
|
|
2698
|
-
children:
|
|
2676
|
+
children: S ? z.unselectAll : z.selectAll
|
|
2699
2677
|
}
|
|
2700
2678
|
)
|
|
2701
2679
|
] }),
|
|
2702
2680
|
t.length > 6 && /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
|
|
2703
|
-
|
|
2681
|
+
Ae,
|
|
2704
2682
|
{
|
|
2705
|
-
value:
|
|
2706
|
-
onChange:
|
|
2683
|
+
value: I,
|
|
2684
|
+
onChange: H,
|
|
2707
2685
|
placeholder: z.searchScheduleTypes
|
|
2708
2686
|
}
|
|
2709
2687
|
) }),
|
|
@@ -2724,10 +2702,10 @@ function on({
|
|
|
2724
2702
|
) : D.map((f) => {
|
|
2725
2703
|
const l = o.includes(f.id), h = U(f);
|
|
2726
2704
|
return /* @__PURE__ */ n(
|
|
2727
|
-
|
|
2705
|
+
be,
|
|
2728
2706
|
{
|
|
2729
2707
|
checked: l,
|
|
2730
|
-
onCheckedChange: (v) =>
|
|
2708
|
+
onCheckedChange: (v) => V(f.id, v),
|
|
2731
2709
|
className: m(
|
|
2732
2710
|
"relative flex w-full cursor-pointer items-center justify-between gap-3 rounded-md border border-border bg-white px-3 py-2 transition-colors hover:border-primary/50",
|
|
2733
2711
|
l && "border-primary bg-primary/5"
|
|
@@ -2741,10 +2719,10 @@ function on({
|
|
|
2741
2719
|
"flex h-4 w-4 items-center justify-center rounded border border-border text-xs transition-colors",
|
|
2742
2720
|
l && "border-primary bg-primary text-primary-foreground"
|
|
2743
2721
|
),
|
|
2744
|
-
children: l && /* @__PURE__ */ e(
|
|
2722
|
+
children: l && /* @__PURE__ */ e(we, { className: "h-3 w-3" })
|
|
2745
2723
|
}
|
|
2746
2724
|
),
|
|
2747
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children:
|
|
2725
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium text-foreground", children: W(f) })
|
|
2748
2726
|
] }),
|
|
2749
2727
|
/* @__PURE__ */ e(
|
|
2750
2728
|
"div",
|
|
@@ -2769,20 +2747,20 @@ function on({
|
|
|
2769
2747
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between px-4 py-3", children: [
|
|
2770
2748
|
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: z.participants }),
|
|
2771
2749
|
/* @__PURE__ */ e(
|
|
2772
|
-
|
|
2750
|
+
be,
|
|
2773
2751
|
{
|
|
2774
|
-
checked:
|
|
2775
|
-
onCheckedChange: () =>
|
|
2752
|
+
checked: T,
|
|
2753
|
+
onCheckedChange: () => P(),
|
|
2776
2754
|
className: m(
|
|
2777
2755
|
"flex h-5 w-5 items-center justify-center rounded border border-border bg-white transition-colors hover:border-primary/50",
|
|
2778
|
-
|
|
2756
|
+
T && "border-primary bg-primary text-primary-foreground"
|
|
2779
2757
|
),
|
|
2780
|
-
children:
|
|
2758
|
+
children: T && /* @__PURE__ */ e(we, { className: "h-3.5 w-3.5" })
|
|
2781
2759
|
}
|
|
2782
2760
|
)
|
|
2783
2761
|
] }),
|
|
2784
2762
|
/* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
|
|
2785
|
-
|
|
2763
|
+
Ae,
|
|
2786
2764
|
{
|
|
2787
2765
|
value: N,
|
|
2788
2766
|
onChange: p,
|
|
@@ -2790,7 +2768,7 @@ function on({
|
|
|
2790
2768
|
}
|
|
2791
2769
|
) }),
|
|
2792
2770
|
/* @__PURE__ */ n("div", { className: "flex max-h-[400px] flex-col gap-2 overflow-y-auto px-4 pb-4 scrollbar-thin", children: [
|
|
2793
|
-
|
|
2771
|
+
d ? (
|
|
2794
2772
|
// Loading skeletons
|
|
2795
2773
|
Array.from({ length: 4 }).map((f, l) => /* @__PURE__ */ n(
|
|
2796
2774
|
"div",
|
|
@@ -2810,10 +2788,10 @@ function on({
|
|
|
2810
2788
|
) : k.map((f) => {
|
|
2811
2789
|
const l = a.includes(f.id);
|
|
2812
2790
|
return /* @__PURE__ */ n(
|
|
2813
|
-
|
|
2791
|
+
be,
|
|
2814
2792
|
{
|
|
2815
2793
|
checked: l,
|
|
2816
|
-
onCheckedChange: (h) =>
|
|
2794
|
+
onCheckedChange: (h) => j(f.id, h),
|
|
2817
2795
|
className: m(
|
|
2818
2796
|
"relative flex w-full cursor-pointer items-start gap-2 rounded-lg border border-border bg-white p-2 transition-colors hover:border-primary/50",
|
|
2819
2797
|
l && "border-primary bg-zinc-50"
|
|
@@ -2826,12 +2804,12 @@ function on({
|
|
|
2826
2804
|
"flex h-4 w-4 flex-shrink-0 items-center justify-center rounded border border-border transition-colors",
|
|
2827
2805
|
l && "border-primary bg-primary text-primary-foreground"
|
|
2828
2806
|
),
|
|
2829
|
-
children: l && /* @__PURE__ */ e(
|
|
2807
|
+
children: l && /* @__PURE__ */ e(we, { className: "h-2.5 w-2.5" })
|
|
2830
2808
|
}
|
|
2831
2809
|
),
|
|
2832
2810
|
/* @__PURE__ */ n("div", { className: "flex flex-1 items-start gap-2", children: [
|
|
2833
2811
|
/* @__PURE__ */ e(
|
|
2834
|
-
|
|
2812
|
+
mr,
|
|
2835
2813
|
{
|
|
2836
2814
|
src: f.avatar ?? null,
|
|
2837
2815
|
alt: f.name,
|
|
@@ -2856,14 +2834,14 @@ function on({
|
|
|
2856
2834
|
f.id
|
|
2857
2835
|
);
|
|
2858
2836
|
}),
|
|
2859
|
-
!
|
|
2837
|
+
!d && k.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: z.noParticipants })
|
|
2860
2838
|
] })
|
|
2861
2839
|
] })
|
|
2862
2840
|
]
|
|
2863
2841
|
}
|
|
2864
2842
|
);
|
|
2865
2843
|
}
|
|
2866
|
-
function
|
|
2844
|
+
function gr({ className: t }) {
|
|
2867
2845
|
return /* @__PURE__ */ n(
|
|
2868
2846
|
"svg",
|
|
2869
2847
|
{
|
|
@@ -2884,7 +2862,7 @@ function yr({ className: t }) {
|
|
|
2884
2862
|
}
|
|
2885
2863
|
);
|
|
2886
2864
|
}
|
|
2887
|
-
function
|
|
2865
|
+
function Zr({
|
|
2888
2866
|
scheduleTypes: t,
|
|
2889
2867
|
value: r,
|
|
2890
2868
|
onChange: o,
|
|
@@ -2896,7 +2874,7 @@ function sn({
|
|
|
2896
2874
|
o(c.target.value);
|
|
2897
2875
|
}, g = t.find((c) => String(c.id) === r);
|
|
2898
2876
|
return /* @__PURE__ */ n("div", { className: m("flex flex-col gap-1", a), children: [
|
|
2899
|
-
i && /* @__PURE__ */ e(
|
|
2877
|
+
i && /* @__PURE__ */ e(Q, { className: "text-xs text-muted-foreground", children: i }),
|
|
2900
2878
|
/* @__PURE__ */ n("div", { className: "relative", children: [
|
|
2901
2879
|
g ? /* @__PURE__ */ e(
|
|
2902
2880
|
"span",
|
|
@@ -2904,9 +2882,9 @@ function sn({
|
|
|
2904
2882
|
className: "pointer-events-none absolute left-2.5 top-1/2 size-3 -translate-y-1/2 rounded-full",
|
|
2905
2883
|
style: { backgroundColor: g.color }
|
|
2906
2884
|
}
|
|
2907
|
-
) : /* @__PURE__ */ e(
|
|
2885
|
+
) : /* @__PURE__ */ e(gr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
|
|
2908
2886
|
/* @__PURE__ */ n(
|
|
2909
|
-
|
|
2887
|
+
ne,
|
|
2910
2888
|
{
|
|
2911
2889
|
value: r,
|
|
2912
2890
|
onChange: x,
|
|
@@ -2920,7 +2898,7 @@ function sn({
|
|
|
2920
2898
|
] })
|
|
2921
2899
|
] });
|
|
2922
2900
|
}
|
|
2923
|
-
function
|
|
2901
|
+
function xr({ className: t }) {
|
|
2924
2902
|
return /* @__PURE__ */ n(
|
|
2925
2903
|
"svg",
|
|
2926
2904
|
{
|
|
@@ -2943,7 +2921,7 @@ function kr({ className: t }) {
|
|
|
2943
2921
|
}
|
|
2944
2922
|
);
|
|
2945
2923
|
}
|
|
2946
|
-
function
|
|
2924
|
+
function en({
|
|
2947
2925
|
users: t,
|
|
2948
2926
|
value: r,
|
|
2949
2927
|
onChange: o,
|
|
@@ -2955,11 +2933,11 @@ function an({
|
|
|
2955
2933
|
o(g.target.value);
|
|
2956
2934
|
};
|
|
2957
2935
|
return /* @__PURE__ */ n("div", { className: m("flex flex-col gap-1", a), children: [
|
|
2958
|
-
i && /* @__PURE__ */ e(
|
|
2936
|
+
i && /* @__PURE__ */ e(Q, { className: "text-xs text-muted-foreground", children: i }),
|
|
2959
2937
|
/* @__PURE__ */ n("div", { className: "relative", children: [
|
|
2960
|
-
/* @__PURE__ */ e(
|
|
2938
|
+
/* @__PURE__ */ e(xr, { className: "pointer-events-none absolute left-2.5 top-1/2 size-4 -translate-y-1/2 text-muted-foreground" }),
|
|
2961
2939
|
/* @__PURE__ */ n(
|
|
2962
|
-
|
|
2940
|
+
ne,
|
|
2963
2941
|
{
|
|
2964
2942
|
value: r,
|
|
2965
2943
|
onChange: x,
|
|
@@ -2973,7 +2951,7 @@ function an({
|
|
|
2973
2951
|
] })
|
|
2974
2952
|
] });
|
|
2975
2953
|
}
|
|
2976
|
-
function
|
|
2954
|
+
function pr({ className: t }) {
|
|
2977
2955
|
return /* @__PURE__ */ n(
|
|
2978
2956
|
"svg",
|
|
2979
2957
|
{
|
|
@@ -3000,7 +2978,7 @@ function Nr({ className: t }) {
|
|
|
3000
2978
|
}
|
|
3001
2979
|
);
|
|
3002
2980
|
}
|
|
3003
|
-
function
|
|
2981
|
+
function vr({ className: t }) {
|
|
3004
2982
|
return /* @__PURE__ */ n(
|
|
3005
2983
|
"svg",
|
|
3006
2984
|
{
|
|
@@ -3023,7 +3001,7 @@ function Cr({ className: t }) {
|
|
|
3023
3001
|
}
|
|
3024
3002
|
);
|
|
3025
3003
|
}
|
|
3026
|
-
function
|
|
3004
|
+
function wr({ className: t }) {
|
|
3027
3005
|
return /* @__PURE__ */ e(
|
|
3028
3006
|
"svg",
|
|
3029
3007
|
{
|
|
@@ -3039,7 +3017,7 @@ function Dr({ className: t }) {
|
|
|
3039
3017
|
}
|
|
3040
3018
|
);
|
|
3041
3019
|
}
|
|
3042
|
-
function
|
|
3020
|
+
function br({ className: t }) {
|
|
3043
3021
|
return /* @__PURE__ */ n(
|
|
3044
3022
|
"svg",
|
|
3045
3023
|
{
|
|
@@ -3059,25 +3037,25 @@ function Mr({ className: t }) {
|
|
|
3059
3037
|
}
|
|
3060
3038
|
);
|
|
3061
3039
|
}
|
|
3062
|
-
function
|
|
3040
|
+
function yr(t) {
|
|
3063
3041
|
const r = t.getFullYear(), o = String(t.getMonth() + 1).padStart(2, "0"), s = String(t.getDate()).padStart(2, "0");
|
|
3064
3042
|
return `${r}-${o}-${s}`;
|
|
3065
3043
|
}
|
|
3066
|
-
function
|
|
3044
|
+
function Be(t) {
|
|
3067
3045
|
const r = t.getHours(), o = t.getMinutes(), s = r >= 12 ? "PM" : "AM", a = r % 12 || 12, i = String(o).padStart(2, "0");
|
|
3068
3046
|
return `${a}:${i} ${s}`;
|
|
3069
3047
|
}
|
|
3070
|
-
function
|
|
3071
|
-
const r =
|
|
3048
|
+
function kr(t) {
|
|
3049
|
+
const r = Be(t.startDate), o = Be(t.endDate);
|
|
3072
3050
|
return `${r} - ${o}`;
|
|
3073
3051
|
}
|
|
3074
|
-
function
|
|
3075
|
-
const r =
|
|
3052
|
+
function Nr(t) {
|
|
3053
|
+
const r = Ue(/* @__PURE__ */ new Date(), 1);
|
|
3076
3054
|
return t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth() && t.getDate() === r.getDate();
|
|
3077
3055
|
}
|
|
3078
|
-
function
|
|
3079
|
-
if (
|
|
3080
|
-
if (
|
|
3056
|
+
function Cr(t) {
|
|
3057
|
+
if (q(t)) return "Today";
|
|
3058
|
+
if (Nr(t)) return "Tomorrow";
|
|
3081
3059
|
const r = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], o = [
|
|
3082
3060
|
"Jan",
|
|
3083
3061
|
"Feb",
|
|
@@ -3094,10 +3072,10 @@ function Hr(t) {
|
|
|
3094
3072
|
], s = r[t.getDay()], a = o[t.getMonth()], i = t.getDate();
|
|
3095
3073
|
return `${s}, ${a} ${i}`;
|
|
3096
3074
|
}
|
|
3097
|
-
function
|
|
3075
|
+
function Dr(t, r) {
|
|
3098
3076
|
const o = /* @__PURE__ */ new Map();
|
|
3099
3077
|
for (const s of t) {
|
|
3100
|
-
const a =
|
|
3078
|
+
const a = yr(s.startDate), i = o.get(a) ?? [];
|
|
3101
3079
|
i.push(s), o.set(a, i);
|
|
3102
3080
|
}
|
|
3103
3081
|
return Array.from(o.entries()).map(([s, a]) => {
|
|
@@ -3112,14 +3090,14 @@ function Lr(t, r) {
|
|
|
3112
3090
|
};
|
|
3113
3091
|
}).sort((s, a) => s.date.getTime() - a.date.getTime());
|
|
3114
3092
|
}
|
|
3115
|
-
function
|
|
3116
|
-
const r =
|
|
3093
|
+
function Mr(t) {
|
|
3094
|
+
const r = ge(/* @__PURE__ */ new Date()), o = Ve(/* @__PURE__ */ new Date());
|
|
3117
3095
|
return t.filter((s) => s.startDate >= r && s.startDate <= o).length;
|
|
3118
3096
|
}
|
|
3119
|
-
function
|
|
3097
|
+
function ye({ className: t }) {
|
|
3120
3098
|
return /* @__PURE__ */ e("div", { className: m("animate-pulse rounded-md bg-muted", t) });
|
|
3121
3099
|
}
|
|
3122
|
-
function
|
|
3100
|
+
function Sr({ event: t, onClick: r }) {
|
|
3123
3101
|
return /* @__PURE__ */ n(
|
|
3124
3102
|
"button",
|
|
3125
3103
|
{
|
|
@@ -3140,27 +3118,27 @@ function Ir({ event: t, onClick: r }) {
|
|
|
3140
3118
|
),
|
|
3141
3119
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
3142
3120
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium truncate", children: t.title }),
|
|
3143
|
-
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children:
|
|
3121
|
+
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: kr(t) })
|
|
3144
3122
|
] }),
|
|
3145
|
-
r && /* @__PURE__ */ e(
|
|
3123
|
+
r && /* @__PURE__ */ e(wr, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
|
|
3146
3124
|
]
|
|
3147
3125
|
}
|
|
3148
3126
|
);
|
|
3149
3127
|
}
|
|
3150
|
-
function
|
|
3128
|
+
function Er({ group: t, onEventClick: r }) {
|
|
3151
3129
|
return /* @__PURE__ */ n("div", { className: "space-y-1", children: [
|
|
3152
3130
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between px-2 py-1.5", children: [
|
|
3153
|
-
/* @__PURE__ */ e("h3", { className: m("text-xs font-semibold",
|
|
3131
|
+
/* @__PURE__ */ e("h3", { className: m("text-xs font-semibold", q(t.date) && "text-primary"), children: Cr(t.date) }),
|
|
3154
3132
|
t.hasMore && /* @__PURE__ */ n("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
3155
3133
|
"+",
|
|
3156
3134
|
t.events.length,
|
|
3157
3135
|
" more"
|
|
3158
3136
|
] })
|
|
3159
3137
|
] }),
|
|
3160
|
-
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((o) => /* @__PURE__ */ e(
|
|
3138
|
+
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((o) => /* @__PURE__ */ e(Sr, { event: o, onClick: r }, o.id)) })
|
|
3161
3139
|
] });
|
|
3162
3140
|
}
|
|
3163
|
-
function
|
|
3141
|
+
function tn({
|
|
3164
3142
|
events: t,
|
|
3165
3143
|
isLoading: r = !1,
|
|
3166
3144
|
className: o,
|
|
@@ -3169,29 +3147,29 @@ function ln({
|
|
|
3169
3147
|
onEventClick: i,
|
|
3170
3148
|
onNavigateToAgenda: x
|
|
3171
3149
|
}) {
|
|
3172
|
-
const [g, c] =
|
|
3173
|
-
const
|
|
3174
|
-
return t.filter((p) => p.endDate >=
|
|
3175
|
-
}, [t, s]), w =
|
|
3176
|
-
() =>
|
|
3177
|
-
[
|
|
3178
|
-
), C =
|
|
3179
|
-
c(!1), i?.(
|
|
3180
|
-
},
|
|
3150
|
+
const [g, c] = ae(!1), d = O(() => {
|
|
3151
|
+
const H = ge(/* @__PURE__ */ new Date()), N = Ue(H, s);
|
|
3152
|
+
return t.filter((p) => p.endDate >= H && p.startDate < N);
|
|
3153
|
+
}, [t, s]), w = O(
|
|
3154
|
+
() => Dr(d, a),
|
|
3155
|
+
[d, a]
|
|
3156
|
+
), C = O(() => Mr(t), [t]), z = (H) => {
|
|
3157
|
+
c(!1), i?.(H);
|
|
3158
|
+
}, I = () => {
|
|
3181
3159
|
c(!1), x?.();
|
|
3182
3160
|
};
|
|
3183
|
-
return /* @__PURE__ */ n(
|
|
3161
|
+
return /* @__PURE__ */ n(_e, { open: g, onOpenChange: c, children: [
|
|
3184
3162
|
/* @__PURE__ */ n(
|
|
3185
|
-
|
|
3163
|
+
Pe,
|
|
3186
3164
|
{
|
|
3187
3165
|
className: m(
|
|
3188
3166
|
"relative rounded-xl hover:text-zinc-700 hover:!bg-zinc-300 !bg-zinc-200 text-zinc-600 shadow-none !px-2.5 p-2 max-h-10",
|
|
3189
3167
|
o
|
|
3190
3168
|
),
|
|
3191
3169
|
children: [
|
|
3192
|
-
/* @__PURE__ */ e(
|
|
3170
|
+
/* @__PURE__ */ e(pr, { className: "h-4 w-4" }),
|
|
3193
3171
|
C > 0 && /* @__PURE__ */ e(
|
|
3194
|
-
|
|
3172
|
+
lt,
|
|
3195
3173
|
{
|
|
3196
3174
|
variant: "destructive",
|
|
3197
3175
|
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",
|
|
@@ -3201,7 +3179,7 @@ function ln({
|
|
|
3201
3179
|
]
|
|
3202
3180
|
}
|
|
3203
3181
|
),
|
|
3204
|
-
/* @__PURE__ */ n(
|
|
3182
|
+
/* @__PURE__ */ n(Re, { className: "w-80 rounded-xl p-0", align: "end", side: "bottom", sideOffset: 8, children: [
|
|
3205
3183
|
/* @__PURE__ */ n("div", { className: "flex items-center justify-between border-b p-4", children: [
|
|
3206
3184
|
/* @__PURE__ */ n("div", { children: [
|
|
3207
3185
|
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Upcoming" }),
|
|
@@ -3211,41 +3189,41 @@ function ln({
|
|
|
3211
3189
|
"button",
|
|
3212
3190
|
{
|
|
3213
3191
|
type: "button",
|
|
3214
|
-
onClick:
|
|
3192
|
+
onClick: I,
|
|
3215
3193
|
className: "text-xs text-primary hover:underline flex items-center gap-1",
|
|
3216
3194
|
children: [
|
|
3217
3195
|
"View all",
|
|
3218
|
-
/* @__PURE__ */ e(
|
|
3196
|
+
/* @__PURE__ */ e(br, { className: "size-3" })
|
|
3219
3197
|
]
|
|
3220
3198
|
}
|
|
3221
3199
|
)
|
|
3222
3200
|
] }),
|
|
3223
|
-
/* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: r ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((
|
|
3224
|
-
/* @__PURE__ */ e(
|
|
3201
|
+
/* @__PURE__ */ e("div", { className: "max-h-80 overflow-y-auto p-2", children: r ? /* @__PURE__ */ e("div", { className: "space-y-2 p-2", children: Array.from({ length: 3 }).map((H, N) => /* @__PURE__ */ n("div", { className: "flex space-x-3", children: [
|
|
3202
|
+
/* @__PURE__ */ e(ye, { className: "h-2 w-2 rounded-full mt-2" }),
|
|
3225
3203
|
/* @__PURE__ */ n("div", { className: "flex-1 space-y-2", children: [
|
|
3226
|
-
/* @__PURE__ */ e(
|
|
3227
|
-
/* @__PURE__ */ e(
|
|
3204
|
+
/* @__PURE__ */ e(ye, { className: "h-4 w-full" }),
|
|
3205
|
+
/* @__PURE__ */ e(ye, { className: "h-3 w-3/4" })
|
|
3228
3206
|
] })
|
|
3229
3207
|
] }, N)) }) : w.length === 0 ? /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
|
|
3230
|
-
/* @__PURE__ */ e(
|
|
3208
|
+
/* @__PURE__ */ e(vr, { className: "mb-2 h-8 w-8 text-muted-foreground/50" }),
|
|
3231
3209
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No upcoming events" }),
|
|
3232
3210
|
/* @__PURE__ */ n("p", { className: "text-xs text-muted-foreground/70", children: [
|
|
3233
3211
|
"Your schedule is clear for the next ",
|
|
3234
3212
|
s,
|
|
3235
3213
|
" days"
|
|
3236
3214
|
] })
|
|
3237
|
-
] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: w.map((
|
|
3238
|
-
|
|
3215
|
+
] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: w.map((H) => /* @__PURE__ */ e(
|
|
3216
|
+
Er,
|
|
3239
3217
|
{
|
|
3240
|
-
group:
|
|
3218
|
+
group: H,
|
|
3241
3219
|
onEventClick: z
|
|
3242
3220
|
},
|
|
3243
|
-
|
|
3221
|
+
H.dateKey
|
|
3244
3222
|
)) }) })
|
|
3245
3223
|
] })
|
|
3246
3224
|
] });
|
|
3247
3225
|
}
|
|
3248
|
-
function
|
|
3226
|
+
function zr({ className: t }) {
|
|
3249
3227
|
return /* @__PURE__ */ n(
|
|
3250
3228
|
"svg",
|
|
3251
3229
|
{
|
|
@@ -3270,7 +3248,7 @@ function Wr({ className: t }) {
|
|
|
3270
3248
|
}
|
|
3271
3249
|
);
|
|
3272
3250
|
}
|
|
3273
|
-
function
|
|
3251
|
+
function Ge({ className: t }) {
|
|
3274
3252
|
return /* @__PURE__ */ e(
|
|
3275
3253
|
"svg",
|
|
3276
3254
|
{
|
|
@@ -3288,32 +3266,32 @@ function Xe({ className: t }) {
|
|
|
3288
3266
|
}
|
|
3289
3267
|
);
|
|
3290
3268
|
}
|
|
3291
|
-
function
|
|
3269
|
+
function Lr(t) {
|
|
3292
3270
|
const r = /* @__PURE__ */ new Date();
|
|
3293
3271
|
return r.setDate(r.getDate() + 1), t.getFullYear() === r.getFullYear() && t.getMonth() === r.getMonth() && t.getDate() === r.getDate();
|
|
3294
3272
|
}
|
|
3295
|
-
function
|
|
3273
|
+
function $e(t) {
|
|
3296
3274
|
const r = t.getHours(), o = t.getMinutes(), s = r >= 12 ? "PM" : "AM";
|
|
3297
3275
|
return `${r % 12 || 12}:${o.toString().padStart(2, "0")} ${s}`;
|
|
3298
3276
|
}
|
|
3299
|
-
function
|
|
3277
|
+
function Hr(t) {
|
|
3300
3278
|
return new Intl.DateTimeFormat("en-US", {
|
|
3301
3279
|
weekday: "long",
|
|
3302
3280
|
month: "short",
|
|
3303
3281
|
day: "numeric"
|
|
3304
3282
|
}).format(t);
|
|
3305
3283
|
}
|
|
3306
|
-
function
|
|
3307
|
-
const r =
|
|
3284
|
+
function Tr(t) {
|
|
3285
|
+
const r = $e(t.startDate), o = $e(t.endDate);
|
|
3308
3286
|
return `${r} - ${o}`;
|
|
3309
3287
|
}
|
|
3310
|
-
function
|
|
3311
|
-
return
|
|
3288
|
+
function Ir(t) {
|
|
3289
|
+
return q(t) ? "Today" : Lr(t) ? "Tomorrow" : Hr(t);
|
|
3312
3290
|
}
|
|
3313
|
-
function
|
|
3291
|
+
function jr(t, r) {
|
|
3314
3292
|
const o = /* @__PURE__ */ new Map();
|
|
3315
3293
|
for (const s of t) {
|
|
3316
|
-
const a =
|
|
3294
|
+
const a = ft(s.startDate), i = o.get(a) ?? [];
|
|
3317
3295
|
i.push(s), o.set(a, i);
|
|
3318
3296
|
}
|
|
3319
3297
|
return Array.from(o.entries()).map(([s, a]) => {
|
|
@@ -3328,7 +3306,7 @@ function _r(t, r) {
|
|
|
3328
3306
|
};
|
|
3329
3307
|
}).sort((s, a) => s.date.getTime() - a.date.getTime());
|
|
3330
3308
|
}
|
|
3331
|
-
function
|
|
3309
|
+
function Wr({ event: t, onClick: r, compact: o }) {
|
|
3332
3310
|
return /* @__PURE__ */ n(
|
|
3333
3311
|
"button",
|
|
3334
3312
|
{
|
|
@@ -3350,10 +3328,10 @@ function Pr({ event: t, onClick: r, compact: o }) {
|
|
|
3350
3328
|
),
|
|
3351
3329
|
/* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
|
|
3352
3330
|
/* @__PURE__ */ e("p", { className: m("font-medium truncate", o ? "text-xs" : "text-sm"), children: t.title }),
|
|
3353
|
-
/* @__PURE__ */ e("p", { className: m("text-muted-foreground truncate", o ? "text-[10px]" : "text-xs"), children:
|
|
3331
|
+
/* @__PURE__ */ e("p", { className: m("text-muted-foreground truncate", o ? "text-[10px]" : "text-xs"), children: Tr(t) })
|
|
3354
3332
|
] }),
|
|
3355
3333
|
r && /* @__PURE__ */ e(
|
|
3356
|
-
|
|
3334
|
+
Ge,
|
|
3357
3335
|
{
|
|
3358
3336
|
className: m("shrink-0 text-muted-foreground/50", o ? "size-3" : "size-4")
|
|
3359
3337
|
}
|
|
@@ -3362,7 +3340,7 @@ function Pr({ event: t, onClick: r, compact: o }) {
|
|
|
3362
3340
|
}
|
|
3363
3341
|
);
|
|
3364
3342
|
}
|
|
3365
|
-
function
|
|
3343
|
+
function Ar({
|
|
3366
3344
|
group: t,
|
|
3367
3345
|
onEventClick: r,
|
|
3368
3346
|
onViewMore: o,
|
|
@@ -3376,9 +3354,9 @@ function Or({
|
|
|
3376
3354
|
className: m(
|
|
3377
3355
|
"font-semibold",
|
|
3378
3356
|
s ? "text-xs" : "text-sm",
|
|
3379
|
-
|
|
3357
|
+
q(t.date) && "text-primary"
|
|
3380
3358
|
),
|
|
3381
|
-
children:
|
|
3359
|
+
children: Ir(t.date)
|
|
3382
3360
|
}
|
|
3383
3361
|
),
|
|
3384
3362
|
t.hasMore && o && /* @__PURE__ */ e(
|
|
@@ -3391,10 +3369,10 @@ function Or({
|
|
|
3391
3369
|
}
|
|
3392
3370
|
)
|
|
3393
3371
|
] }),
|
|
3394
|
-
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((a) => /* @__PURE__ */ e(
|
|
3372
|
+
/* @__PURE__ */ e("div", { className: "space-y-0.5", children: t.events.map((a) => /* @__PURE__ */ e(Wr, { event: a, onClick: r, compact: s }, a.id)) })
|
|
3395
3373
|
] });
|
|
3396
3374
|
}
|
|
3397
|
-
function
|
|
3375
|
+
function rn({
|
|
3398
3376
|
events: t,
|
|
3399
3377
|
daysAhead: r = 7,
|
|
3400
3378
|
maxEventsPerDay: o = 3,
|
|
@@ -3404,24 +3382,24 @@ function cn({
|
|
|
3404
3382
|
emptyState: x,
|
|
3405
3383
|
title: g = "Upcoming",
|
|
3406
3384
|
showHeader: c = !0,
|
|
3407
|
-
compact:
|
|
3385
|
+
compact: d = !1
|
|
3408
3386
|
}) {
|
|
3409
|
-
const w =
|
|
3410
|
-
const D =
|
|
3411
|
-
return k.setDate(k.getDate() + r),
|
|
3412
|
-
}, [
|
|
3413
|
-
() =>
|
|
3414
|
-
[
|
|
3415
|
-
), p =
|
|
3387
|
+
const w = Oe(), C = w?.filteredEvents, z = w?.currentDate ?? /* @__PURE__ */ new Date(), I = t ?? C ?? [], H = O(() => {
|
|
3388
|
+
const D = ge(z), k = new Date(D);
|
|
3389
|
+
return k.setDate(k.getDate() + r), I.filter((S) => S.endDate >= D && S.startDate < k);
|
|
3390
|
+
}, [I, r, z]), N = O(
|
|
3391
|
+
() => jr(H, o),
|
|
3392
|
+
[H, o]
|
|
3393
|
+
), p = H.length;
|
|
3416
3394
|
return N.length === 0 ? /* @__PURE__ */ n("div", { className: m("rounded-lg border bg-card", i), children: [
|
|
3417
3395
|
c && /* @__PURE__ */ e(
|
|
3418
3396
|
"div",
|
|
3419
3397
|
{
|
|
3420
3398
|
className: m(
|
|
3421
3399
|
"border-b px-4 flex items-center justify-between",
|
|
3422
|
-
|
|
3400
|
+
d ? "py-2" : "py-3"
|
|
3423
3401
|
),
|
|
3424
|
-
children: /* @__PURE__ */ e("h2", { className: m("font-semibold",
|
|
3402
|
+
children: /* @__PURE__ */ e("h2", { className: m("font-semibold", d ? "text-sm" : "text-base"), children: g })
|
|
3425
3403
|
}
|
|
3426
3404
|
),
|
|
3427
3405
|
/* @__PURE__ */ e(
|
|
@@ -3429,16 +3407,16 @@ function cn({
|
|
|
3429
3407
|
{
|
|
3430
3408
|
className: m(
|
|
3431
3409
|
"flex flex-col items-center justify-center text-center",
|
|
3432
|
-
|
|
3410
|
+
d ? "py-6 px-4" : "py-10 px-6"
|
|
3433
3411
|
),
|
|
3434
|
-
children: x ?? /* @__PURE__ */ n(
|
|
3412
|
+
children: x ?? /* @__PURE__ */ n(oe, { children: [
|
|
3435
3413
|
/* @__PURE__ */ e(
|
|
3436
|
-
|
|
3414
|
+
zr,
|
|
3437
3415
|
{
|
|
3438
|
-
className: m("text-muted-foreground/50 mb-2",
|
|
3416
|
+
className: m("text-muted-foreground/50 mb-2", d ? "size-8" : "size-10")
|
|
3439
3417
|
}
|
|
3440
3418
|
),
|
|
3441
|
-
/* @__PURE__ */ e("p", { className: m("text-muted-foreground",
|
|
3419
|
+
/* @__PURE__ */ e("p", { className: m("text-muted-foreground", d ? "text-xs" : "text-sm"), children: "No upcoming events" })
|
|
3442
3420
|
] })
|
|
3443
3421
|
}
|
|
3444
3422
|
)
|
|
@@ -3448,17 +3426,17 @@ function cn({
|
|
|
3448
3426
|
{
|
|
3449
3427
|
className: m(
|
|
3450
3428
|
"border-b px-4 flex items-center justify-between",
|
|
3451
|
-
|
|
3429
|
+
d ? "py-2" : "py-3"
|
|
3452
3430
|
),
|
|
3453
3431
|
children: [
|
|
3454
3432
|
/* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
|
|
3455
|
-
/* @__PURE__ */ e("h2", { className: m("font-semibold",
|
|
3433
|
+
/* @__PURE__ */ e("h2", { className: m("font-semibold", d ? "text-sm" : "text-base"), children: g }),
|
|
3456
3434
|
/* @__PURE__ */ e(
|
|
3457
3435
|
"span",
|
|
3458
3436
|
{
|
|
3459
3437
|
className: m(
|
|
3460
3438
|
"text-muted-foreground bg-muted rounded-full px-2",
|
|
3461
|
-
|
|
3439
|
+
d ? "text-[10px] py-0" : "text-xs py-0.5"
|
|
3462
3440
|
),
|
|
3463
3441
|
children: p
|
|
3464
3442
|
}
|
|
@@ -3471,11 +3449,11 @@ function cn({
|
|
|
3471
3449
|
onClick: () => a(),
|
|
3472
3450
|
className: m(
|
|
3473
3451
|
"text-primary hover:underline flex items-center gap-0.5",
|
|
3474
|
-
|
|
3452
|
+
d ? "text-xs" : "text-sm"
|
|
3475
3453
|
),
|
|
3476
3454
|
children: [
|
|
3477
3455
|
"View all",
|
|
3478
|
-
/* @__PURE__ */ e(
|
|
3456
|
+
/* @__PURE__ */ e(Ge, { className: "size-3" })
|
|
3479
3457
|
]
|
|
3480
3458
|
}
|
|
3481
3459
|
)
|
|
@@ -3487,15 +3465,15 @@ function cn({
|
|
|
3487
3465
|
{
|
|
3488
3466
|
className: m(
|
|
3489
3467
|
"divide-y overflow-auto",
|
|
3490
|
-
|
|
3468
|
+
d ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
|
|
3491
3469
|
),
|
|
3492
3470
|
children: N.map((D) => /* @__PURE__ */ e(
|
|
3493
|
-
|
|
3471
|
+
Ar,
|
|
3494
3472
|
{
|
|
3495
3473
|
group: D,
|
|
3496
3474
|
onEventClick: s,
|
|
3497
3475
|
onViewMore: a ? (k) => a(k) : void 0,
|
|
3498
|
-
compact:
|
|
3476
|
+
compact: d
|
|
3499
3477
|
},
|
|
3500
3478
|
D.dateKey
|
|
3501
3479
|
))
|
|
@@ -3504,20 +3482,20 @@ function cn({
|
|
|
3504
3482
|
] });
|
|
3505
3483
|
}
|
|
3506
3484
|
export {
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3485
|
+
tn as A,
|
|
3486
|
+
Kr as B,
|
|
3487
|
+
Vr as C,
|
|
3488
|
+
Xr as D,
|
|
3489
|
+
Ur as E,
|
|
3490
|
+
Yr as I,
|
|
3491
|
+
Zr as S,
|
|
3492
|
+
ve as T,
|
|
3493
|
+
en as U,
|
|
3494
|
+
qr as V,
|
|
3495
|
+
Jr as W,
|
|
3496
|
+
Yt as Y,
|
|
3497
|
+
rn as a,
|
|
3498
|
+
Qr as b,
|
|
3499
|
+
Gr as c
|
|
3522
3500
|
};
|
|
3523
|
-
//# sourceMappingURL=agenda-widget-
|
|
3501
|
+
//# sourceMappingURL=agenda-widget-BKIaXFpN.js.map
|