@innosolutions/inno-calendar 1.0.47 → 1.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{agenda-widget-BREvI5ia.cjs → agenda-widget-D_DbVHjB.cjs} +2 -2
- package/dist/{agenda-widget-BREvI5ia.cjs.map → agenda-widget-D_DbVHjB.cjs.map} +1 -1
- package/dist/{agenda-widget-BiuoHkpP.js → agenda-widget-DzXBzBfm.js} +2 -2
- package/dist/{agenda-widget-BiuoHkpP.js.map → agenda-widget-DzXBzBfm.js.map} +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/presets/index.cjs +1 -1
- package/dist/presets/index.mjs +1 -1
- package/dist/{tailwind-calendar-QMXCp1an.cjs → tailwind-calendar-4FkVdxbr.cjs} +2 -2
- package/dist/{tailwind-calendar-QMXCp1an.cjs.map → tailwind-calendar-4FkVdxbr.cjs.map} +1 -1
- package/dist/{tailwind-calendar-7wDEMPEi.js → tailwind-calendar-Ba5BO9tj.js} +2 -2
- package/dist/{tailwind-calendar-7wDEMPEi.js.map → tailwind-calendar-Ba5BO9tj.js.map} +1 -1
- package/dist/{week-view-DWLMtGVt.cjs → week-view-7r6Vhahg.cjs} +3 -3
- package/dist/week-view-7r6Vhahg.cjs.map +1 -0
- package/dist/{week-view-C4YFlrPS.js → week-view-CVbu7Qh2.js} +138 -138
- package/dist/week-view-CVbu7Qh2.js.map +1 -0
- package/package.json +1 -1
- package/dist/week-view-C4YFlrPS.js.map +0 -1
- package/dist/week-view-DWLMtGVt.cjs.map +0 -1
|
@@ -138,7 +138,7 @@ function Se({
|
|
|
138
138
|
enablePageTransition: m = !1,
|
|
139
139
|
pageTransitionDuration: g = 400
|
|
140
140
|
}) {
|
|
141
|
-
const u = de(t.color), [b, N] = J(!1), [_, M] = J(!1), [L, O] = J(!1), [
|
|
141
|
+
const u = de(t.color), [b, N] = J(!1), [_, M] = J(!1), [L, O] = J(!1), [z, E] = J(null), S = te(null), I = Re(), $ = t.endDate < it(/* @__PURE__ */ new Date()), B = t.isCanceled ?? !1, q = w && I && !B && !$, D = t.data, h = D?.meetingTookPlace ?? t.meetingTookPlace ?? !1, A = B ? /* @__PURE__ */ e(Nt, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : h ? /* @__PURE__ */ e(vt, { className: d("h-3 w-3", u.text) }) : null, R = t.scheduleTypeName || D?.scheduleTypeName || D?.typeName, P = D?.productName, k = D?.nrParticipant, c = D?.siteName, p = D?.siteCity, C = [c, p].filter(Boolean).join(", "), H = W(() => {
|
|
142
142
|
if (!_) {
|
|
143
143
|
if (l && a) {
|
|
144
144
|
a(t);
|
|
@@ -146,12 +146,12 @@ function Se({
|
|
|
146
146
|
}
|
|
147
147
|
if (m && S.current) {
|
|
148
148
|
const U = S.current.getBoundingClientRect();
|
|
149
|
-
|
|
149
|
+
E(U), O(!0);
|
|
150
150
|
} else l || N(!0);
|
|
151
151
|
}
|
|
152
152
|
}, [_, l, a, t, m]);
|
|
153
153
|
W(() => {
|
|
154
|
-
O(!1),
|
|
154
|
+
O(!1), E(null), l || N(!0);
|
|
155
155
|
}, [l]);
|
|
156
156
|
const T = W(() => {
|
|
157
157
|
N(!1);
|
|
@@ -211,7 +211,7 @@ function Se({
|
|
|
211
211
|
q ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
|
|
212
212
|
_ && "opacity-50",
|
|
213
213
|
// Cancelled events get gray background with strikethrough
|
|
214
|
-
|
|
214
|
+
B ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through" : [
|
|
215
215
|
o === "colored" && [u.bg, u.text],
|
|
216
216
|
o === "mixed" && [u.bg, u.text],
|
|
217
217
|
o === "dot" && "bg-muted/50"
|
|
@@ -220,7 +220,7 @@ function Se({
|
|
|
220
220
|
),
|
|
221
221
|
style: v,
|
|
222
222
|
children: [
|
|
223
|
-
["dot", "mixed"].includes(o) &&
|
|
223
|
+
["dot", "mixed"].includes(o) && !B && /* @__PURE__ */ e(
|
|
224
224
|
"svg",
|
|
225
225
|
{
|
|
226
226
|
width: "8",
|
|
@@ -260,7 +260,7 @@ function Se({
|
|
|
260
260
|
}
|
|
261
261
|
)
|
|
262
262
|
] }) }),
|
|
263
|
-
/* @__PURE__ */ e("div", { className: "flex gap-0.5", children:
|
|
263
|
+
/* @__PURE__ */ e("div", { className: "flex gap-0.5", children: A })
|
|
264
264
|
]
|
|
265
265
|
}
|
|
266
266
|
);
|
|
@@ -285,7 +285,7 @@ function Se({
|
|
|
285
285
|
"shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
|
|
286
286
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
287
287
|
// Cancelled events get gray background with strikethrough
|
|
288
|
-
|
|
288
|
+
B ? "bg-zinc-100 dark:bg-zinc-800 border-l-zinc-400 dark:border-l-zinc-600 text-zinc-500 dark:text-zinc-400 line-through" : [
|
|
289
289
|
o === "colored" && [
|
|
290
290
|
u.bg,
|
|
291
291
|
u.accentBorder,
|
|
@@ -304,7 +304,7 @@ function Se({
|
|
|
304
304
|
children: [
|
|
305
305
|
/* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-1", children: [
|
|
306
306
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
307
|
-
["dot", "mixed"].includes(o) &&
|
|
307
|
+
["dot", "mixed"].includes(o) && !B && /* @__PURE__ */ e(
|
|
308
308
|
"svg",
|
|
309
309
|
{
|
|
310
310
|
width: "8",
|
|
@@ -321,8 +321,8 @@ function Se({
|
|
|
321
321
|
{
|
|
322
322
|
className: d(
|
|
323
323
|
"text-sm font-medium truncate",
|
|
324
|
-
|
|
325
|
-
|
|
324
|
+
!B && o !== "dot" && u.text,
|
|
325
|
+
B && "line-through"
|
|
326
326
|
),
|
|
327
327
|
children: [
|
|
328
328
|
t.title,
|
|
@@ -335,10 +335,10 @@ function Se({
|
|
|
335
335
|
}
|
|
336
336
|
)
|
|
337
337
|
] }),
|
|
338
|
-
|
|
338
|
+
A
|
|
339
339
|
] }),
|
|
340
340
|
P && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: P }),
|
|
341
|
-
k != null && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
341
|
+
k != null && k > 0 && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
342
342
|
/* @__PURE__ */ e(Ee, { className: "h-3 w-3 shrink-0" }),
|
|
343
343
|
/* @__PURE__ */ r("span", { children: [
|
|
344
344
|
k,
|
|
@@ -520,7 +520,7 @@ function lt({
|
|
|
520
520
|
renderPopover: x,
|
|
521
521
|
enableDrag: v = !0
|
|
522
522
|
}) {
|
|
523
|
-
const l = de(t.color), [y, w] = J(!1), [m, g] = J(!1), u = Re(), b = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), N = b / 60 * o - 8, _ = t.endDate < it(/* @__PURE__ */ new Date()), M = t.isCanceled ?? !1, L = v && u && !M && !_, O = b < 35,
|
|
523
|
+
const l = de(t.color), [y, w] = J(!1), [m, g] = J(!1), u = Re(), b = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), N = b / 60 * o - 8, _ = t.endDate < it(/* @__PURE__ */ new Date()), M = t.isCanceled ?? !1, L = v && u && !M && !_, O = b < 35, z = b > 25, E = b >= 45, S = t.data, I = t.scheduleTypeName || S?.scheduleTypeName || S?.typeName, $ = S?.productName, B = S?.nrParticipant, q = S?.siteName, D = S?.siteCity, h = [q, D].filter(Boolean).join(", "), A = a === "dot", R = W(() => {
|
|
524
524
|
m || (s && i ? i(t) : s || w(!0));
|
|
525
525
|
}, [m, s, i, t]), P = W(() => {
|
|
526
526
|
w(!1);
|
|
@@ -563,13 +563,13 @@ function lt({
|
|
|
563
563
|
// Cancelled events get gray background with strikethrough
|
|
564
564
|
M ? "bg-zinc-100 dark:bg-zinc-800 border-l-zinc-400 dark:border-l-zinc-600 text-zinc-500 dark:text-zinc-400 line-through" : [
|
|
565
565
|
// Colored/mixed variants
|
|
566
|
-
!
|
|
566
|
+
!A && [
|
|
567
567
|
l.bg,
|
|
568
568
|
l.accentBorder,
|
|
569
569
|
l.text
|
|
570
570
|
],
|
|
571
571
|
// Dot variant - neutral background
|
|
572
|
-
|
|
572
|
+
A && "bg-neutral-50 dark:bg-neutral-900 border-l-neutral-400 dark:border-l-neutral-600"
|
|
573
573
|
],
|
|
574
574
|
// Short events center content
|
|
575
575
|
O && "py-0 justify-center",
|
|
@@ -595,7 +595,7 @@ function lt({
|
|
|
595
595
|
{
|
|
596
596
|
className: d(
|
|
597
597
|
"font-semibold truncate leading-tight",
|
|
598
|
-
!M &&
|
|
598
|
+
!M && A && "text-foreground"
|
|
599
599
|
),
|
|
600
600
|
children: [
|
|
601
601
|
t.title,
|
|
@@ -608,39 +608,39 @@ function lt({
|
|
|
608
608
|
}
|
|
609
609
|
) })
|
|
610
610
|
] }),
|
|
611
|
-
|
|
611
|
+
E && $ && /* @__PURE__ */ e(
|
|
612
612
|
"p",
|
|
613
613
|
{
|
|
614
614
|
className: d(
|
|
615
615
|
"text-[11px] truncate leading-tight",
|
|
616
|
-
|
|
616
|
+
A ? "text-muted-foreground" : "opacity-80"
|
|
617
617
|
),
|
|
618
|
-
children:
|
|
618
|
+
children: $
|
|
619
619
|
}
|
|
620
620
|
),
|
|
621
|
-
|
|
621
|
+
B != null && B > 0 && /* @__PURE__ */ r(
|
|
622
622
|
"div",
|
|
623
623
|
{
|
|
624
624
|
className: d(
|
|
625
625
|
"flex items-center gap-1 text-[11px] leading-tight",
|
|
626
|
-
|
|
626
|
+
A ? "text-muted-foreground" : "opacity-80"
|
|
627
627
|
),
|
|
628
628
|
children: [
|
|
629
629
|
/* @__PURE__ */ e(Ee, { className: "h-3 w-3 shrink-0" }),
|
|
630
630
|
/* @__PURE__ */ r("span", { children: [
|
|
631
|
-
|
|
631
|
+
B,
|
|
632
632
|
" participant",
|
|
633
|
-
|
|
633
|
+
B !== 1 ? "s" : ""
|
|
634
634
|
] })
|
|
635
635
|
]
|
|
636
636
|
}
|
|
637
637
|
),
|
|
638
|
-
|
|
638
|
+
z && /* @__PURE__ */ r(
|
|
639
639
|
"div",
|
|
640
640
|
{
|
|
641
641
|
className: d(
|
|
642
642
|
"flex items-center gap-1 text-[11px] tabular-nums leading-tight",
|
|
643
|
-
|
|
643
|
+
A ? "text-muted-foreground" : "opacity-90"
|
|
644
644
|
),
|
|
645
645
|
children: [
|
|
646
646
|
/* @__PURE__ */ e(je, { className: "h-3 w-3 shrink-0" }),
|
|
@@ -648,12 +648,12 @@ function lt({
|
|
|
648
648
|
]
|
|
649
649
|
}
|
|
650
650
|
),
|
|
651
|
-
|
|
651
|
+
E && h && /* @__PURE__ */ r(
|
|
652
652
|
"div",
|
|
653
653
|
{
|
|
654
654
|
className: d(
|
|
655
655
|
"flex items-center gap-1 text-[11px] truncate leading-tight",
|
|
656
|
-
|
|
656
|
+
A ? "text-muted-foreground" : "opacity-80"
|
|
657
657
|
),
|
|
658
658
|
children: [
|
|
659
659
|
/* @__PURE__ */ e(st, { className: "h-3 w-3 shrink-0" }),
|
|
@@ -672,11 +672,11 @@ function lt({
|
|
|
672
672
|
I
|
|
673
673
|
] })
|
|
674
674
|
] }),
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
675
|
+
$ && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: $ }),
|
|
676
|
+
B != null && /* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: [
|
|
677
|
+
B,
|
|
678
678
|
" participant",
|
|
679
|
-
|
|
679
|
+
B !== 1 ? "s" : ""
|
|
680
680
|
] }),
|
|
681
681
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) }),
|
|
682
682
|
h && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: h })
|
|
@@ -1443,15 +1443,15 @@ function Cn({
|
|
|
1443
1443
|
[M]
|
|
1444
1444
|
), O = () => {
|
|
1445
1445
|
a?.(), s?.("today");
|
|
1446
|
-
},
|
|
1446
|
+
}, z = () => {
|
|
1447
1447
|
i?.(), s?.("prev");
|
|
1448
|
-
},
|
|
1448
|
+
}, E = () => {
|
|
1449
1449
|
f?.(), s?.("next");
|
|
1450
1450
|
}, S = ["day", "week", "month", "year", "agenda"].includes(
|
|
1451
1451
|
n
|
|
1452
|
-
), I = n.startsWith("timeline-") || n.startsWith("resource-"),
|
|
1452
|
+
), I = n.startsWith("timeline-") || n.startsWith("resource-"), $ = tn.filter(
|
|
1453
1453
|
(h) => l.includes(h.value)
|
|
1454
|
-
),
|
|
1454
|
+
), B = S ? $.find((h) => h.value === n) : null, q = [...Ze, ...nn], D = I ? q.find((h) => h.value === n) : null;
|
|
1455
1455
|
return /* @__PURE__ */ r("div", { className: d("flex flex-col w-full gap-3 mb-2", N), children: [
|
|
1456
1456
|
/* @__PURE__ */ r("div", { className: "flex lg:flex-row flex-col w-full justify-between gap-3", children: [
|
|
1457
1457
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
|
|
@@ -1463,8 +1463,8 @@ function Cn({
|
|
|
1463
1463
|
date: t,
|
|
1464
1464
|
view: n,
|
|
1465
1465
|
events: o,
|
|
1466
|
-
onNavigatePrev:
|
|
1467
|
-
onNavigateNext:
|
|
1466
|
+
onNavigatePrev: z,
|
|
1467
|
+
onNavigateNext: E,
|
|
1468
1468
|
weekStartsOn: _
|
|
1469
1469
|
}
|
|
1470
1470
|
)
|
|
@@ -1480,7 +1480,7 @@ function Cn({
|
|
|
1480
1480
|
)
|
|
1481
1481
|
] }),
|
|
1482
1482
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none", children: [
|
|
1483
|
-
x &&
|
|
1483
|
+
x && $.length > 0 && /* @__PURE__ */ r(Ke, { children: [
|
|
1484
1484
|
/* @__PURE__ */ r(
|
|
1485
1485
|
Xe,
|
|
1486
1486
|
{
|
|
@@ -1491,13 +1491,13 @@ function Cn({
|
|
|
1491
1491
|
),
|
|
1492
1492
|
children: [
|
|
1493
1493
|
/* @__PURE__ */ e(Xt, { className: "size-4" }),
|
|
1494
|
-
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children:
|
|
1494
|
+
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: B?.label ?? L.calendarView }),
|
|
1495
1495
|
/* @__PURE__ */ e(Ye, { className: "size-3 opacity-60" })
|
|
1496
1496
|
]
|
|
1497
1497
|
}
|
|
1498
1498
|
),
|
|
1499
|
-
/* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children:
|
|
1500
|
-
const
|
|
1499
|
+
/* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: $.map((h) => {
|
|
1500
|
+
const A = h.icon;
|
|
1501
1501
|
return /* @__PURE__ */ r(
|
|
1502
1502
|
Be,
|
|
1503
1503
|
{
|
|
@@ -1507,7 +1507,7 @@ function Cn({
|
|
|
1507
1507
|
n === h.value && "bg-accent"
|
|
1508
1508
|
),
|
|
1509
1509
|
children: [
|
|
1510
|
-
/* @__PURE__ */ e(
|
|
1510
|
+
/* @__PURE__ */ e(A, { className: "size-4" }),
|
|
1511
1511
|
/* @__PURE__ */ e("span", { children: h.label })
|
|
1512
1512
|
]
|
|
1513
1513
|
},
|
|
@@ -1532,7 +1532,7 @@ function Cn({
|
|
|
1532
1532
|
}
|
|
1533
1533
|
),
|
|
1534
1534
|
/* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: Ze.map((h) => {
|
|
1535
|
-
const
|
|
1535
|
+
const A = h.icon;
|
|
1536
1536
|
return /* @__PURE__ */ r(
|
|
1537
1537
|
Be,
|
|
1538
1538
|
{
|
|
@@ -1542,7 +1542,7 @@ function Cn({
|
|
|
1542
1542
|
n === h.value && "bg-accent"
|
|
1543
1543
|
),
|
|
1544
1544
|
children: [
|
|
1545
|
-
/* @__PURE__ */ e(
|
|
1545
|
+
/* @__PURE__ */ e(A, { className: "size-4" }),
|
|
1546
1546
|
/* @__PURE__ */ e("span", { children: h.label })
|
|
1547
1547
|
]
|
|
1548
1548
|
},
|
|
@@ -1704,16 +1704,16 @@ function rn({
|
|
|
1704
1704
|
className: l
|
|
1705
1705
|
}) {
|
|
1706
1706
|
const y = te(null), w = te(null), [m, g] = J("closed"), u = F(
|
|
1707
|
-
() => [...a].sort((
|
|
1707
|
+
() => [...a].sort((z, E) => z.startDate.getTime() - E.startDate.getTime()),
|
|
1708
1708
|
[a]
|
|
1709
1709
|
), b = F(() => {
|
|
1710
1710
|
if (!i) return { top: 0, left: 0, width: we, maxHeight: ve };
|
|
1711
|
-
const
|
|
1711
|
+
const z = typeof window < "u" ? window.innerWidth : 1200, E = typeof window < "u" ? window.innerHeight : 800;
|
|
1712
1712
|
let S = i.left + i.width / 2 - we / 2;
|
|
1713
|
-
S = Math.max(16, Math.min(S,
|
|
1713
|
+
S = Math.max(16, Math.min(S, z - we - 16));
|
|
1714
1714
|
const I = Math.min(a.length * 68 + 80, ve);
|
|
1715
|
-
let
|
|
1716
|
-
return
|
|
1715
|
+
let $ = i.top + i.height / 2 - I / 2;
|
|
1716
|
+
return $ = Math.max(16, Math.min($, E - I - 16)), { top: $, left: S, width: we, maxHeight: ve };
|
|
1717
1717
|
}, [i, a.length]);
|
|
1718
1718
|
Ie(() => {
|
|
1719
1719
|
if (t && i)
|
|
@@ -1724,23 +1724,23 @@ function rn({
|
|
|
1724
1724
|
});
|
|
1725
1725
|
else if (!t && m === "open") {
|
|
1726
1726
|
g("exiting");
|
|
1727
|
-
const
|
|
1727
|
+
const z = setTimeout(() => {
|
|
1728
1728
|
g("closed");
|
|
1729
1729
|
}, Te);
|
|
1730
|
-
return () => clearTimeout(
|
|
1730
|
+
return () => clearTimeout(z);
|
|
1731
1731
|
}
|
|
1732
1732
|
}, [t, i]), ze(() => {
|
|
1733
1733
|
if (m === "closed") return;
|
|
1734
|
-
const
|
|
1735
|
-
|
|
1734
|
+
const z = (E) => {
|
|
1735
|
+
E.key === "Escape" && (E.stopPropagation(), n());
|
|
1736
1736
|
};
|
|
1737
|
-
return document.addEventListener("keydown",
|
|
1737
|
+
return document.addEventListener("keydown", z), () => document.removeEventListener("keydown", z);
|
|
1738
1738
|
}, [m, n]), ze(() => {
|
|
1739
1739
|
m === "open" && w.current && w.current.focus();
|
|
1740
1740
|
}, [m]);
|
|
1741
1741
|
const N = W(
|
|
1742
|
-
(
|
|
1743
|
-
|
|
1742
|
+
(z) => {
|
|
1743
|
+
z.target === y.current && n();
|
|
1744
1744
|
},
|
|
1745
1745
|
[n]
|
|
1746
1746
|
);
|
|
@@ -1852,18 +1852,18 @@ function rn({
|
|
|
1852
1852
|
className: "overflow-y-auto px-3 py-2 space-y-1.5",
|
|
1853
1853
|
style: { maxHeight: `${ve - 64}px` },
|
|
1854
1854
|
children: [
|
|
1855
|
-
u.map((
|
|
1855
|
+
u.map((z) => /* @__PURE__ */ e(
|
|
1856
1856
|
"div",
|
|
1857
1857
|
{
|
|
1858
|
-
onPointerDown: (
|
|
1859
|
-
children: x ? x({ event:
|
|
1858
|
+
onPointerDown: (E) => E.stopPropagation(),
|
|
1859
|
+
children: x ? x({ event: z, variant: "compact" }) : /* @__PURE__ */ e(
|
|
1860
1860
|
Se,
|
|
1861
1861
|
{
|
|
1862
|
-
event:
|
|
1862
|
+
event: z,
|
|
1863
1863
|
variant: "compact",
|
|
1864
1864
|
badgeVariant: f,
|
|
1865
|
-
onClick: (
|
|
1866
|
-
n(), s?.(
|
|
1865
|
+
onClick: (E) => {
|
|
1866
|
+
n(), s?.(E);
|
|
1867
1867
|
},
|
|
1868
1868
|
disablePopover: !!s && !v,
|
|
1869
1869
|
renderPopover: v,
|
|
@@ -1871,7 +1871,7 @@ function rn({
|
|
|
1871
1871
|
}
|
|
1872
1872
|
)
|
|
1873
1873
|
},
|
|
1874
|
-
|
|
1874
|
+
z.id
|
|
1875
1875
|
)),
|
|
1876
1876
|
a.length === 0 && /* @__PURE__ */ e("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No events" })
|
|
1877
1877
|
]
|
|
@@ -2003,14 +2003,14 @@ function ut({
|
|
|
2003
2003
|
s || D.button !== 0 && D.pointerType === "mouse" || (D.preventDefault(), g.current = { x: D.clientX, y: D.clientY }, u.current = !1, b.current = !0, n?.(t));
|
|
2004
2004
|
},
|
|
2005
2005
|
[s, t, n]
|
|
2006
|
-
),
|
|
2006
|
+
), z = W(
|
|
2007
2007
|
(D) => {
|
|
2008
2008
|
if (!(g.current && b.current && !s)) return;
|
|
2009
|
-
const h = D.clientX - g.current.x,
|
|
2010
|
-
Math.sqrt(h * h +
|
|
2009
|
+
const h = D.clientX - g.current.x, A = D.clientY - g.current.y;
|
|
2010
|
+
Math.sqrt(h * h + A * A) >= ln && (u.current = !0);
|
|
2011
2011
|
},
|
|
2012
2012
|
[s]
|
|
2013
|
-
),
|
|
2013
|
+
), E = W(
|
|
2014
2014
|
(D) => {
|
|
2015
2015
|
s || (D.buttons > 0 || f) && o?.(t);
|
|
2016
2016
|
},
|
|
@@ -2021,13 +2021,13 @@ function ut({
|
|
|
2021
2021
|
(D) => {
|
|
2022
2022
|
if (!L?.isDragging || s) return;
|
|
2023
2023
|
D.preventDefault(), D.dataTransfer.dropEffect = "move", M(!0);
|
|
2024
|
-
const h = /* @__PURE__ */ new Date(),
|
|
2025
|
-
L.updateDragPreview?.(t.date,
|
|
2024
|
+
const h = /* @__PURE__ */ new Date(), A = t.hour ?? h.getHours(), R = t.minute ?? (h.getMinutes() >= 30 ? 30 : 0);
|
|
2025
|
+
L.updateDragPreview?.(t.date, A, R);
|
|
2026
2026
|
},
|
|
2027
2027
|
[L, s, t]
|
|
2028
|
-
),
|
|
2028
|
+
), $ = W(() => {
|
|
2029
2029
|
M(!1);
|
|
2030
|
-
}, []),
|
|
2030
|
+
}, []), B = W(
|
|
2031
2031
|
(D) => {
|
|
2032
2032
|
D.preventDefault(), M(!1), !(!L?.isDragging || s) && L.endDrag?.();
|
|
2033
2033
|
},
|
|
@@ -2057,13 +2057,13 @@ function ut({
|
|
|
2057
2057
|
"aria-pressed": i,
|
|
2058
2058
|
disabled: s,
|
|
2059
2059
|
onPointerDown: O,
|
|
2060
|
-
onPointerMove:
|
|
2060
|
+
onPointerMove: z,
|
|
2061
2061
|
onPointerUp: S,
|
|
2062
|
-
onPointerEnter:
|
|
2062
|
+
onPointerEnter: E,
|
|
2063
2063
|
onKeyDown: q,
|
|
2064
2064
|
onDragOver: I,
|
|
2065
|
-
onDragLeave:
|
|
2066
|
-
onDrop:
|
|
2065
|
+
onDragLeave: $,
|
|
2066
|
+
onDrop: B,
|
|
2067
2067
|
className: d(
|
|
2068
2068
|
"select-none touch-none cursor-pointer transition-colors",
|
|
2069
2069
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
@@ -2124,17 +2124,17 @@ function Mn({
|
|
|
2124
2124
|
for (const p of k)
|
|
2125
2125
|
c.set(p.event.id, p.position);
|
|
2126
2126
|
return c;
|
|
2127
|
-
}, [_, n, o]), O = F(() => ot(o), [o]),
|
|
2128
|
-
if (!
|
|
2129
|
-
const k =
|
|
2127
|
+
}, [_, n, o]), O = F(() => ot(o), [o]), z = /* @__PURE__ */ new Date(), E = ce(n), S = F(() => {
|
|
2128
|
+
if (!E) return 0;
|
|
2129
|
+
const k = z.getHours() + z.getMinutes() / 60;
|
|
2130
2130
|
return k < o.startHour || k > o.endHour ? -1 : (k - o.startHour) * fe;
|
|
2131
|
-
}, [
|
|
2131
|
+
}, [E, o, z]), I = te(null);
|
|
2132
2132
|
Ie(() => {
|
|
2133
2133
|
const k = I.current;
|
|
2134
2134
|
if (!k) return;
|
|
2135
2135
|
const c = () => {
|
|
2136
2136
|
let p;
|
|
2137
|
-
if (
|
|
2137
|
+
if (E) {
|
|
2138
2138
|
const H = (/* @__PURE__ */ new Date()).getHours();
|
|
2139
2139
|
p = Math.max(H - 1, o.startHour);
|
|
2140
2140
|
} else {
|
|
@@ -2150,25 +2150,25 @@ function Mn({
|
|
|
2150
2150
|
requestAnimationFrame(() => {
|
|
2151
2151
|
requestAnimationFrame(c);
|
|
2152
2152
|
});
|
|
2153
|
-
}, [n, a, o,
|
|
2154
|
-
const
|
|
2153
|
+
}, [n, a, o, E]);
|
|
2154
|
+
const $ = Oe(), B = W(
|
|
2155
2155
|
(k) => {
|
|
2156
|
-
|
|
2156
|
+
$?.startSelection(k);
|
|
2157
2157
|
},
|
|
2158
|
-
[
|
|
2158
|
+
[$]
|
|
2159
2159
|
), q = W(
|
|
2160
2160
|
(k) => {
|
|
2161
|
-
|
|
2161
|
+
$?.updateSelection(k);
|
|
2162
2162
|
},
|
|
2163
|
-
[
|
|
2163
|
+
[$]
|
|
2164
2164
|
), D = W(() => {
|
|
2165
|
-
|
|
2166
|
-
}, [
|
|
2165
|
+
$?.endSelection();
|
|
2166
|
+
}, [$]), h = W(
|
|
2167
2167
|
(k) => {
|
|
2168
2168
|
s?.(k);
|
|
2169
2169
|
},
|
|
2170
2170
|
[s]
|
|
2171
|
-
),
|
|
2171
|
+
), A = n.toLocaleDateString([], { weekday: "short" }), R = n.getDate(), P = ce(n);
|
|
2172
2172
|
return /* @__PURE__ */ r("div", { className: d("flex flex-col h-full", v), children: [
|
|
2173
2173
|
/* @__PURE__ */ e(
|
|
2174
2174
|
"div",
|
|
@@ -2186,7 +2186,7 @@ function Mn({
|
|
|
2186
2186
|
"text-[11px] font-medium uppercase tracking-wide",
|
|
2187
2187
|
P ? "text-primary" : "text-muted-foreground"
|
|
2188
2188
|
),
|
|
2189
|
-
children:
|
|
2189
|
+
children: A
|
|
2190
2190
|
}
|
|
2191
2191
|
),
|
|
2192
2192
|
/* @__PURE__ */ e(
|
|
@@ -2254,7 +2254,7 @@ function Mn({
|
|
|
2254
2254
|
}
|
|
2255
2255
|
),
|
|
2256
2256
|
/* @__PURE__ */ r("div", { className: "relative flex-1", children: [
|
|
2257
|
-
|
|
2257
|
+
E && !C && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
|
|
2258
2258
|
c !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
|
|
2259
2259
|
b.slice(1).map((H) => /* @__PURE__ */ e(
|
|
2260
2260
|
"div",
|
|
@@ -2270,11 +2270,11 @@ function Mn({
|
|
|
2270
2270
|
mt,
|
|
2271
2271
|
{
|
|
2272
2272
|
slot: Y,
|
|
2273
|
-
onSelectionStart:
|
|
2273
|
+
onSelectionStart: B,
|
|
2274
2274
|
onSelectionMove: q,
|
|
2275
2275
|
onSelectionEnd: D,
|
|
2276
|
-
isSelected:
|
|
2277
|
-
isSelecting:
|
|
2276
|
+
isSelected: $?.isSlotSelected(Y) ?? !1,
|
|
2277
|
+
isSelecting: $?.isSelecting ?? !1,
|
|
2278
2278
|
disabled: C,
|
|
2279
2279
|
className: "absolute inset-x-0",
|
|
2280
2280
|
style: {
|
|
@@ -2336,7 +2336,7 @@ function Mn({
|
|
|
2336
2336
|
})
|
|
2337
2337
|
}
|
|
2338
2338
|
),
|
|
2339
|
-
|
|
2339
|
+
E && S >= 0 && /* @__PURE__ */ r(
|
|
2340
2340
|
"div",
|
|
2341
2341
|
{
|
|
2342
2342
|
className: d(
|
|
@@ -2391,24 +2391,24 @@ function Tn({
|
|
|
2391
2391
|
slots: m,
|
|
2392
2392
|
classNames: g
|
|
2393
2393
|
}) {
|
|
2394
|
-
const u = y ?? (w ? "popover" : "expand"), b = m?.dayCellHeader, N = m?.dayCellFooter, [_, M] = J(null), [L, O] = J(null),
|
|
2394
|
+
const u = y ?? (w ? "popover" : "expand"), b = m?.dayCellHeader, N = m?.dayCellFooter, [_, M] = J(null), [L, O] = J(null), z = F(() => bt(n, o), [n, o]), E = F(() => {
|
|
2395
2395
|
const h = /* @__PURE__ */ new Map();
|
|
2396
|
-
for (const
|
|
2397
|
-
const R =
|
|
2396
|
+
for (const A of z) {
|
|
2397
|
+
const R = A.date.toDateString(), P = He(t, A.date);
|
|
2398
2398
|
P.sort((k, c) => k.startDate.getTime() - c.startDate.getTime()), h.set(R, P);
|
|
2399
2399
|
}
|
|
2400
2400
|
return h;
|
|
2401
|
-
}, [
|
|
2401
|
+
}, [z, t]), S = Oe(), I = W(
|
|
2402
2402
|
(h) => {
|
|
2403
2403
|
S?.startSelection(h);
|
|
2404
2404
|
},
|
|
2405
2405
|
[S]
|
|
2406
|
-
),
|
|
2406
|
+
), $ = W(
|
|
2407
2407
|
(h) => {
|
|
2408
2408
|
S?.updateSelection(h);
|
|
2409
2409
|
},
|
|
2410
2410
|
[S]
|
|
2411
|
-
),
|
|
2411
|
+
), B = W(() => {
|
|
2412
2412
|
S?.endSelection();
|
|
2413
2413
|
}, [S]), q = W(
|
|
2414
2414
|
(h) => {
|
|
@@ -2425,12 +2425,12 @@ function Tn({
|
|
|
2425
2425
|
"grid grid-cols-7 border-b !sticky !top-0 bg-background z-10",
|
|
2426
2426
|
g?.weekdayHeader
|
|
2427
2427
|
),
|
|
2428
|
-
children: D.map((h,
|
|
2428
|
+
children: D.map((h, A) => /* @__PURE__ */ r(
|
|
2429
2429
|
"div",
|
|
2430
2430
|
{
|
|
2431
2431
|
className: d(
|
|
2432
2432
|
"py-2 sm:py-2.5 text-center text-[11px] uppercase font-medium tracking-wide text-muted-foreground",
|
|
2433
|
-
|
|
2433
|
+
A >= 5 && "text-muted-foreground/70",
|
|
2434
2434
|
// Weekend
|
|
2435
2435
|
g?.weekdayLabel
|
|
2436
2436
|
),
|
|
@@ -2443,16 +2443,16 @@ function Tn({
|
|
|
2443
2443
|
))
|
|
2444
2444
|
}
|
|
2445
2445
|
),
|
|
2446
|
-
/* @__PURE__ */ e("div", { className: d("grid grid-cols-7 auto-rows-min", g?.monthGrid), children:
|
|
2447
|
-
const
|
|
2446
|
+
/* @__PURE__ */ e("div", { className: d("grid grid-cols-7 auto-rows-min", g?.monthGrid), children: z.map((h) => {
|
|
2447
|
+
const A = h.date.toDateString(), R = E.get(A) || [], P = ce(h.date), k = h.date.getDay() === 0 || h.date.getDay() === 6, c = R.length > ge;
|
|
2448
2448
|
return /* @__PURE__ */ r(
|
|
2449
2449
|
dn,
|
|
2450
2450
|
{
|
|
2451
2451
|
date: h.date,
|
|
2452
|
-
dataAttributes: { "data-day-key":
|
|
2452
|
+
dataAttributes: { "data-day-key": A },
|
|
2453
2453
|
onSelectionStart: I,
|
|
2454
|
-
onSelectionMove:
|
|
2455
|
-
onSelectionEnd:
|
|
2454
|
+
onSelectionMove: $,
|
|
2455
|
+
onSelectionEnd: B,
|
|
2456
2456
|
isSelected: S?.isSlotSelected({ date: h.date }) ?? !1,
|
|
2457
2457
|
isSelecting: S?.isSelecting ?? !1,
|
|
2458
2458
|
className: d(
|
|
@@ -2543,7 +2543,7 @@ function Tn({
|
|
|
2543
2543
|
onPointerDown: (p) => p.stopPropagation(),
|
|
2544
2544
|
onClick: (p) => {
|
|
2545
2545
|
p.stopPropagation();
|
|
2546
|
-
const C = document.querySelector(`[data-day-key="${
|
|
2546
|
+
const C = document.querySelector(`[data-day-key="${A}"]`);
|
|
2547
2547
|
O({
|
|
2548
2548
|
date: h.date,
|
|
2549
2549
|
events: R,
|
|
@@ -2564,8 +2564,8 @@ function Tn({
|
|
|
2564
2564
|
c && u === "popover" && /* @__PURE__ */ r(
|
|
2565
2565
|
re,
|
|
2566
2566
|
{
|
|
2567
|
-
open: _ ===
|
|
2568
|
-
onOpenChange: (p) => M(p ?
|
|
2567
|
+
open: _ === A,
|
|
2568
|
+
onOpenChange: (p) => M(p ? A : null),
|
|
2569
2569
|
children: [
|
|
2570
2570
|
/* @__PURE__ */ e(oe, { asChild: !0, children: /* @__PURE__ */ r(
|
|
2571
2571
|
"button",
|
|
@@ -2573,7 +2573,7 @@ function Tn({
|
|
|
2573
2573
|
type: "button",
|
|
2574
2574
|
onPointerDown: (p) => p.stopPropagation(),
|
|
2575
2575
|
onClick: (p) => {
|
|
2576
|
-
p.stopPropagation(), M(
|
|
2576
|
+
p.stopPropagation(), M(A);
|
|
2577
2577
|
},
|
|
2578
2578
|
className: d(
|
|
2579
2579
|
"w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
|
|
@@ -2659,7 +2659,7 @@ function Tn({
|
|
|
2659
2659
|
)
|
|
2660
2660
|
]
|
|
2661
2661
|
},
|
|
2662
|
-
|
|
2662
|
+
A
|
|
2663
2663
|
);
|
|
2664
2664
|
}) })
|
|
2665
2665
|
] }) }),
|
|
@@ -2822,16 +2822,16 @@ function fn({
|
|
|
2822
2822
|
const l = F(() => {
|
|
2823
2823
|
if (t.length === 0) return [];
|
|
2824
2824
|
const N = t.map((_) => {
|
|
2825
|
-
const M = et(_.startDate, n), L = et(_.endDate, n), O = Math.max(0, M),
|
|
2826
|
-
if (O > 6 ||
|
|
2827
|
-
const
|
|
2825
|
+
const M = et(_.startDate, n), L = et(_.endDate, n), O = Math.max(0, M), z = Math.min(6, L);
|
|
2826
|
+
if (O > 6 || z < 0) return null;
|
|
2827
|
+
const E = M < 0, S = L > 6, $ = De(_) && le(_.startDate, _.endDate);
|
|
2828
2828
|
return {
|
|
2829
2829
|
event: _,
|
|
2830
2830
|
startCol: O,
|
|
2831
|
-
endCol:
|
|
2832
|
-
continuesBefore:
|
|
2831
|
+
endCol: z,
|
|
2832
|
+
continuesBefore: E,
|
|
2833
2833
|
continuesAfter: S,
|
|
2834
|
-
isSingleDayAllDay:
|
|
2834
|
+
isSingleDayAllDay: $
|
|
2835
2835
|
};
|
|
2836
2836
|
}).filter(Boolean);
|
|
2837
2837
|
return mn(N);
|
|
@@ -2961,19 +2961,19 @@ function Wn({
|
|
|
2961
2961
|
});
|
|
2962
2962
|
}
|
|
2963
2963
|
return c;
|
|
2964
|
-
}, [M, t, a]),
|
|
2964
|
+
}, [M, t, a]), z = F(() => {
|
|
2965
2965
|
const c = /* @__PURE__ */ new Map();
|
|
2966
2966
|
for (const { multiDay: p } of O.values())
|
|
2967
2967
|
for (const C of p)
|
|
2968
2968
|
c.set(C.id, C);
|
|
2969
2969
|
return Array.from(c.values());
|
|
2970
|
-
}, [O]),
|
|
2970
|
+
}, [O]), E = /* @__PURE__ */ new Date(), S = M.findIndex((c) => ce(c)), I = F(() => {
|
|
2971
2971
|
if (S < 0) return -1;
|
|
2972
|
-
const c =
|
|
2972
|
+
const c = E.getHours() + E.getMinutes() / 60;
|
|
2973
2973
|
return c < a.startHour || c > a.endHour ? -1 : (c - a.startHour) * ue;
|
|
2974
|
-
}, [S, a,
|
|
2974
|
+
}, [S, a, E]), $ = te(null);
|
|
2975
2975
|
Ie(() => {
|
|
2976
|
-
const c =
|
|
2976
|
+
const c = $.current;
|
|
2977
2977
|
if (!c) return;
|
|
2978
2978
|
const p = () => {
|
|
2979
2979
|
let C;
|
|
@@ -3002,19 +3002,19 @@ function Wn({
|
|
|
3002
3002
|
requestAnimationFrame(p);
|
|
3003
3003
|
});
|
|
3004
3004
|
}, [n, i, a, S]);
|
|
3005
|
-
const
|
|
3005
|
+
const B = Oe(), q = W(
|
|
3006
3006
|
(c) => {
|
|
3007
|
-
|
|
3007
|
+
B?.startSelection(c);
|
|
3008
3008
|
},
|
|
3009
|
-
[
|
|
3009
|
+
[B]
|
|
3010
3010
|
), D = W(
|
|
3011
3011
|
(c) => {
|
|
3012
|
-
|
|
3012
|
+
B?.updateSelection(c);
|
|
3013
3013
|
},
|
|
3014
|
-
[
|
|
3014
|
+
[B]
|
|
3015
3015
|
), h = W(() => {
|
|
3016
|
-
|
|
3017
|
-
}, [
|
|
3016
|
+
B?.endSelection();
|
|
3017
|
+
}, [B]), A = W(
|
|
3018
3018
|
(c) => {
|
|
3019
3019
|
x?.(c);
|
|
3020
3020
|
},
|
|
@@ -3030,15 +3030,15 @@ function Wn({
|
|
|
3030
3030
|
return c;
|
|
3031
3031
|
}, [M, O]), k = xe + P.reduce((c, p) => c + p, 0);
|
|
3032
3032
|
return /* @__PURE__ */ r("div", { className: d("ic-week-view flex flex-col h-full", y), children: [
|
|
3033
|
-
|
|
3033
|
+
z.length > 0 && /* @__PURE__ */ e(
|
|
3034
3034
|
fn,
|
|
3035
3035
|
{
|
|
3036
|
-
events:
|
|
3036
|
+
events: z,
|
|
3037
3037
|
weekDays: M,
|
|
3038
3038
|
hourColumnWidth: xe,
|
|
3039
3039
|
minDayColumnWidth: Z,
|
|
3040
3040
|
dayColumnWidths: P,
|
|
3041
|
-
onEventClick:
|
|
3041
|
+
onEventClick: A,
|
|
3042
3042
|
disablePopover: !!x && !m,
|
|
3043
3043
|
renderPopover: m,
|
|
3044
3044
|
...u?.multiDayBanner && {
|
|
@@ -3049,7 +3049,7 @@ function Wn({
|
|
|
3049
3049
|
/* @__PURE__ */ e(
|
|
3050
3050
|
"div",
|
|
3051
3051
|
{
|
|
3052
|
-
ref:
|
|
3052
|
+
ref: $,
|
|
3053
3053
|
className: d(
|
|
3054
3054
|
"ic-week-scroll-container flex-1",
|
|
3055
3055
|
u?.scrollContainer
|
|
@@ -3193,8 +3193,8 @@ function Wn({
|
|
|
3193
3193
|
onSelectionStart: q,
|
|
3194
3194
|
onSelectionMove: D,
|
|
3195
3195
|
onSelectionEnd: h,
|
|
3196
|
-
isSelected:
|
|
3197
|
-
isSelecting:
|
|
3196
|
+
isSelected: B?.isSlotSelected(Fe) ?? !1,
|
|
3197
|
+
isSelecting: B?.isSelecting ?? !1,
|
|
3198
3198
|
disabled: K,
|
|
3199
3199
|
className: "absolute inset-x-0",
|
|
3200
3200
|
style: {
|
|
@@ -3308,4 +3308,4 @@ export {
|
|
|
3308
3308
|
Be as t,
|
|
3309
3309
|
Pt as u
|
|
3310
3310
|
};
|
|
3311
|
-
//# sourceMappingURL=week-view-
|
|
3311
|
+
//# sourceMappingURL=week-view-CVbu7Qh2.js.map
|