@innosolutions/inno-calendar 1.0.70 → 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-GRHaHwQ2.js → agenda-widget-B0t3TCcV.js} +1158 -1141
- 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 +2 -2
- package/dist/components/inno-calendar.d.ts +23 -1
- package/dist/components/inno-calendar.d.ts.map +1 -1
- package/dist/components/views/timeline-view.d.ts.map +1 -1
- package/dist/core/context/inno-calendar-provider.d.ts +8 -2
- package/dist/core/context/inno-calendar-provider.d.ts.map +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.mjs +4 -4
- package/dist/core/types.d.ts +51 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/utils/view-storage.d.ts +14 -10
- package/dist/core/utils/view-storage.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +7 -7
- package/dist/position-utils-D_KpwRus.js +1053 -0
- package/dist/position-utils-D_KpwRus.js.map +1 -0
- package/dist/position-utils-ksZ_IjXC.cjs +2 -0
- package/dist/position-utils-ksZ_IjXC.cjs.map +1 -0
- package/dist/presets/index.cjs +1 -1
- package/dist/presets/index.mjs +1 -1
- package/dist/slot-selection-context-CLYZU6ul.cjs +2 -0
- package/dist/{slot-selection-context-DvTn_R-Z.cjs.map → slot-selection-context-CLYZU6ul.cjs.map} +1 -1
- package/dist/slot-selection-context-Ct5cVcKW.js +611 -0
- package/dist/{slot-selection-context-D6zo91K_.js.map → slot-selection-context-Ct5cVcKW.js.map} +1 -1
- package/dist/{tailwind-calendar-BA7v_Wgx.cjs → tailwind-calendar-BbUb61uY.cjs} +2 -2
- package/dist/{tailwind-calendar-BA7v_Wgx.cjs.map → tailwind-calendar-BbUb61uY.cjs.map} +1 -1
- package/dist/{tailwind-calendar-Bh1yB1jf.js → tailwind-calendar-DrwGVSF-.js} +3 -3
- package/dist/{tailwind-calendar-Bh1yB1jf.js.map → tailwind-calendar-DrwGVSF-.js.map} +1 -1
- package/dist/{use-calendar-BwqE_WNA.cjs → use-calendar-BK0nQYJq.cjs} +2 -2
- package/dist/{use-calendar-BwqE_WNA.cjs.map → use-calendar-BK0nQYJq.cjs.map} +1 -1
- package/dist/{use-calendar--JnbGA3L.js → use-calendar-DJI35SSd.js} +2 -2
- package/dist/{use-calendar--JnbGA3L.js.map → use-calendar-DJI35SSd.js.map} +1 -1
- package/dist/{use-slot-selection-C1tk-o0j.cjs → use-slot-selection-CCE11R4j.cjs} +2 -2
- package/dist/{use-slot-selection-C1tk-o0j.cjs.map → use-slot-selection-CCE11R4j.cjs.map} +1 -1
- package/dist/{use-slot-selection-BLCDzQzo.js → use-slot-selection-CX1w8EdM.js} +3 -3
- package/dist/{use-slot-selection-BLCDzQzo.js.map → use-slot-selection-CX1w8EdM.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.mjs +1 -1
- package/dist/{week-view-D1wefMb8.cjs → week-view-BXmaRChB.cjs} +2 -2
- package/dist/{week-view-D1wefMb8.cjs.map → week-view-BXmaRChB.cjs.map} +1 -1
- package/dist/{week-view-BbtTpJTU.js → week-view-BeasFcyR.js} +3 -3
- package/dist/{week-view-BbtTpJTU.js.map → week-view-BeasFcyR.js.map} +1 -1
- package/package.json +1 -1
- package/dist/agenda-widget-GRHaHwQ2.js.map +0 -1
- package/dist/agenda-widget-TLJuxen3.cjs +0 -2
- package/dist/agenda-widget-TLJuxen3.cjs.map +0 -1
- package/dist/position-utils-BzmOPdvQ.js +0 -1038
- package/dist/position-utils-BzmOPdvQ.js.map +0 -1
- package/dist/position-utils-EQTCC4tZ.cjs +0 -2
- package/dist/position-utils-EQTCC4tZ.cjs.map +0 -1
- package/dist/slot-selection-context-D6zo91K_.js +0 -610
- package/dist/slot-selection-context-DvTn_R-Z.cjs +0 -2
|
@@ -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,8 +667,8 @@ 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
|
-
(G,
|
|
671
|
-
|
|
670
|
+
(G, f) => W ? W(G, f) : /* @__PURE__ */ e(
|
|
671
|
+
qe,
|
|
672
672
|
{
|
|
673
673
|
participant: G,
|
|
674
674
|
isEventCanceled: t.isCanceled,
|
|
@@ -676,17 +676,17 @@ function Je({
|
|
|
676
676
|
},
|
|
677
677
|
G.id
|
|
678
678
|
)
|
|
679
|
-
) :
|
|
679
|
+
) : h.slice(0, 6).map((G, f) => {
|
|
680
680
|
const j = {
|
|
681
|
-
id: String(
|
|
681
|
+
id: String(f),
|
|
682
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,
|
|
@@ -695,9 +695,9 @@ function Je({
|
|
|
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((G) => G.isOrganizer)?.name ||
|
|
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
728
|
onClick: (G) => {
|
|
729
|
-
G.stopPropagation(), y ||
|
|
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
|
-
|
|
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
|
-
), G =
|
|
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, G,
|
|
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,63 +1818,63 @@ 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
|
-
const
|
|
1856
|
-
if (!(
|
|
1870
|
+
const V = y.target.tagName;
|
|
1871
|
+
if (!(V === "INPUT" || V === "TEXTAREA" || y.target.isContentEditable))
|
|
1857
1872
|
switch (y.key) {
|
|
1858
1873
|
case "ArrowUp":
|
|
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
|
-
|
|
1888
|
-
},
|
|
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";
|
|
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
|
-
|
|
1898
|
-
return window.addEventListener("resize",
|
|
1911
|
+
for (const R of O)
|
|
1912
|
+
R.addEventListener("scroll", V, { passive: !0 });
|
|
1913
|
+
return window.addEventListener("resize", V, { passive: !0 }), y(), () => {
|
|
1899
1914
|
cancelAnimationFrame(N);
|
|
1900
|
-
for (const
|
|
1901
|
-
|
|
1902
|
-
window.removeEventListener("resize",
|
|
1915
|
+
for (const R of O)
|
|
1916
|
+
R.removeEventListener("scroll", V);
|
|
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:
|
|
1915
|
-
if (
|
|
1916
|
-
const se = Math.min(
|
|
1917
|
-
y.scrollLeft +=
|
|
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
|
-
|
|
1929
|
-
const
|
|
1930
|
-
if (
|
|
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 };
|
|
1944
|
+
const V = Math.sqrt(N * N + y * y);
|
|
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 /
|
|
1936
|
-
y: y /
|
|
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
|
-
clearFocusEventId:
|
|
2105
|
-
} =
|
|
2106
|
-
if (!y || !
|
|
2119
|
+
clearFocusEventId: V
|
|
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: (
|
|
2164
|
-
|
|
2165
|
-
|
|
2177
|
+
getViewRect: () => R.current?.getBoundingClientRect() ?? null,
|
|
2178
|
+
focusEvent: (f) => {
|
|
2179
|
+
V(), requestAnimationFrame(() => {
|
|
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
|
-
|
|
2178
|
-
|
|
2192
|
+
h,
|
|
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,
|
|
@@ -2412,39 +2427,39 @@ function jn({
|
|
|
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,12 +2469,12 @@ 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: [
|
|
@@ -2467,15 +2482,15 @@ function jn({
|
|
|
2467
2482
|
"div",
|
|
2468
2483
|
{
|
|
2469
2484
|
ref: G,
|
|
2470
|
-
className:
|
|
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,38 +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
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2536
|
+
viewPersistence: V,
|
|
2537
|
+
eventDetailMode: O,
|
|
2538
|
+
renderEventDetail: q
|
|
2539
|
+
}, R) {
|
|
2540
|
+
return /* @__PURE__ */ e(zt, { ..._ && { onEventDrop: _ }, children: /* @__PURE__ */ e(
|
|
2541
|
+
Ht,
|
|
2526
2542
|
{
|
|
2527
2543
|
initialEvents: t,
|
|
2528
2544
|
initialUsers: n,
|
|
@@ -2530,50 +2546,51 @@ function Pn({
|
|
|
2530
2546
|
...s && { initialView: s },
|
|
2531
2547
|
...l && { initialDate: l },
|
|
2532
2548
|
...p && { initialSelectedUserId: p },
|
|
2533
|
-
...
|
|
2549
|
+
...d && { initialScheduleTypeIds: d },
|
|
2534
2550
|
...c && { initialParticipantIds: c },
|
|
2535
|
-
...
|
|
2536
|
-
...
|
|
2551
|
+
...x && { initialWorkingHoursView: x },
|
|
2552
|
+
...L && { initialSearchQuery: L },
|
|
2537
2553
|
...b && { preferencesConfig: b },
|
|
2538
|
-
...
|
|
2539
|
-
...
|
|
2540
|
-
...
|
|
2554
|
+
...B && { onDateChange: B },
|
|
2555
|
+
...z && { onViewChange: z },
|
|
2556
|
+
...h && { initialFocusEventId: h },
|
|
2557
|
+
...V && { viewPersistence: V },
|
|
2541
2558
|
children: /* @__PURE__ */ e(
|
|
2542
|
-
|
|
2559
|
+
Hn,
|
|
2543
2560
|
{
|
|
2544
2561
|
...w && { onEventClick: w },
|
|
2545
|
-
...
|
|
2562
|
+
...I && { onSlotClick: I },
|
|
2546
2563
|
...S && { onSlotSelect: S },
|
|
2547
|
-
|
|
2564
|
+
...H && { onAddEvent: H },
|
|
2548
2565
|
...a && { alwaysShowResources: a },
|
|
2549
|
-
...
|
|
2550
|
-
className:
|
|
2566
|
+
...P && { renderPopover: P },
|
|
2567
|
+
className: T,
|
|
2551
2568
|
showHeader: W,
|
|
2552
|
-
minSelectionMinutes:
|
|
2569
|
+
minSelectionMinutes: A,
|
|
2553
2570
|
...X && { showMoreMode: X },
|
|
2554
2571
|
showMoreEventsInPopover: M,
|
|
2555
|
-
isLoading:
|
|
2556
|
-
...
|
|
2557
|
-
...
|
|
2558
|
-
settingsContent:
|
|
2559
|
-
filterContent:
|
|
2572
|
+
isLoading: F,
|
|
2573
|
+
...Y && { slots: Y },
|
|
2574
|
+
...K && { classNames: K },
|
|
2575
|
+
settingsContent: J,
|
|
2576
|
+
filterContent: v,
|
|
2560
2577
|
headerActions: C,
|
|
2561
|
-
calendarRef:
|
|
2578
|
+
calendarRef: R,
|
|
2562
2579
|
...N && { headerConfig: N },
|
|
2563
2580
|
...y && { resourceColumnConfig: y },
|
|
2564
|
-
...
|
|
2565
|
-
...
|
|
2581
|
+
...O && { eventDetailMode: O },
|
|
2582
|
+
...q && { renderEventDetail: q }
|
|
2566
2583
|
}
|
|
2567
2584
|
)
|
|
2568
2585
|
}
|
|
2569
2586
|
) });
|
|
2570
2587
|
}
|
|
2571
|
-
const
|
|
2588
|
+
const Ir = We(An), be = We(
|
|
2572
2589
|
({ className: t, children: n, ...a }, o) => /* @__PURE__ */ e(
|
|
2573
2590
|
"select",
|
|
2574
2591
|
{
|
|
2575
2592
|
ref: o,
|
|
2576
|
-
className:
|
|
2593
|
+
className: g(
|
|
2577
2594
|
"flex h-9 w-full rounded-md border border-input bg-background px-3 py-1 text-sm shadow-sm",
|
|
2578
2595
|
"ring-offset-background",
|
|
2579
2596
|
"focus:outline-none focus:ring-1 focus:ring-ring",
|
|
@@ -2591,7 +2608,7 @@ const ge = We(({ className: t, ...n }, a) => /* @__PURE__ */ e(
|
|
|
2591
2608
|
"label",
|
|
2592
2609
|
{
|
|
2593
2610
|
ref: a,
|
|
2594
|
-
className:
|
|
2611
|
+
className: g(
|
|
2595
2612
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
2596
2613
|
t
|
|
2597
2614
|
),
|
|
@@ -2599,7 +2616,7 @@ const ge = We(({ className: t, ...n }, a) => /* @__PURE__ */ e(
|
|
|
2599
2616
|
}
|
|
2600
2617
|
));
|
|
2601
2618
|
ge.displayName = "Label";
|
|
2602
|
-
function
|
|
2619
|
+
function Pn({ className: t }) {
|
|
2603
2620
|
return /* @__PURE__ */ r(
|
|
2604
2621
|
"svg",
|
|
2605
2622
|
{
|
|
@@ -2621,7 +2638,7 @@ function Wn({ className: t }) {
|
|
|
2621
2638
|
}
|
|
2622
2639
|
);
|
|
2623
2640
|
}
|
|
2624
|
-
function
|
|
2641
|
+
function jn({ className: t }) {
|
|
2625
2642
|
return /* @__PURE__ */ r(
|
|
2626
2643
|
"svg",
|
|
2627
2644
|
{
|
|
@@ -2642,12 +2659,12 @@ function _n({ className: t }) {
|
|
|
2642
2659
|
}
|
|
2643
2660
|
);
|
|
2644
2661
|
}
|
|
2645
|
-
const
|
|
2662
|
+
const Wn = [
|
|
2646
2663
|
{ value: 15, label: "15 minutes" },
|
|
2647
2664
|
{ value: 30, label: "30 minutes" },
|
|
2648
2665
|
{ value: 60, label: "1 hour" }
|
|
2649
2666
|
];
|
|
2650
|
-
function
|
|
2667
|
+
function zr({
|
|
2651
2668
|
value: t,
|
|
2652
2669
|
onChange: n,
|
|
2653
2670
|
isLocked: a = !1,
|
|
@@ -2659,17 +2676,17 @@ function Ar({
|
|
|
2659
2676
|
lockedMessage: "This setting is locked by the administrator",
|
|
2660
2677
|
infoMessage: "Set the time slot duration for day and week calendar views.",
|
|
2661
2678
|
...s
|
|
2662
|
-
}, p = (
|
|
2663
|
-
a || n(Number(
|
|
2679
|
+
}, p = (d) => {
|
|
2680
|
+
a || n(Number(d.target.value));
|
|
2664
2681
|
};
|
|
2665
|
-
return /* @__PURE__ */ r("div", { className:
|
|
2682
|
+
return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
|
|
2666
2683
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
2667
2684
|
/* @__PURE__ */ e(ge, { className: "text-sm font-semibold", children: l.title }),
|
|
2668
2685
|
a ? /* @__PURE__ */ e(pe, { delayDuration: 100, children: /* @__PURE__ */ r(xe, { children: [
|
|
2669
|
-
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(
|
|
2686
|
+
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(jn, { className: "size-3 text-muted-foreground" }) }),
|
|
2670
2687
|
/* @__PURE__ */ e(we, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
|
|
2671
2688
|
] }) }) : /* @__PURE__ */ e(pe, { delayDuration: 100, children: /* @__PURE__ */ r(xe, { children: [
|
|
2672
|
-
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(
|
|
2689
|
+
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(Pn, { className: "size-3 text-muted-foreground" }) }),
|
|
2673
2690
|
/* @__PURE__ */ e(we, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
|
|
2674
2691
|
] }) })
|
|
2675
2692
|
] }),
|
|
@@ -2680,12 +2697,12 @@ function Ar({
|
|
|
2680
2697
|
onChange: p,
|
|
2681
2698
|
disabled: a,
|
|
2682
2699
|
className: "h-9 w-[128px] text-sm",
|
|
2683
|
-
children:
|
|
2700
|
+
children: Wn.map((d) => /* @__PURE__ */ e("option", { value: d.value.toString(), children: d.label }, d.value))
|
|
2684
2701
|
}
|
|
2685
2702
|
)
|
|
2686
2703
|
] });
|
|
2687
2704
|
}
|
|
2688
|
-
function
|
|
2705
|
+
function _n({ className: t }) {
|
|
2689
2706
|
return /* @__PURE__ */ r(
|
|
2690
2707
|
"svg",
|
|
2691
2708
|
{
|
|
@@ -2707,7 +2724,7 @@ function Fn({ className: t }) {
|
|
|
2707
2724
|
}
|
|
2708
2725
|
);
|
|
2709
2726
|
}
|
|
2710
|
-
function
|
|
2727
|
+
function Fn({ className: t }) {
|
|
2711
2728
|
return /* @__PURE__ */ r(
|
|
2712
2729
|
"svg",
|
|
2713
2730
|
{
|
|
@@ -2728,12 +2745,12 @@ function On({ className: t }) {
|
|
|
2728
2745
|
}
|
|
2729
2746
|
);
|
|
2730
2747
|
}
|
|
2731
|
-
const
|
|
2748
|
+
const On = [
|
|
2732
2749
|
{ value: "dot", label: "Dot indicator" },
|
|
2733
2750
|
{ value: "colored", label: "Full color" },
|
|
2734
2751
|
{ value: "mixed", label: "Mixed" }
|
|
2735
2752
|
];
|
|
2736
|
-
function
|
|
2753
|
+
function Hr({
|
|
2737
2754
|
value: t,
|
|
2738
2755
|
onChange: n,
|
|
2739
2756
|
isLocked: a = !1,
|
|
@@ -2750,17 +2767,17 @@ function jr({
|
|
|
2750
2767
|
mixed: "Mixed"
|
|
2751
2768
|
},
|
|
2752
2769
|
...s
|
|
2753
|
-
}, p = (c) => l.options?.[c] ?? c,
|
|
2770
|
+
}, p = (c) => l.options?.[c] ?? c, d = (c) => {
|
|
2754
2771
|
a || n(c.target.value);
|
|
2755
2772
|
};
|
|
2756
|
-
return /* @__PURE__ */ r("div", { className:
|
|
2773
|
+
return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
|
|
2757
2774
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
2758
2775
|
/* @__PURE__ */ e(ge, { className: "text-sm font-semibold", children: l.title }),
|
|
2759
2776
|
a ? /* @__PURE__ */ e(pe, { delayDuration: 100, children: /* @__PURE__ */ r(xe, { children: [
|
|
2760
|
-
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(
|
|
2777
|
+
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(Fn, { className: "size-3 text-muted-foreground" }) }),
|
|
2761
2778
|
/* @__PURE__ */ e(we, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
|
|
2762
2779
|
] }) }) : /* @__PURE__ */ e(pe, { delayDuration: 100, children: /* @__PURE__ */ r(xe, { children: [
|
|
2763
|
-
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(
|
|
2780
|
+
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(_n, { className: "size-3 text-muted-foreground" }) }),
|
|
2764
2781
|
/* @__PURE__ */ e(we, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
|
|
2765
2782
|
] }) })
|
|
2766
2783
|
] }),
|
|
@@ -2768,15 +2785,15 @@ function jr({
|
|
|
2768
2785
|
be,
|
|
2769
2786
|
{
|
|
2770
2787
|
value: t,
|
|
2771
|
-
onChange:
|
|
2788
|
+
onChange: d,
|
|
2772
2789
|
disabled: a,
|
|
2773
2790
|
className: "h-9 w-[128px] text-sm",
|
|
2774
|
-
children:
|
|
2791
|
+
children: On.map((c) => /* @__PURE__ */ e("option", { value: c.value, children: p(c.value) }, c.value))
|
|
2775
2792
|
}
|
|
2776
2793
|
)
|
|
2777
2794
|
] });
|
|
2778
2795
|
}
|
|
2779
|
-
function
|
|
2796
|
+
function $n({ className: t }) {
|
|
2780
2797
|
return /* @__PURE__ */ r(
|
|
2781
2798
|
"svg",
|
|
2782
2799
|
{
|
|
@@ -2798,7 +2815,7 @@ function Rn({ className: t }) {
|
|
|
2798
2815
|
}
|
|
2799
2816
|
);
|
|
2800
2817
|
}
|
|
2801
|
-
function
|
|
2818
|
+
function Bn({ className: t }) {
|
|
2802
2819
|
return /* @__PURE__ */ r(
|
|
2803
2820
|
"svg",
|
|
2804
2821
|
{
|
|
@@ -2819,13 +2836,13 @@ function Un({ className: t }) {
|
|
|
2819
2836
|
}
|
|
2820
2837
|
);
|
|
2821
2838
|
}
|
|
2822
|
-
function
|
|
2839
|
+
function Rn() {
|
|
2823
2840
|
return Array.from({ length: 25 }, (t, n) => ({
|
|
2824
2841
|
value: n,
|
|
2825
2842
|
label: `${String(n).padStart(2, "0")}:00`
|
|
2826
2843
|
}));
|
|
2827
2844
|
}
|
|
2828
|
-
function
|
|
2845
|
+
function Ar({
|
|
2829
2846
|
value: t,
|
|
2830
2847
|
onChange: n,
|
|
2831
2848
|
isLocked: a = !1,
|
|
@@ -2839,23 +2856,23 @@ function Pr({
|
|
|
2839
2856
|
lockedMessage: "This setting is locked by the administrator",
|
|
2840
2857
|
infoMessage: "Set the visible hour range for day and week views. Hours outside this range will be hidden.",
|
|
2841
2858
|
...s
|
|
2842
|
-
}, p =
|
|
2859
|
+
}, p = Rn(), d = (x) => {
|
|
2843
2860
|
if (a) return;
|
|
2844
|
-
const
|
|
2845
|
-
|
|
2846
|
-
}, c = (
|
|
2861
|
+
const L = Number(x.target.value);
|
|
2862
|
+
L < t.endHour && n({ ...t, startHour: L });
|
|
2863
|
+
}, c = (x) => {
|
|
2847
2864
|
if (a) return;
|
|
2848
|
-
const
|
|
2849
|
-
|
|
2865
|
+
const L = Number(x.target.value);
|
|
2866
|
+
L > t.startHour && n({ ...t, endHour: L });
|
|
2850
2867
|
};
|
|
2851
|
-
return /* @__PURE__ */ r("div", { className:
|
|
2868
|
+
return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
|
|
2852
2869
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
2853
2870
|
/* @__PURE__ */ e(ge, { className: "text-sm font-semibold", children: l.title }),
|
|
2854
2871
|
a ? /* @__PURE__ */ e(pe, { delayDuration: 100, children: /* @__PURE__ */ r(xe, { children: [
|
|
2855
|
-
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(
|
|
2872
|
+
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(Bn, { className: "size-3 text-muted-foreground" }) }),
|
|
2856
2873
|
/* @__PURE__ */ e(we, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
|
|
2857
2874
|
] }) }) : /* @__PURE__ */ e(pe, { delayDuration: 100, children: /* @__PURE__ */ r(xe, { children: [
|
|
2858
|
-
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(
|
|
2875
|
+
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e($n, { className: "size-3 text-muted-foreground" }) }),
|
|
2859
2876
|
/* @__PURE__ */ e(we, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
|
|
2860
2877
|
] }) })
|
|
2861
2878
|
] }),
|
|
@@ -2866,17 +2883,17 @@ function Pr({
|
|
|
2866
2883
|
be,
|
|
2867
2884
|
{
|
|
2868
2885
|
value: t.startHour.toString(),
|
|
2869
|
-
onChange:
|
|
2886
|
+
onChange: d,
|
|
2870
2887
|
disabled: a,
|
|
2871
2888
|
className: "h-9 w-[88px] text-sm",
|
|
2872
|
-
children: p.map((
|
|
2889
|
+
children: p.map((x) => /* @__PURE__ */ e(
|
|
2873
2890
|
"option",
|
|
2874
2891
|
{
|
|
2875
|
-
value:
|
|
2876
|
-
disabled:
|
|
2877
|
-
children:
|
|
2892
|
+
value: x.value.toString(),
|
|
2893
|
+
disabled: x.value >= t.endHour,
|
|
2894
|
+
children: x.label
|
|
2878
2895
|
},
|
|
2879
|
-
|
|
2896
|
+
x.value
|
|
2880
2897
|
))
|
|
2881
2898
|
}
|
|
2882
2899
|
)
|
|
@@ -2891,14 +2908,14 @@ function Pr({
|
|
|
2891
2908
|
onChange: c,
|
|
2892
2909
|
disabled: a,
|
|
2893
2910
|
className: "h-9 w-[88px] text-sm",
|
|
2894
|
-
children: p.map((
|
|
2911
|
+
children: p.map((x) => /* @__PURE__ */ e(
|
|
2895
2912
|
"option",
|
|
2896
2913
|
{
|
|
2897
|
-
value:
|
|
2898
|
-
disabled:
|
|
2899
|
-
children:
|
|
2914
|
+
value: x.value.toString(),
|
|
2915
|
+
disabled: x.value <= t.startHour,
|
|
2916
|
+
children: x.label
|
|
2900
2917
|
},
|
|
2901
|
-
|
|
2918
|
+
x.value
|
|
2902
2919
|
))
|
|
2903
2920
|
}
|
|
2904
2921
|
)
|
|
@@ -2906,7 +2923,7 @@ function Pr({
|
|
|
2906
2923
|
] })
|
|
2907
2924
|
] });
|
|
2908
2925
|
}
|
|
2909
|
-
function
|
|
2926
|
+
function Un({ className: t }) {
|
|
2910
2927
|
return /* @__PURE__ */ r(
|
|
2911
2928
|
"svg",
|
|
2912
2929
|
{
|
|
@@ -2928,7 +2945,7 @@ function Yn({ className: t }) {
|
|
|
2928
2945
|
}
|
|
2929
2946
|
);
|
|
2930
2947
|
}
|
|
2931
|
-
function
|
|
2948
|
+
function Vn({ className: t }) {
|
|
2932
2949
|
return /* @__PURE__ */ r(
|
|
2933
2950
|
"svg",
|
|
2934
2951
|
{
|
|
@@ -2949,7 +2966,7 @@ function Kn({ className: t }) {
|
|
|
2949
2966
|
}
|
|
2950
2967
|
);
|
|
2951
2968
|
}
|
|
2952
|
-
function
|
|
2969
|
+
function Yn({ className: t }) {
|
|
2953
2970
|
return /* @__PURE__ */ e(
|
|
2954
2971
|
"svg",
|
|
2955
2972
|
{
|
|
@@ -2967,7 +2984,7 @@ function qn({ className: t }) {
|
|
|
2967
2984
|
}
|
|
2968
2985
|
);
|
|
2969
2986
|
}
|
|
2970
|
-
const
|
|
2987
|
+
const Kn = [
|
|
2971
2988
|
"monday",
|
|
2972
2989
|
"tuesday",
|
|
2973
2990
|
"wednesday",
|
|
@@ -2976,13 +2993,13 @@ const Gn = [
|
|
|
2976
2993
|
"saturday",
|
|
2977
2994
|
"sunday"
|
|
2978
2995
|
];
|
|
2979
|
-
function
|
|
2996
|
+
function qn() {
|
|
2980
2997
|
return Array.from({ length: 25 }, (t, n) => ({
|
|
2981
2998
|
value: n,
|
|
2982
2999
|
label: `${String(n).padStart(2, "0")}:00`
|
|
2983
3000
|
}));
|
|
2984
3001
|
}
|
|
2985
|
-
const
|
|
3002
|
+
const rt = {
|
|
2986
3003
|
sunday: "Sun",
|
|
2987
3004
|
monday: "Mon",
|
|
2988
3005
|
tuesday: "Tue",
|
|
@@ -2991,17 +3008,17 @@ const ot = {
|
|
|
2991
3008
|
friday: "Fri",
|
|
2992
3009
|
saturday: "Sat"
|
|
2993
3010
|
};
|
|
2994
|
-
function
|
|
3011
|
+
function Gn({ dayLabel: t, config: n, onChange: a, disabled: o, hourOptions: s }) {
|
|
2995
3012
|
const l = () => {
|
|
2996
3013
|
o || a({ ...n, enabled: !n.enabled });
|
|
2997
3014
|
}, p = (c) => {
|
|
2998
3015
|
if (o) return;
|
|
2999
|
-
const
|
|
3000
|
-
|
|
3001
|
-
},
|
|
3016
|
+
const x = Number(c.target.value);
|
|
3017
|
+
x < n.to && a({ ...n, from: x });
|
|
3018
|
+
}, d = (c) => {
|
|
3002
3019
|
if (o) return;
|
|
3003
|
-
const
|
|
3004
|
-
|
|
3020
|
+
const x = Number(c.target.value);
|
|
3021
|
+
x > n.from && a({ ...n, to: x });
|
|
3005
3022
|
};
|
|
3006
3023
|
return /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
3007
3024
|
/* @__PURE__ */ e(
|
|
@@ -3013,15 +3030,15 @@ function Xn({ dayLabel: t, config: n, onChange: a, disabled: o, hourOptions: s }
|
|
|
3013
3030
|
"aria-label": `Enable ${t}`,
|
|
3014
3031
|
onClick: l,
|
|
3015
3032
|
disabled: o,
|
|
3016
|
-
className:
|
|
3033
|
+
className: g(
|
|
3017
3034
|
"flex size-5 shrink-0 items-center justify-center rounded border transition-colors",
|
|
3018
3035
|
n.enabled ? "border-primary bg-primary text-primary-foreground" : "border-input bg-background",
|
|
3019
3036
|
o && "cursor-not-allowed opacity-50"
|
|
3020
3037
|
),
|
|
3021
|
-
children: n.enabled && /* @__PURE__ */ e(
|
|
3038
|
+
children: n.enabled && /* @__PURE__ */ e(Yn, { className: "size-3" })
|
|
3022
3039
|
}
|
|
3023
3040
|
),
|
|
3024
|
-
/* @__PURE__ */ e("span", { className:
|
|
3041
|
+
/* @__PURE__ */ e("span", { className: g("w-10 text-sm", !n.enabled && "text-muted-foreground"), children: t }),
|
|
3025
3042
|
/* @__PURE__ */ e(
|
|
3026
3043
|
be,
|
|
3027
3044
|
{
|
|
@@ -3037,7 +3054,7 @@ function Xn({ dayLabel: t, config: n, onChange: a, disabled: o, hourOptions: s }
|
|
|
3037
3054
|
be,
|
|
3038
3055
|
{
|
|
3039
3056
|
value: n.to.toString(),
|
|
3040
|
-
onChange:
|
|
3057
|
+
onChange: d,
|
|
3041
3058
|
disabled: o || !n.enabled,
|
|
3042
3059
|
className: "h-8 w-[76px] text-xs",
|
|
3043
3060
|
children: s.map((c) => /* @__PURE__ */ e("option", { value: c.value.toString(), disabled: c.value <= n.from, children: c.label }, c.value))
|
|
@@ -3045,7 +3062,7 @@ function Xn({ dayLabel: t, config: n, onChange: a, disabled: o, hourOptions: s }
|
|
|
3045
3062
|
)
|
|
3046
3063
|
] });
|
|
3047
3064
|
}
|
|
3048
|
-
function
|
|
3065
|
+
function Pr({
|
|
3049
3066
|
value: t,
|
|
3050
3067
|
onChange: n,
|
|
3051
3068
|
isLocked: a = !1,
|
|
@@ -3056,28 +3073,28 @@ function Wr({
|
|
|
3056
3073
|
title: "Working hours",
|
|
3057
3074
|
lockedMessage: "This setting is locked by the administrator",
|
|
3058
3075
|
infoMessage: "Configure working hours for each day of the week. Non-working hours will be grayed out in day and week views.",
|
|
3059
|
-
days:
|
|
3076
|
+
days: rt,
|
|
3060
3077
|
...s
|
|
3061
|
-
}, p =
|
|
3062
|
-
a || n({ ...t, [c]:
|
|
3078
|
+
}, p = qn(), d = (c, x) => {
|
|
3079
|
+
a || n({ ...t, [c]: x });
|
|
3063
3080
|
};
|
|
3064
|
-
return /* @__PURE__ */ r("div", { className:
|
|
3081
|
+
return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-3", o), children: [
|
|
3065
3082
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
3066
3083
|
/* @__PURE__ */ e(ge, { className: "text-sm font-semibold", children: l.title }),
|
|
3067
3084
|
a ? /* @__PURE__ */ e(pe, { delayDuration: 100, children: /* @__PURE__ */ r(xe, { children: [
|
|
3068
|
-
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(
|
|
3085
|
+
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(Vn, { className: "size-3 text-muted-foreground" }) }),
|
|
3069
3086
|
/* @__PURE__ */ e(we, { children: /* @__PURE__ */ e("p", { children: l.lockedMessage }) })
|
|
3070
3087
|
] }) }) : /* @__PURE__ */ e(pe, { delayDuration: 100, children: /* @__PURE__ */ r(xe, { children: [
|
|
3071
|
-
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(
|
|
3088
|
+
/* @__PURE__ */ e(ve, { children: /* @__PURE__ */ e(Un, { className: "size-3 text-muted-foreground" }) }),
|
|
3072
3089
|
/* @__PURE__ */ e(we, { className: "max-w-64 text-center", children: /* @__PURE__ */ e("p", { children: l.infoMessage }) })
|
|
3073
3090
|
] }) })
|
|
3074
3091
|
] }),
|
|
3075
|
-
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children:
|
|
3076
|
-
|
|
3092
|
+
/* @__PURE__ */ e("div", { className: "flex flex-col gap-2", children: Kn.map((c) => /* @__PURE__ */ e(
|
|
3093
|
+
Gn,
|
|
3077
3094
|
{
|
|
3078
|
-
dayLabel: l.days?.[c] ??
|
|
3095
|
+
dayLabel: l.days?.[c] ?? rt[c],
|
|
3079
3096
|
config: t[c],
|
|
3080
|
-
onChange: (
|
|
3097
|
+
onChange: (x) => d(c, x),
|
|
3081
3098
|
disabled: a,
|
|
3082
3099
|
hourOptions: p
|
|
3083
3100
|
},
|
|
@@ -3085,7 +3102,7 @@ function Wr({
|
|
|
3085
3102
|
)) })
|
|
3086
3103
|
] });
|
|
3087
3104
|
}
|
|
3088
|
-
const
|
|
3105
|
+
const jr = {
|
|
3089
3106
|
sunday: { enabled: !1, from: 8, to: 18 },
|
|
3090
3107
|
monday: { enabled: !0, from: 8, to: 18 },
|
|
3091
3108
|
tuesday: { enabled: !0, from: 8, to: 18 },
|
|
@@ -3094,7 +3111,7 @@ const _r = {
|
|
|
3094
3111
|
friday: { enabled: !0, from: 8, to: 18 },
|
|
3095
3112
|
saturday: { enabled: !1, from: 8, to: 18 }
|
|
3096
3113
|
};
|
|
3097
|
-
function
|
|
3114
|
+
function Be({ className: t }) {
|
|
3098
3115
|
return /* @__PURE__ */ e(
|
|
3099
3116
|
"svg",
|
|
3100
3117
|
{
|
|
@@ -3110,7 +3127,7 @@ function Re({ className: t }) {
|
|
|
3110
3127
|
}
|
|
3111
3128
|
);
|
|
3112
3129
|
}
|
|
3113
|
-
function
|
|
3130
|
+
function Jn({ className: t }) {
|
|
3114
3131
|
return /* @__PURE__ */ r(
|
|
3115
3132
|
"svg",
|
|
3116
3133
|
{
|
|
@@ -3129,7 +3146,7 @@ function Qn({ className: t }) {
|
|
|
3129
3146
|
}
|
|
3130
3147
|
);
|
|
3131
3148
|
}
|
|
3132
|
-
function
|
|
3149
|
+
function Xn({ className: t }) {
|
|
3133
3150
|
return /* @__PURE__ */ r(
|
|
3134
3151
|
"svg",
|
|
3135
3152
|
{
|
|
@@ -3148,7 +3165,7 @@ function Zn({ className: t }) {
|
|
|
3148
3165
|
}
|
|
3149
3166
|
);
|
|
3150
3167
|
}
|
|
3151
|
-
function
|
|
3168
|
+
function Re({ checked: t, onCheckedChange: n, className: a, children: o }) {
|
|
3152
3169
|
return /* @__PURE__ */ e(
|
|
3153
3170
|
"button",
|
|
3154
3171
|
{
|
|
@@ -3161,12 +3178,12 @@ function Ue({ checked: t, onCheckedChange: n, className: a, children: o }) {
|
|
|
3161
3178
|
}
|
|
3162
3179
|
);
|
|
3163
3180
|
}
|
|
3164
|
-
function
|
|
3165
|
-
const [s, l] =
|
|
3181
|
+
function Qn({ src: t, alt: n, fallback: a, className: o }) {
|
|
3182
|
+
const [s, l] = ie(!1);
|
|
3166
3183
|
return !t || s ? /* @__PURE__ */ e(
|
|
3167
3184
|
"div",
|
|
3168
3185
|
{
|
|
3169
|
-
className:
|
|
3186
|
+
className: g(
|
|
3170
3187
|
"flex items-center justify-center bg-zinc-200 text-zinc-600 font-medium text-sm",
|
|
3171
3188
|
o
|
|
3172
3189
|
),
|
|
@@ -3177,14 +3194,14 @@ function er({ src: t, alt: n, fallback: a, className: o }) {
|
|
|
3177
3194
|
{
|
|
3178
3195
|
src: t,
|
|
3179
3196
|
alt: n || "",
|
|
3180
|
-
className:
|
|
3197
|
+
className: g("object-cover", o),
|
|
3181
3198
|
onError: () => l(!0)
|
|
3182
3199
|
}
|
|
3183
3200
|
);
|
|
3184
3201
|
}
|
|
3185
|
-
function
|
|
3186
|
-
return /* @__PURE__ */ r("div", { className:
|
|
3187
|
-
/* @__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" }),
|
|
3188
3205
|
/* @__PURE__ */ e(
|
|
3189
3206
|
"input",
|
|
3190
3207
|
{
|
|
@@ -3197,12 +3214,12 @@ function at({ value: t, onChange: n, placeholder: a, className: o }) {
|
|
|
3197
3214
|
)
|
|
3198
3215
|
] });
|
|
3199
3216
|
}
|
|
3200
|
-
function
|
|
3217
|
+
function at(t, n, a, o = 0.3) {
|
|
3201
3218
|
if (!n.trim()) return t;
|
|
3202
3219
|
const s = n.toLowerCase();
|
|
3203
|
-
return t.filter((l) => a(l).some((
|
|
3220
|
+
return t.filter((l) => a(l).some((d) => d ? d.toLowerCase().includes(s) : !1));
|
|
3204
3221
|
}
|
|
3205
|
-
const
|
|
3222
|
+
const Zn = {
|
|
3206
3223
|
title: "Filters",
|
|
3207
3224
|
subtitle: "Filter calendar events",
|
|
3208
3225
|
scheduleTypes: "Event Types",
|
|
@@ -3215,7 +3232,7 @@ const tr = {
|
|
|
3215
3232
|
noScheduleTypes: "No event types found",
|
|
3216
3233
|
noParticipants: "No participants found"
|
|
3217
3234
|
};
|
|
3218
|
-
function
|
|
3235
|
+
function Wr({
|
|
3219
3236
|
scheduleTypes: t,
|
|
3220
3237
|
users: n,
|
|
3221
3238
|
selectedScheduleTypeIds: a,
|
|
@@ -3223,49 +3240,49 @@ function $r({
|
|
|
3223
3240
|
selectedUserIds: s,
|
|
3224
3241
|
onUserChange: l,
|
|
3225
3242
|
onClearAll: p,
|
|
3226
|
-
className:
|
|
3243
|
+
className: d,
|
|
3227
3244
|
scheduleTypesLoading: c = !1,
|
|
3228
|
-
usersLoading:
|
|
3229
|
-
labels:
|
|
3245
|
+
usersLoading: x = !1,
|
|
3246
|
+
labels: L,
|
|
3230
3247
|
getScheduleTypeName: b
|
|
3231
3248
|
}) {
|
|
3232
|
-
const w = { ...
|
|
3233
|
-
|
|
3234
|
-
b?.(
|
|
3235
|
-
]) : t, [t,
|
|
3236
|
-
const
|
|
3237
|
-
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);
|
|
3238
3255
|
}, M = () => {
|
|
3239
|
-
if (
|
|
3240
|
-
const
|
|
3241
|
-
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)));
|
|
3242
3259
|
} else {
|
|
3243
|
-
const
|
|
3260
|
+
const v = /* @__PURE__ */ new Set([
|
|
3244
3261
|
...a,
|
|
3245
|
-
...
|
|
3262
|
+
...B.map((C) => C.id)
|
|
3246
3263
|
]);
|
|
3247
|
-
o(Array.from(
|
|
3264
|
+
o(Array.from(v));
|
|
3248
3265
|
}
|
|
3249
|
-
},
|
|
3250
|
-
const
|
|
3251
|
-
l(
|
|
3252
|
-
},
|
|
3266
|
+
}, F = (v, C) => {
|
|
3267
|
+
const h = C ? [...s, v] : s.filter((N) => N !== v);
|
|
3268
|
+
l(h);
|
|
3269
|
+
}, P = () => {
|
|
3253
3270
|
if (W) {
|
|
3254
|
-
const
|
|
3255
|
-
l(s.filter((C) => !
|
|
3271
|
+
const v = new Set(z.map((C) => C.id));
|
|
3272
|
+
l(s.filter((C) => !v.has(C)));
|
|
3256
3273
|
} else {
|
|
3257
|
-
const
|
|
3258
|
-
l(Array.from(
|
|
3274
|
+
const v = /* @__PURE__ */ new Set([...s, ...z.map((C) => C.id)]);
|
|
3275
|
+
l(Array.from(v));
|
|
3259
3276
|
}
|
|
3260
|
-
},
|
|
3277
|
+
}, Y = () => {
|
|
3261
3278
|
o([]), l([]), p?.();
|
|
3262
|
-
},
|
|
3279
|
+
}, K = (v) => b ? b(v) : v.name, J = (v) => v.colorHex || v.color || "#069AD7";
|
|
3263
3280
|
return /* @__PURE__ */ r(
|
|
3264
3281
|
"div",
|
|
3265
3282
|
{
|
|
3266
|
-
className:
|
|
3283
|
+
className: g(
|
|
3267
3284
|
"flex min-w-72 max-w-72 flex-col rounded-lg border bg-white shadow-sm",
|
|
3268
|
-
|
|
3285
|
+
d
|
|
3269
3286
|
),
|
|
3270
3287
|
children: [
|
|
3271
3288
|
/* @__PURE__ */ r("header", { className: "flex items-start justify-between gap-2 px-4 pb-2 pt-4", children: [
|
|
@@ -3273,14 +3290,14 @@ function $r({
|
|
|
3273
3290
|
/* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: w.title }),
|
|
3274
3291
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: w.subtitle })
|
|
3275
3292
|
] }),
|
|
3276
|
-
|
|
3293
|
+
A > 0 && /* @__PURE__ */ r(
|
|
3277
3294
|
"button",
|
|
3278
3295
|
{
|
|
3279
3296
|
type: "button",
|
|
3280
|
-
onClick:
|
|
3297
|
+
onClick: Y,
|
|
3281
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",
|
|
3282
3299
|
children: [
|
|
3283
|
-
/* @__PURE__ */ e(
|
|
3300
|
+
/* @__PURE__ */ e(Xn, { className: "h-3.5 w-3.5" }),
|
|
3284
3301
|
w.clearAll
|
|
3285
3302
|
]
|
|
3286
3303
|
}
|
|
@@ -3296,14 +3313,14 @@ function $r({
|
|
|
3296
3313
|
type: "button",
|
|
3297
3314
|
onClick: M,
|
|
3298
3315
|
className: "text-xs font-medium text-primary transition-colors hover:text-primary/80",
|
|
3299
|
-
children:
|
|
3316
|
+
children: T ? w.unselectAll : w.selectAll
|
|
3300
3317
|
}
|
|
3301
3318
|
)
|
|
3302
3319
|
] }),
|
|
3303
3320
|
t.length > 6 && /* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
|
|
3304
|
-
|
|
3321
|
+
ot,
|
|
3305
3322
|
{
|
|
3306
|
-
value:
|
|
3323
|
+
value: I,
|
|
3307
3324
|
onChange: S,
|
|
3308
3325
|
placeholder: w.searchScheduleTypes
|
|
3309
3326
|
}
|
|
@@ -3311,7 +3328,7 @@ function $r({
|
|
|
3311
3328
|
/* @__PURE__ */ r("div", { className: "flex max-h-[220px] flex-col gap-2 overflow-y-auto px-4 pb-2 scrollbar-thin", children: [
|
|
3312
3329
|
c ? (
|
|
3313
3330
|
// Loading skeletons
|
|
3314
|
-
Array.from({ length: 4 }).map((
|
|
3331
|
+
Array.from({ length: 4 }).map((v, C) => /* @__PURE__ */ r(
|
|
3315
3332
|
"div",
|
|
3316
3333
|
{
|
|
3317
3334
|
className: "flex animate-pulse items-center gap-2 rounded-md border border-border/60 bg-muted/40 p-2",
|
|
@@ -3322,14 +3339,14 @@ function $r({
|
|
|
3322
3339
|
},
|
|
3323
3340
|
`skeleton-${C}`
|
|
3324
3341
|
))
|
|
3325
|
-
) :
|
|
3326
|
-
const C = a.includes(
|
|
3342
|
+
) : B.map((v) => {
|
|
3343
|
+
const C = a.includes(v.id), h = J(v);
|
|
3327
3344
|
return /* @__PURE__ */ r(
|
|
3328
|
-
|
|
3345
|
+
Re,
|
|
3329
3346
|
{
|
|
3330
3347
|
checked: C,
|
|
3331
|
-
onCheckedChange: (N) => X(
|
|
3332
|
-
className:
|
|
3348
|
+
onCheckedChange: (N) => X(v.id, N),
|
|
3349
|
+
className: g(
|
|
3333
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",
|
|
3334
3351
|
C && "border-primary bg-primary/5"
|
|
3335
3352
|
),
|
|
@@ -3338,31 +3355,31 @@ function $r({
|
|
|
3338
3355
|
/* @__PURE__ */ e(
|
|
3339
3356
|
"span",
|
|
3340
3357
|
{
|
|
3341
|
-
className:
|
|
3358
|
+
className: g(
|
|
3342
3359
|
"flex h-4 w-4 items-center justify-center rounded border border-border text-xs transition-colors",
|
|
3343
3360
|
C && "border-primary bg-primary text-primary-foreground"
|
|
3344
3361
|
),
|
|
3345
|
-
children: C && /* @__PURE__ */ e(
|
|
3362
|
+
children: C && /* @__PURE__ */ e(Be, { className: "h-3 w-3" })
|
|
3346
3363
|
}
|
|
3347
3364
|
),
|
|
3348
|
-
/* @__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) })
|
|
3349
3366
|
] }),
|
|
3350
3367
|
/* @__PURE__ */ e(
|
|
3351
3368
|
"div",
|
|
3352
3369
|
{
|
|
3353
3370
|
className: "h-4 w-4 rounded-full border",
|
|
3354
3371
|
style: {
|
|
3355
|
-
backgroundColor:
|
|
3356
|
-
borderColor:
|
|
3372
|
+
backgroundColor: h,
|
|
3373
|
+
borderColor: h
|
|
3357
3374
|
}
|
|
3358
3375
|
}
|
|
3359
3376
|
)
|
|
3360
3377
|
]
|
|
3361
3378
|
},
|
|
3362
|
-
|
|
3379
|
+
v.id
|
|
3363
3380
|
);
|
|
3364
3381
|
}),
|
|
3365
|
-
!c &&
|
|
3382
|
+
!c && B.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: w.noScheduleTypes })
|
|
3366
3383
|
] })
|
|
3367
3384
|
] }),
|
|
3368
3385
|
/* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
|
|
@@ -3370,30 +3387,30 @@ function $r({
|
|
|
3370
3387
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between px-4 py-3", children: [
|
|
3371
3388
|
/* @__PURE__ */ e("h4", { className: "text-sm font-medium text-foreground", children: w.participants }),
|
|
3372
3389
|
/* @__PURE__ */ e(
|
|
3373
|
-
|
|
3390
|
+
Re,
|
|
3374
3391
|
{
|
|
3375
3392
|
checked: W,
|
|
3376
|
-
onCheckedChange: () =>
|
|
3377
|
-
className:
|
|
3393
|
+
onCheckedChange: () => P(),
|
|
3394
|
+
className: g(
|
|
3378
3395
|
"flex h-5 w-5 items-center justify-center rounded border border-border bg-white transition-colors hover:border-primary/50",
|
|
3379
3396
|
W && "border-primary bg-primary text-primary-foreground"
|
|
3380
3397
|
),
|
|
3381
|
-
children: W && /* @__PURE__ */ e(
|
|
3398
|
+
children: W && /* @__PURE__ */ e(Be, { className: "h-3.5 w-3.5" })
|
|
3382
3399
|
}
|
|
3383
3400
|
)
|
|
3384
3401
|
] }),
|
|
3385
3402
|
/* @__PURE__ */ e("div", { className: "px-4 pb-3", children: /* @__PURE__ */ e(
|
|
3386
|
-
|
|
3403
|
+
ot,
|
|
3387
3404
|
{
|
|
3388
|
-
value:
|
|
3389
|
-
onChange:
|
|
3405
|
+
value: H,
|
|
3406
|
+
onChange: _,
|
|
3390
3407
|
placeholder: w.searchParticipants
|
|
3391
3408
|
}
|
|
3392
3409
|
) }),
|
|
3393
3410
|
/* @__PURE__ */ r("div", { className: "flex max-h-[400px] flex-col gap-2 overflow-y-auto px-4 pb-4 scrollbar-thin", children: [
|
|
3394
|
-
|
|
3411
|
+
x ? (
|
|
3395
3412
|
// Loading skeletons
|
|
3396
|
-
Array.from({ length: 4 }).map((
|
|
3413
|
+
Array.from({ length: 4 }).map((v, C) => /* @__PURE__ */ r(
|
|
3397
3414
|
"div",
|
|
3398
3415
|
{
|
|
3399
3416
|
className: "flex animate-pulse items-center gap-3 rounded-md border border-border/60 bg-muted/40 p-3",
|
|
@@ -3408,14 +3425,14 @@ function $r({
|
|
|
3408
3425
|
},
|
|
3409
3426
|
`p-skeleton-${C}`
|
|
3410
3427
|
))
|
|
3411
|
-
) :
|
|
3412
|
-
const C = s.includes(
|
|
3428
|
+
) : z.map((v) => {
|
|
3429
|
+
const C = s.includes(v.id);
|
|
3413
3430
|
return /* @__PURE__ */ r(
|
|
3414
|
-
|
|
3431
|
+
Re,
|
|
3415
3432
|
{
|
|
3416
3433
|
checked: C,
|
|
3417
|
-
onCheckedChange: (
|
|
3418
|
-
className:
|
|
3434
|
+
onCheckedChange: (h) => F(v.id, h),
|
|
3435
|
+
className: g(
|
|
3419
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",
|
|
3420
3437
|
C && "border-primary bg-zinc-50"
|
|
3421
3438
|
),
|
|
@@ -3423,48 +3440,48 @@ function $r({
|
|
|
3423
3440
|
/* @__PURE__ */ e(
|
|
3424
3441
|
"span",
|
|
3425
3442
|
{
|
|
3426
|
-
className:
|
|
3443
|
+
className: g(
|
|
3427
3444
|
"flex h-4 w-4 flex-shrink-0 items-center justify-center rounded border border-border transition-colors",
|
|
3428
3445
|
C && "border-primary bg-primary text-primary-foreground"
|
|
3429
3446
|
),
|
|
3430
|
-
children: C && /* @__PURE__ */ e(
|
|
3447
|
+
children: C && /* @__PURE__ */ e(Be, { className: "h-2.5 w-2.5" })
|
|
3431
3448
|
}
|
|
3432
3449
|
),
|
|
3433
3450
|
/* @__PURE__ */ r("div", { className: "flex flex-1 items-start gap-2", children: [
|
|
3434
3451
|
/* @__PURE__ */ e(
|
|
3435
|
-
|
|
3452
|
+
Qn,
|
|
3436
3453
|
{
|
|
3437
|
-
src:
|
|
3438
|
-
alt:
|
|
3439
|
-
fallback:
|
|
3454
|
+
src: v.avatar ?? null,
|
|
3455
|
+
alt: v.name,
|
|
3456
|
+
fallback: v.name?.[0]?.toUpperCase() ?? "?",
|
|
3440
3457
|
className: "h-10 w-10 rounded-lg"
|
|
3441
3458
|
}
|
|
3442
3459
|
),
|
|
3443
3460
|
/* @__PURE__ */ r("div", { className: "flex max-w-[140px] flex-col gap-0.5 overflow-hidden", children: [
|
|
3444
|
-
/* @__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 }),
|
|
3445
3462
|
/* @__PURE__ */ e(
|
|
3446
3463
|
"span",
|
|
3447
3464
|
{
|
|
3448
3465
|
className: "truncate text-[11px] text-muted-foreground",
|
|
3449
|
-
title:
|
|
3450
|
-
children:
|
|
3466
|
+
title: v.email,
|
|
3467
|
+
children: v.email
|
|
3451
3468
|
}
|
|
3452
3469
|
)
|
|
3453
3470
|
] })
|
|
3454
3471
|
] })
|
|
3455
3472
|
]
|
|
3456
3473
|
},
|
|
3457
|
-
|
|
3474
|
+
v.id
|
|
3458
3475
|
);
|
|
3459
3476
|
}),
|
|
3460
|
-
!
|
|
3477
|
+
!x && z.length === 0 && /* @__PURE__ */ e("p", { className: "px-4 text-xs text-muted-foreground", children: w.noParticipants })
|
|
3461
3478
|
] })
|
|
3462
3479
|
] })
|
|
3463
3480
|
]
|
|
3464
3481
|
}
|
|
3465
3482
|
);
|
|
3466
3483
|
}
|
|
3467
|
-
function
|
|
3484
|
+
function er({ className: t }) {
|
|
3468
3485
|
return /* @__PURE__ */ r(
|
|
3469
3486
|
"svg",
|
|
3470
3487
|
{
|
|
@@ -3485,7 +3502,7 @@ function nr({ className: t }) {
|
|
|
3485
3502
|
}
|
|
3486
3503
|
);
|
|
3487
3504
|
}
|
|
3488
|
-
function
|
|
3505
|
+
function _r({
|
|
3489
3506
|
scheduleTypes: t,
|
|
3490
3507
|
value: n,
|
|
3491
3508
|
onChange: a,
|
|
@@ -3495,17 +3512,17 @@ function Fr({
|
|
|
3495
3512
|
}) {
|
|
3496
3513
|
const p = (c) => {
|
|
3497
3514
|
a(c.target.value);
|
|
3498
|
-
},
|
|
3499
|
-
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: [
|
|
3500
3517
|
l && /* @__PURE__ */ e(ge, { className: "text-xs text-muted-foreground", children: l }),
|
|
3501
3518
|
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
3502
|
-
|
|
3519
|
+
d ? /* @__PURE__ */ e(
|
|
3503
3520
|
"span",
|
|
3504
3521
|
{
|
|
3505
3522
|
className: "pointer-events-none absolute left-2.5 top-1/2 size-3 -translate-y-1/2 rounded-full",
|
|
3506
|
-
style: { backgroundColor:
|
|
3523
|
+
style: { backgroundColor: d.color }
|
|
3507
3524
|
}
|
|
3508
|
-
) : /* @__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" }),
|
|
3509
3526
|
/* @__PURE__ */ r(
|
|
3510
3527
|
be,
|
|
3511
3528
|
{
|
|
@@ -3521,7 +3538,7 @@ function Fr({
|
|
|
3521
3538
|
] })
|
|
3522
3539
|
] });
|
|
3523
3540
|
}
|
|
3524
|
-
function
|
|
3541
|
+
function tr({ className: t }) {
|
|
3525
3542
|
return /* @__PURE__ */ r(
|
|
3526
3543
|
"svg",
|
|
3527
3544
|
{
|
|
@@ -3544,7 +3561,7 @@ function rr({ className: t }) {
|
|
|
3544
3561
|
}
|
|
3545
3562
|
);
|
|
3546
3563
|
}
|
|
3547
|
-
function
|
|
3564
|
+
function Fr({
|
|
3548
3565
|
users: t,
|
|
3549
3566
|
value: n,
|
|
3550
3567
|
onChange: a,
|
|
@@ -3552,13 +3569,13 @@ function Or({
|
|
|
3552
3569
|
className: s,
|
|
3553
3570
|
label: l
|
|
3554
3571
|
}) {
|
|
3555
|
-
const p = (
|
|
3556
|
-
a(
|
|
3572
|
+
const p = (d) => {
|
|
3573
|
+
a(d.target.value);
|
|
3557
3574
|
};
|
|
3558
|
-
return /* @__PURE__ */ r("div", { className:
|
|
3575
|
+
return /* @__PURE__ */ r("div", { className: g("flex flex-col gap-1", s), children: [
|
|
3559
3576
|
l && /* @__PURE__ */ e(ge, { className: "text-xs text-muted-foreground", children: l }),
|
|
3560
3577
|
/* @__PURE__ */ r("div", { className: "relative", children: [
|
|
3561
|
-
/* @__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" }),
|
|
3562
3579
|
/* @__PURE__ */ r(
|
|
3563
3580
|
be,
|
|
3564
3581
|
{
|
|
@@ -3567,14 +3584,14 @@ function Or({
|
|
|
3567
3584
|
className: "h-9 w-full min-w-[120px] pl-8 pr-8 text-sm",
|
|
3568
3585
|
children: [
|
|
3569
3586
|
/* @__PURE__ */ e("option", { value: "all", children: o }),
|
|
3570
|
-
t.map((
|
|
3587
|
+
t.map((d) => /* @__PURE__ */ e("option", { value: d.id, children: d.name }, d.id))
|
|
3571
3588
|
]
|
|
3572
3589
|
}
|
|
3573
3590
|
)
|
|
3574
3591
|
] })
|
|
3575
3592
|
] });
|
|
3576
3593
|
}
|
|
3577
|
-
function
|
|
3594
|
+
function nr({ className: t }) {
|
|
3578
3595
|
return /* @__PURE__ */ r(
|
|
3579
3596
|
"svg",
|
|
3580
3597
|
{
|
|
@@ -3601,7 +3618,7 @@ function or({ className: t }) {
|
|
|
3601
3618
|
}
|
|
3602
3619
|
);
|
|
3603
3620
|
}
|
|
3604
|
-
function
|
|
3621
|
+
function rr({ className: t }) {
|
|
3605
3622
|
return /* @__PURE__ */ r(
|
|
3606
3623
|
"svg",
|
|
3607
3624
|
{
|
|
@@ -3624,7 +3641,7 @@ function ar({ className: t }) {
|
|
|
3624
3641
|
}
|
|
3625
3642
|
);
|
|
3626
3643
|
}
|
|
3627
|
-
function
|
|
3644
|
+
function or({ className: t }) {
|
|
3628
3645
|
return /* @__PURE__ */ e(
|
|
3629
3646
|
"svg",
|
|
3630
3647
|
{
|
|
@@ -3640,7 +3657,7 @@ function sr({ className: t }) {
|
|
|
3640
3657
|
}
|
|
3641
3658
|
);
|
|
3642
3659
|
}
|
|
3643
|
-
function
|
|
3660
|
+
function ar({ className: t }) {
|
|
3644
3661
|
return /* @__PURE__ */ r(
|
|
3645
3662
|
"svg",
|
|
3646
3663
|
{
|
|
@@ -3660,25 +3677,25 @@ function ir({ className: t }) {
|
|
|
3660
3677
|
}
|
|
3661
3678
|
);
|
|
3662
3679
|
}
|
|
3663
|
-
function
|
|
3680
|
+
function sr(t) {
|
|
3664
3681
|
const n = t.getFullYear(), a = String(t.getMonth() + 1).padStart(2, "0"), o = String(t.getDate()).padStart(2, "0");
|
|
3665
3682
|
return `${n}-${a}-${o}`;
|
|
3666
3683
|
}
|
|
3667
|
-
function
|
|
3684
|
+
function st(t) {
|
|
3668
3685
|
const n = t.getHours(), a = t.getMinutes(), o = n >= 12 ? "PM" : "AM", s = n % 12 || 12, l = String(a).padStart(2, "0");
|
|
3669
3686
|
return `${s}:${l} ${o}`;
|
|
3670
3687
|
}
|
|
3671
|
-
function
|
|
3672
|
-
const n =
|
|
3688
|
+
function ir(t) {
|
|
3689
|
+
const n = st(t.startDate), a = st(t.endDate);
|
|
3673
3690
|
return `${n} - ${a}`;
|
|
3674
3691
|
}
|
|
3675
|
-
function
|
|
3676
|
-
const n =
|
|
3692
|
+
function lr(t) {
|
|
3693
|
+
const n = ft(/* @__PURE__ */ new Date(), 1);
|
|
3677
3694
|
return t.getFullYear() === n.getFullYear() && t.getMonth() === n.getMonth() && t.getDate() === n.getDate();
|
|
3678
3695
|
}
|
|
3679
|
-
function
|
|
3696
|
+
function cr(t) {
|
|
3680
3697
|
if (ue(t)) return "Today";
|
|
3681
|
-
if (
|
|
3698
|
+
if (lr(t)) return "Tomorrow";
|
|
3682
3699
|
const n = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], a = [
|
|
3683
3700
|
"Jan",
|
|
3684
3701
|
"Feb",
|
|
@@ -3695,15 +3712,15 @@ function ur(t) {
|
|
|
3695
3712
|
], o = n[t.getDay()], s = a[t.getMonth()], l = t.getDate();
|
|
3696
3713
|
return `${o}, ${s} ${l}`;
|
|
3697
3714
|
}
|
|
3698
|
-
function
|
|
3715
|
+
function dr(t, n) {
|
|
3699
3716
|
const a = /* @__PURE__ */ new Map();
|
|
3700
3717
|
for (const o of t) {
|
|
3701
|
-
const s =
|
|
3718
|
+
const s = sr(o.startDate), l = a.get(s) ?? [];
|
|
3702
3719
|
l.push(o), a.set(s, l);
|
|
3703
3720
|
}
|
|
3704
3721
|
return Array.from(a.entries()).map(([o, s]) => {
|
|
3705
3722
|
const l = [...s].sort(
|
|
3706
|
-
(
|
|
3723
|
+
(d, c) => d.startDate.getTime() - c.startDate.getTime()
|
|
3707
3724
|
), p = n > 0 ? l.slice(0, n) : l;
|
|
3708
3725
|
return {
|
|
3709
3726
|
date: new Date(o),
|
|
@@ -3713,20 +3730,20 @@ function hr(t, n) {
|
|
|
3713
3730
|
};
|
|
3714
3731
|
}).sort((o, s) => o.date.getTime() - s.date.getTime());
|
|
3715
3732
|
}
|
|
3716
|
-
function
|
|
3717
|
-
const n =
|
|
3733
|
+
function ur(t) {
|
|
3734
|
+
const n = Ie(/* @__PURE__ */ new Date()), a = mt(/* @__PURE__ */ new Date());
|
|
3718
3735
|
return t.filter((o) => o.startDate >= n && o.startDate <= a).length;
|
|
3719
3736
|
}
|
|
3720
|
-
function
|
|
3721
|
-
return /* @__PURE__ */ e("div", { className:
|
|
3737
|
+
function Ue({ className: t }) {
|
|
3738
|
+
return /* @__PURE__ */ e("div", { className: g("animate-pulse rounded-md bg-muted", t) });
|
|
3722
3739
|
}
|
|
3723
|
-
function
|
|
3740
|
+
function hr({ event: t, onClick: n }) {
|
|
3724
3741
|
return /* @__PURE__ */ r(
|
|
3725
3742
|
"button",
|
|
3726
3743
|
{
|
|
3727
3744
|
type: "button",
|
|
3728
3745
|
onClick: () => n?.(t),
|
|
3729
|
-
className:
|
|
3746
|
+
className: g(
|
|
3730
3747
|
"w-full text-left rounded-lg transition-colors",
|
|
3731
3748
|
"hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
3732
3749
|
"flex items-start gap-3 p-2"
|
|
@@ -3741,27 +3758,27 @@ function fr({ event: t, onClick: n }) {
|
|
|
3741
3758
|
),
|
|
3742
3759
|
/* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
|
|
3743
3760
|
/* @__PURE__ */ e("p", { className: "text-sm font-medium truncate", children: t.title }),
|
|
3744
|
-
/* @__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) })
|
|
3745
3762
|
] }),
|
|
3746
|
-
n && /* @__PURE__ */ e(
|
|
3763
|
+
n && /* @__PURE__ */ e(or, { className: "shrink-0 size-4 text-muted-foreground/50 mt-1" })
|
|
3747
3764
|
]
|
|
3748
3765
|
}
|
|
3749
3766
|
);
|
|
3750
3767
|
}
|
|
3751
|
-
function
|
|
3768
|
+
function mr({ group: t, onEventClick: n }) {
|
|
3752
3769
|
return /* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
3753
3770
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between px-2 py-1.5", children: [
|
|
3754
|
-
/* @__PURE__ */ e("h3", { className:
|
|
3771
|
+
/* @__PURE__ */ e("h3", { className: g("text-xs font-semibold", ue(t.date) && "text-primary"), children: cr(t.date) }),
|
|
3755
3772
|
t.hasMore && /* @__PURE__ */ r("span", { className: "text-[10px] text-muted-foreground", children: [
|
|
3756
3773
|
"+",
|
|
3757
3774
|
t.events.length,
|
|
3758
3775
|
" more"
|
|
3759
3776
|
] })
|
|
3760
3777
|
] }),
|
|
3761
|
-
/* @__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)) })
|
|
3762
3779
|
] });
|
|
3763
3780
|
}
|
|
3764
|
-
function
|
|
3781
|
+
function Or({
|
|
3765
3782
|
events: t,
|
|
3766
3783
|
isLoading: n = !1,
|
|
3767
3784
|
className: a,
|
|
@@ -3770,29 +3787,29 @@ function Br({
|
|
|
3770
3787
|
onEventClick: l,
|
|
3771
3788
|
onNavigateToAgenda: p
|
|
3772
3789
|
}) {
|
|
3773
|
-
const [
|
|
3774
|
-
const S =
|
|
3775
|
-
return t.filter((
|
|
3776
|
-
}, [t, o]),
|
|
3777
|
-
() =>
|
|
3778
|
-
[
|
|
3779
|
-
), 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) => {
|
|
3780
3797
|
c(!1), l?.(S);
|
|
3781
|
-
},
|
|
3798
|
+
}, I = () => {
|
|
3782
3799
|
c(!1), p?.();
|
|
3783
3800
|
};
|
|
3784
|
-
return /* @__PURE__ */ r(
|
|
3801
|
+
return /* @__PURE__ */ r(dt, { open: d, onOpenChange: c, children: [
|
|
3785
3802
|
/* @__PURE__ */ r(
|
|
3786
|
-
|
|
3803
|
+
ut,
|
|
3787
3804
|
{
|
|
3788
|
-
className:
|
|
3805
|
+
className: g(
|
|
3789
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",
|
|
3790
3807
|
a
|
|
3791
3808
|
),
|
|
3792
3809
|
children: [
|
|
3793
|
-
/* @__PURE__ */ e(
|
|
3810
|
+
/* @__PURE__ */ e(nr, { className: "h-4 w-4" }),
|
|
3794
3811
|
b > 0 && /* @__PURE__ */ e(
|
|
3795
|
-
|
|
3812
|
+
Tt,
|
|
3796
3813
|
{
|
|
3797
3814
|
variant: "destructive",
|
|
3798
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",
|
|
@@ -3802,7 +3819,7 @@ function Br({
|
|
|
3802
3819
|
]
|
|
3803
3820
|
}
|
|
3804
3821
|
),
|
|
3805
|
-
/* @__PURE__ */ r(
|
|
3822
|
+
/* @__PURE__ */ r(ht, { className: "w-80 rounded-xl p-0", align: "end", side: "bottom", sideOffset: 8, children: [
|
|
3806
3823
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between border-b p-4", children: [
|
|
3807
3824
|
/* @__PURE__ */ r("div", { children: [
|
|
3808
3825
|
/* @__PURE__ */ e("h3", { className: "text-sm font-semibold", children: "Upcoming" }),
|
|
@@ -3812,31 +3829,31 @@ function Br({
|
|
|
3812
3829
|
"button",
|
|
3813
3830
|
{
|
|
3814
3831
|
type: "button",
|
|
3815
|
-
onClick:
|
|
3832
|
+
onClick: I,
|
|
3816
3833
|
className: "text-xs text-primary hover:underline flex items-center gap-1",
|
|
3817
3834
|
children: [
|
|
3818
3835
|
"View all",
|
|
3819
|
-
/* @__PURE__ */ e(
|
|
3836
|
+
/* @__PURE__ */ e(ar, { className: "size-3" })
|
|
3820
3837
|
]
|
|
3821
3838
|
}
|
|
3822
3839
|
)
|
|
3823
3840
|
] }),
|
|
3824
|
-
/* @__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,
|
|
3825
|
-
/* @__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" }),
|
|
3826
3843
|
/* @__PURE__ */ r("div", { className: "flex-1 space-y-2", children: [
|
|
3827
|
-
/* @__PURE__ */ e(
|
|
3828
|
-
/* @__PURE__ */ e(
|
|
3844
|
+
/* @__PURE__ */ e(Ue, { className: "h-4 w-full" }),
|
|
3845
|
+
/* @__PURE__ */ e(Ue, { className: "h-3 w-3/4" })
|
|
3829
3846
|
] })
|
|
3830
|
-
] },
|
|
3831
|
-
/* @__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" }),
|
|
3832
3849
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No upcoming events" }),
|
|
3833
3850
|
/* @__PURE__ */ r("p", { className: "text-xs text-muted-foreground/70", children: [
|
|
3834
3851
|
"Your schedule is clear for the next ",
|
|
3835
3852
|
o,
|
|
3836
3853
|
" days"
|
|
3837
3854
|
] })
|
|
3838
|
-
] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children:
|
|
3839
|
-
|
|
3855
|
+
] }) : /* @__PURE__ */ e("div", { className: "space-y-3 divide-y", children: L.map((S) => /* @__PURE__ */ e(
|
|
3856
|
+
mr,
|
|
3840
3857
|
{
|
|
3841
3858
|
group: S,
|
|
3842
3859
|
onEventClick: w
|
|
@@ -3846,7 +3863,7 @@ function Br({
|
|
|
3846
3863
|
] })
|
|
3847
3864
|
] });
|
|
3848
3865
|
}
|
|
3849
|
-
function
|
|
3866
|
+
function fr({ className: t }) {
|
|
3850
3867
|
return /* @__PURE__ */ r(
|
|
3851
3868
|
"svg",
|
|
3852
3869
|
{
|
|
@@ -3871,7 +3888,7 @@ function pr({ className: t }) {
|
|
|
3871
3888
|
}
|
|
3872
3889
|
);
|
|
3873
3890
|
}
|
|
3874
|
-
function
|
|
3891
|
+
function pt({ className: t }) {
|
|
3875
3892
|
return /* @__PURE__ */ e(
|
|
3876
3893
|
"svg",
|
|
3877
3894
|
{
|
|
@@ -3889,37 +3906,37 @@ function xt({ className: t }) {
|
|
|
3889
3906
|
}
|
|
3890
3907
|
);
|
|
3891
3908
|
}
|
|
3892
|
-
function
|
|
3909
|
+
function gr(t) {
|
|
3893
3910
|
const n = /* @__PURE__ */ new Date();
|
|
3894
3911
|
return n.setDate(n.getDate() + 1), t.getFullYear() === n.getFullYear() && t.getMonth() === n.getMonth() && t.getDate() === n.getDate();
|
|
3895
3912
|
}
|
|
3896
|
-
function
|
|
3913
|
+
function it(t) {
|
|
3897
3914
|
const n = t.getHours(), a = t.getMinutes(), o = n >= 12 ? "PM" : "AM";
|
|
3898
3915
|
return `${n % 12 || 12}:${a.toString().padStart(2, "0")} ${o}`;
|
|
3899
3916
|
}
|
|
3900
|
-
function
|
|
3917
|
+
function pr(t) {
|
|
3901
3918
|
return new Intl.DateTimeFormat("en-US", {
|
|
3902
3919
|
weekday: "long",
|
|
3903
3920
|
month: "short",
|
|
3904
3921
|
day: "numeric"
|
|
3905
3922
|
}).format(t);
|
|
3906
3923
|
}
|
|
3907
|
-
function
|
|
3908
|
-
const n =
|
|
3924
|
+
function xr(t) {
|
|
3925
|
+
const n = it(t.startDate), a = it(t.endDate);
|
|
3909
3926
|
return `${n} - ${a}`;
|
|
3910
3927
|
}
|
|
3911
|
-
function
|
|
3912
|
-
return ue(t) ? "Today" :
|
|
3928
|
+
function vr(t) {
|
|
3929
|
+
return ue(t) ? "Today" : gr(t) ? "Tomorrow" : pr(t);
|
|
3913
3930
|
}
|
|
3914
|
-
function
|
|
3931
|
+
function wr(t, n) {
|
|
3915
3932
|
const a = /* @__PURE__ */ new Map();
|
|
3916
3933
|
for (const o of t) {
|
|
3917
|
-
const s =
|
|
3934
|
+
const s = Ft(o.startDate), l = a.get(s) ?? [];
|
|
3918
3935
|
l.push(o), a.set(s, l);
|
|
3919
3936
|
}
|
|
3920
3937
|
return Array.from(a.entries()).map(([o, s]) => {
|
|
3921
3938
|
const l = [...s].sort(
|
|
3922
|
-
(
|
|
3939
|
+
(d, c) => d.startDate.getTime() - c.startDate.getTime()
|
|
3923
3940
|
), p = n > 0 ? l.slice(0, n) : l;
|
|
3924
3941
|
return {
|
|
3925
3942
|
date: new Date(o),
|
|
@@ -3929,13 +3946,13 @@ function yr(t, n) {
|
|
|
3929
3946
|
};
|
|
3930
3947
|
}).sort((o, s) => o.date.getTime() - s.date.getTime());
|
|
3931
3948
|
}
|
|
3932
|
-
function
|
|
3949
|
+
function br({ event: t, onClick: n, compact: a }) {
|
|
3933
3950
|
return /* @__PURE__ */ r(
|
|
3934
3951
|
"button",
|
|
3935
3952
|
{
|
|
3936
3953
|
type: "button",
|
|
3937
3954
|
onClick: () => n?.(t),
|
|
3938
|
-
className:
|
|
3955
|
+
className: g(
|
|
3939
3956
|
"w-full text-left rounded-lg transition-colors",
|
|
3940
3957
|
"hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
3941
3958
|
"flex items-start gap-3",
|
|
@@ -3945,41 +3962,41 @@ function kr({ event: t, onClick: n, compact: a }) {
|
|
|
3945
3962
|
/* @__PURE__ */ e(
|
|
3946
3963
|
"div",
|
|
3947
3964
|
{
|
|
3948
|
-
className:
|
|
3965
|
+
className: g("shrink-0 rounded-full mt-1", a ? "size-2" : "size-2.5"),
|
|
3949
3966
|
style: { backgroundColor: t.color ?? "#3b82f6" }
|
|
3950
3967
|
}
|
|
3951
3968
|
),
|
|
3952
3969
|
/* @__PURE__ */ r("div", { className: "min-w-0 flex-1", children: [
|
|
3953
|
-
/* @__PURE__ */ e("p", { className:
|
|
3954
|
-
/* @__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) })
|
|
3955
3972
|
] }),
|
|
3956
3973
|
n && /* @__PURE__ */ e(
|
|
3957
|
-
|
|
3974
|
+
pt,
|
|
3958
3975
|
{
|
|
3959
|
-
className:
|
|
3976
|
+
className: g("shrink-0 text-muted-foreground/50", a ? "size-3" : "size-4")
|
|
3960
3977
|
}
|
|
3961
3978
|
)
|
|
3962
3979
|
]
|
|
3963
3980
|
}
|
|
3964
3981
|
);
|
|
3965
3982
|
}
|
|
3966
|
-
function
|
|
3983
|
+
function yr({
|
|
3967
3984
|
group: t,
|
|
3968
3985
|
onEventClick: n,
|
|
3969
3986
|
onViewMore: a,
|
|
3970
3987
|
compact: o
|
|
3971
3988
|
}) {
|
|
3972
3989
|
return /* @__PURE__ */ r("div", { className: "space-y-1", children: [
|
|
3973
|
-
/* @__PURE__ */ r("div", { className:
|
|
3990
|
+
/* @__PURE__ */ r("div", { className: g("flex items-center justify-between px-2", o ? "py-1" : "py-1.5"), children: [
|
|
3974
3991
|
/* @__PURE__ */ e(
|
|
3975
3992
|
"h3",
|
|
3976
3993
|
{
|
|
3977
|
-
className:
|
|
3994
|
+
className: g(
|
|
3978
3995
|
"font-semibold",
|
|
3979
3996
|
o ? "text-xs" : "text-sm",
|
|
3980
3997
|
ue(t.date) && "text-primary"
|
|
3981
3998
|
),
|
|
3982
|
-
children:
|
|
3999
|
+
children: vr(t.date)
|
|
3983
4000
|
}
|
|
3984
4001
|
),
|
|
3985
4002
|
t.hasMore && a && /* @__PURE__ */ e(
|
|
@@ -3987,15 +4004,15 @@ function Nr({
|
|
|
3987
4004
|
{
|
|
3988
4005
|
type: "button",
|
|
3989
4006
|
onClick: () => a(t.date),
|
|
3990
|
-
className:
|
|
4007
|
+
className: g("text-primary hover:underline", o ? "text-[10px]" : "text-xs"),
|
|
3991
4008
|
children: "+more"
|
|
3992
4009
|
}
|
|
3993
4010
|
)
|
|
3994
4011
|
] }),
|
|
3995
|
-
/* @__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)) })
|
|
3996
4013
|
] });
|
|
3997
4014
|
}
|
|
3998
|
-
function
|
|
4015
|
+
function $r({
|
|
3999
4016
|
events: t,
|
|
4000
4017
|
daysAhead: n = 7,
|
|
4001
4018
|
maxEventsPerDay: a = 3,
|
|
@@ -4003,65 +4020,65 @@ function Rr({
|
|
|
4003
4020
|
onViewAll: s,
|
|
4004
4021
|
className: l,
|
|
4005
4022
|
emptyState: p,
|
|
4006
|
-
title:
|
|
4023
|
+
title: d = "Upcoming",
|
|
4007
4024
|
showHeader: c = !0,
|
|
4008
|
-
compact:
|
|
4025
|
+
compact: x = !1
|
|
4009
4026
|
}) {
|
|
4010
|
-
const
|
|
4011
|
-
const
|
|
4012
|
-
return
|
|
4013
|
-
}, [
|
|
4014
|
-
() =>
|
|
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),
|
|
4015
4032
|
[S, a]
|
|
4016
|
-
),
|
|
4017
|
-
return
|
|
4033
|
+
), _ = S.length;
|
|
4034
|
+
return H.length === 0 ? /* @__PURE__ */ r("div", { className: g("rounded-lg border bg-card", l), children: [
|
|
4018
4035
|
c && /* @__PURE__ */ e(
|
|
4019
4036
|
"div",
|
|
4020
4037
|
{
|
|
4021
|
-
className:
|
|
4038
|
+
className: g(
|
|
4022
4039
|
"border-b px-4 flex items-center justify-between",
|
|
4023
|
-
|
|
4040
|
+
x ? "py-2" : "py-3"
|
|
4024
4041
|
),
|
|
4025
|
-
children: /* @__PURE__ */ e("h2", { className:
|
|
4042
|
+
children: /* @__PURE__ */ e("h2", { className: g("font-semibold", x ? "text-sm" : "text-base"), children: d })
|
|
4026
4043
|
}
|
|
4027
4044
|
),
|
|
4028
4045
|
/* @__PURE__ */ e(
|
|
4029
4046
|
"div",
|
|
4030
4047
|
{
|
|
4031
|
-
className:
|
|
4048
|
+
className: g(
|
|
4032
4049
|
"flex flex-col items-center justify-center text-center",
|
|
4033
|
-
|
|
4050
|
+
x ? "py-6 px-4" : "py-10 px-6"
|
|
4034
4051
|
),
|
|
4035
4052
|
children: p ?? /* @__PURE__ */ r(ke, { children: [
|
|
4036
4053
|
/* @__PURE__ */ e(
|
|
4037
|
-
|
|
4054
|
+
fr,
|
|
4038
4055
|
{
|
|
4039
|
-
className:
|
|
4056
|
+
className: g("text-muted-foreground/50 mb-2", x ? "size-8" : "size-10")
|
|
4040
4057
|
}
|
|
4041
4058
|
),
|
|
4042
|
-
/* @__PURE__ */ e("p", { className:
|
|
4059
|
+
/* @__PURE__ */ e("p", { className: g("text-muted-foreground", x ? "text-xs" : "text-sm"), children: "No upcoming events" })
|
|
4043
4060
|
] })
|
|
4044
4061
|
}
|
|
4045
4062
|
)
|
|
4046
|
-
] }) : /* @__PURE__ */ r("div", { className:
|
|
4063
|
+
] }) : /* @__PURE__ */ r("div", { className: g("rounded-lg border bg-card overflow-hidden", l), children: [
|
|
4047
4064
|
c && /* @__PURE__ */ r(
|
|
4048
4065
|
"div",
|
|
4049
4066
|
{
|
|
4050
|
-
className:
|
|
4067
|
+
className: g(
|
|
4051
4068
|
"border-b px-4 flex items-center justify-between",
|
|
4052
|
-
|
|
4069
|
+
x ? "py-2" : "py-3"
|
|
4053
4070
|
),
|
|
4054
4071
|
children: [
|
|
4055
4072
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
4056
|
-
/* @__PURE__ */ e("h2", { className:
|
|
4073
|
+
/* @__PURE__ */ e("h2", { className: g("font-semibold", x ? "text-sm" : "text-base"), children: d }),
|
|
4057
4074
|
/* @__PURE__ */ e(
|
|
4058
4075
|
"span",
|
|
4059
4076
|
{
|
|
4060
|
-
className:
|
|
4077
|
+
className: g(
|
|
4061
4078
|
"text-muted-foreground bg-muted rounded-full px-2",
|
|
4062
|
-
|
|
4079
|
+
x ? "text-[10px] py-0" : "text-xs py-0.5"
|
|
4063
4080
|
),
|
|
4064
|
-
children:
|
|
4081
|
+
children: _
|
|
4065
4082
|
}
|
|
4066
4083
|
)
|
|
4067
4084
|
] }),
|
|
@@ -4070,13 +4087,13 @@ function Rr({
|
|
|
4070
4087
|
{
|
|
4071
4088
|
type: "button",
|
|
4072
4089
|
onClick: () => s(),
|
|
4073
|
-
className:
|
|
4090
|
+
className: g(
|
|
4074
4091
|
"text-primary hover:underline flex items-center gap-0.5",
|
|
4075
|
-
|
|
4092
|
+
x ? "text-xs" : "text-sm"
|
|
4076
4093
|
),
|
|
4077
4094
|
children: [
|
|
4078
4095
|
"View all",
|
|
4079
|
-
/* @__PURE__ */ e(
|
|
4096
|
+
/* @__PURE__ */ e(pt, { className: "size-3" })
|
|
4080
4097
|
]
|
|
4081
4098
|
}
|
|
4082
4099
|
)
|
|
@@ -4086,39 +4103,39 @@ function Rr({
|
|
|
4086
4103
|
/* @__PURE__ */ e(
|
|
4087
4104
|
"div",
|
|
4088
4105
|
{
|
|
4089
|
-
className:
|
|
4106
|
+
className: g(
|
|
4090
4107
|
"divide-y overflow-auto",
|
|
4091
|
-
|
|
4108
|
+
x ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
|
|
4092
4109
|
),
|
|
4093
|
-
children:
|
|
4094
|
-
|
|
4110
|
+
children: H.map((B) => /* @__PURE__ */ e(
|
|
4111
|
+
yr,
|
|
4095
4112
|
{
|
|
4096
|
-
group:
|
|
4113
|
+
group: B,
|
|
4097
4114
|
onEventClick: o,
|
|
4098
|
-
onViewMore: s ? (
|
|
4099
|
-
compact:
|
|
4115
|
+
onViewMore: s ? (z) => s(z) : void 0,
|
|
4116
|
+
compact: x
|
|
4100
4117
|
},
|
|
4101
|
-
|
|
4118
|
+
B.dateKey
|
|
4102
4119
|
))
|
|
4103
4120
|
}
|
|
4104
4121
|
)
|
|
4105
4122
|
] });
|
|
4106
4123
|
}
|
|
4107
4124
|
export {
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
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
|
|
4123
4140
|
};
|
|
4124
|
-
//# sourceMappingURL=agenda-widget-
|
|
4141
|
+
//# sourceMappingURL=agenda-widget-B0t3TCcV.js.map
|