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