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