@innosolutions/inno-calendar 1.0.47 → 1.0.49
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-B-AVTnqM.cjs +2 -0
- package/dist/agenda-widget-B-AVTnqM.cjs.map +1 -0
- package/dist/{agenda-widget-BiuoHkpP.js → agenda-widget-DhCPt2vI.js} +941 -929
- package/dist/agenda-widget-DhCPt2vI.js.map +1 -0
- package/dist/components/event/event-card.d.ts.map +1 -1
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/components/inno-calendar.d.ts +11 -0
- package/dist/components/inno-calendar.d.ts.map +1 -1
- package/dist/core/context/inno-calendar-provider.d.ts +15 -1
- package/dist/core/context/inno-calendar-provider.d.ts.map +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.mjs +43 -43
- package/dist/core/types.d.ts +12 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +62 -62
- package/dist/presets/index.cjs +1 -1
- package/dist/presets/index.mjs +1 -1
- package/dist/slot-selection-context-BCsC7WT7.cjs +2 -0
- package/dist/slot-selection-context-BCsC7WT7.cjs.map +1 -0
- package/dist/slot-selection-context-D1495hEJ.js +595 -0
- package/dist/slot-selection-context-D1495hEJ.js.map +1 -0
- package/dist/{tailwind-calendar-7wDEMPEi.js → tailwind-calendar-BmJa4HhQ.js} +2 -2
- package/dist/{tailwind-calendar-7wDEMPEi.js.map → tailwind-calendar-BmJa4HhQ.js.map} +1 -1
- package/dist/{tailwind-calendar-QMXCp1an.cjs → tailwind-calendar-CJmOutn1.cjs} +2 -2
- package/dist/{tailwind-calendar-QMXCp1an.cjs.map → tailwind-calendar-CJmOutn1.cjs.map} +1 -1
- package/dist/use-calendar-BEuelmSu.cjs +2 -0
- package/dist/use-calendar-BEuelmSu.cjs.map +1 -0
- package/dist/use-calendar-Clo9DFK4.js +175 -0
- package/dist/use-calendar-Clo9DFK4.js.map +1 -0
- package/dist/{use-slot-selection-BJHlyfxL.js → use-slot-selection-BCZKnZSM.js} +2 -2
- package/dist/{use-slot-selection-BJHlyfxL.js.map → use-slot-selection-BCZKnZSM.js.map} +1 -1
- package/dist/{use-slot-selection-CTFC2-xS.cjs → use-slot-selection-Bwqwjiaq.cjs} +2 -2
- package/dist/{use-slot-selection-CTFC2-xS.cjs.map → use-slot-selection-Bwqwjiaq.cjs.map} +1 -1
- package/dist/week-view-D19YRBQC.cjs +11 -0
- package/dist/week-view-D19YRBQC.cjs.map +1 -0
- package/dist/{week-view-C4YFlrPS.js → week-view-aRPB2cjn.js} +922 -904
- package/dist/week-view-aRPB2cjn.js.map +1 -0
- package/package.json +1 -1
- package/dist/agenda-widget-BREvI5ia.cjs +0 -2
- package/dist/agenda-widget-BREvI5ia.cjs.map +0 -1
- package/dist/agenda-widget-BiuoHkpP.js.map +0 -1
- package/dist/slot-selection-context-Bx3FKJfR.cjs +0 -2
- package/dist/slot-selection-context-Bx3FKJfR.cjs.map +0 -1
- package/dist/slot-selection-context-D2eu2o-7.js +0 -203
- package/dist/slot-selection-context-D2eu2o-7.js.map +0 -1
- package/dist/use-calendar-DR2emWYC.js +0 -555
- package/dist/use-calendar-DR2emWYC.js.map +0 -1
- package/dist/use-calendar-DR89bZu5.cjs +0 -2
- package/dist/use-calendar-DR89bZu5.cjs.map +0 -1
- package/dist/week-view-C4YFlrPS.js.map +0 -1
- package/dist/week-view-DWLMtGVt.cjs +0 -11
- package/dist/week-view-DWLMtGVt.cjs.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsx as e, jsxs as r, Fragment as
|
|
1
|
+
import { jsx as e, jsxs as r, Fragment as ft } from "react/jsx-runtime";
|
|
2
2
|
import * as ee from "react";
|
|
3
|
-
import { useState as
|
|
4
|
-
import { c
|
|
5
|
-
import * as
|
|
6
|
-
import { formatEventTimeDisplay as X, getEventsCountInView as
|
|
7
|
-
import {
|
|
3
|
+
import { useState as Y, useEffect as be, useCallback as S, useRef as ne, forwardRef as Be, createElement as Ee, useMemo as q, useLayoutEffect as $e } from "react";
|
|
4
|
+
import { c, a as gt } from "./index-DtaLkIY8.js";
|
|
5
|
+
import * as K from "@radix-ui/react-dropdown-menu";
|
|
6
|
+
import { formatEventTimeDisplay as X, getEventsCountInView as xt, getRangeText as yt, groupEventsByDate as bt, isToday as ce, detectAllDayEvent as Ce, isSameDay as le, getEventsForDay as He, separateEventsByDuration as nt, calculateOverlappingPositions as rt, getVisibleHoursArray as ot, isWorkingHour as at, formatHourLabel as Se, generateMonthGrid as wt, startOfDay as Ve, getWeekDays as vt } from "./utils.mjs";
|
|
7
|
+
import { j as Re, k as it, l as Oe } from "./slot-selection-context-D1495hEJ.js";
|
|
8
8
|
import * as pe from "@radix-ui/react-popover";
|
|
9
|
-
import * as
|
|
10
|
-
const
|
|
9
|
+
import * as we from "@radix-ui/react-tooltip";
|
|
10
|
+
const oe = pe.Root, ae = pe.Trigger, kn = pe.Anchor, Q = ee.forwardRef(({ className: t, align: n = "center", sideOffset: o = 4, ...a }, i) => /* @__PURE__ */ e(pe.Portal, { children: /* @__PURE__ */ e(
|
|
11
11
|
pe.Content,
|
|
12
12
|
{
|
|
13
13
|
ref: i,
|
|
14
14
|
align: n,
|
|
15
15
|
sideOffset: o,
|
|
16
|
-
className:
|
|
16
|
+
className: c(
|
|
17
17
|
"z-50 w-72 rounded-xl border bg-white text-popover-foreground outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
18
18
|
t
|
|
19
19
|
),
|
|
@@ -21,19 +21,19 @@ const re = pe.Root, oe = pe.Trigger, Nn = pe.Anchor, Q = ee.forwardRef(({ classN
|
|
|
21
21
|
}
|
|
22
22
|
) }));
|
|
23
23
|
Q.displayName = pe.Content.displayName;
|
|
24
|
-
const
|
|
25
|
-
|
|
24
|
+
const Dn = we.Provider, ie = we.Root, se = we.Trigger, re = ee.forwardRef(({ className: t, sideOffset: n = 4, ...o }, a) => /* @__PURE__ */ e(
|
|
25
|
+
we.Content,
|
|
26
26
|
{
|
|
27
27
|
ref: a,
|
|
28
28
|
sideOffset: n,
|
|
29
|
-
className:
|
|
29
|
+
className: c(
|
|
30
30
|
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
31
31
|
t
|
|
32
32
|
),
|
|
33
33
|
...o
|
|
34
34
|
}
|
|
35
35
|
));
|
|
36
|
-
|
|
36
|
+
re.displayName = we.Content.displayName;
|
|
37
37
|
function de(t) {
|
|
38
38
|
return {
|
|
39
39
|
blue: {
|
|
@@ -118,11 +118,11 @@ function de(t) {
|
|
|
118
118
|
}
|
|
119
119
|
}[t ?? "blue"];
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function st(t) {
|
|
122
122
|
const n = new Date(t);
|
|
123
123
|
return n.setHours(0, 0, 0, 0), n;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Me({
|
|
126
126
|
event: t,
|
|
127
127
|
variant: n = "full",
|
|
128
128
|
badgeVariant: o = "colored",
|
|
@@ -131,96 +131,105 @@ function Se({
|
|
|
131
131
|
showTime: f = !0,
|
|
132
132
|
showDescription: s = !1,
|
|
133
133
|
showParticipants: x = !1,
|
|
134
|
-
style:
|
|
134
|
+
style: N,
|
|
135
135
|
disablePopover: l = !1,
|
|
136
136
|
renderPopover: y,
|
|
137
137
|
enableDrag: w = !1,
|
|
138
|
-
enablePageTransition:
|
|
138
|
+
enablePageTransition: h = !1,
|
|
139
139
|
pageTransitionDuration: g = 400
|
|
140
140
|
}) {
|
|
141
|
-
const u = de(t.color), [
|
|
142
|
-
|
|
141
|
+
const u = de(t.color), [v, b] = Y(!1), [z, L] = Y(!1), [M, $] = Y(!1), [T, A] = Y(null), E = ne(null), B = Re(), W = it();
|
|
142
|
+
be(() => {
|
|
143
|
+
if (!l && W?.focusEventId && W.focusEventId === t.id) {
|
|
144
|
+
const P = setTimeout(() => {
|
|
145
|
+
b(!0), W.clearFocusEventId();
|
|
146
|
+
}, 300);
|
|
147
|
+
return () => clearTimeout(P);
|
|
148
|
+
}
|
|
149
|
+
}, [W?.focusEventId, t.id, l]);
|
|
150
|
+
const V = t.endDate < st(/* @__PURE__ */ new Date()), R = t.isCanceled ?? !1, D = w && B && !R && !V, m = t.data, _ = m?.meetingTookPlace ?? t.meetingTookPlace ?? !1, I = R ? /* @__PURE__ */ e(kt, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : _ ? /* @__PURE__ */ e(Nt, { className: c("h-3 w-3", u.text) }) : null, G = t.scheduleTypeName || m?.scheduleTypeName || m?.typeName, k = m?.productName, d = m?.nrParticipant, p = m?.siteName, C = m?.siteCity, O = [p, C].filter(Boolean).join(", "), j = S(() => {
|
|
151
|
+
if (!z) {
|
|
143
152
|
if (l && a) {
|
|
144
153
|
a(t);
|
|
145
154
|
return;
|
|
146
155
|
}
|
|
147
|
-
if (
|
|
148
|
-
const
|
|
149
|
-
A(
|
|
150
|
-
} else l ||
|
|
156
|
+
if (h && E.current) {
|
|
157
|
+
const P = E.current.getBoundingClientRect();
|
|
158
|
+
A(P), $(!0);
|
|
159
|
+
} else l || b(!0);
|
|
151
160
|
}
|
|
152
|
-
}, [
|
|
153
|
-
|
|
154
|
-
|
|
161
|
+
}, [z, l, a, t, h]);
|
|
162
|
+
S(() => {
|
|
163
|
+
$(!1), A(null), l || b(!0);
|
|
155
164
|
}, [l]);
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
}, []),
|
|
159
|
-
(
|
|
160
|
-
|
|
165
|
+
const H = S(() => {
|
|
166
|
+
b(!1);
|
|
167
|
+
}, []), F = S(
|
|
168
|
+
(P) => {
|
|
169
|
+
D && (P.dataTransfer.effectAllowed = "move", P.dataTransfer.setData("text/plain", t.id), L(!0), B?.startDrag?.(t));
|
|
161
170
|
},
|
|
162
|
-
[
|
|
163
|
-
),
|
|
164
|
-
|
|
165
|
-
}, [
|
|
171
|
+
[D, t, B]
|
|
172
|
+
), U = S(() => {
|
|
173
|
+
L(!1), B?.isDragging && B.endDrag?.();
|
|
174
|
+
}, [B]);
|
|
166
175
|
if (n === "dot") {
|
|
167
|
-
const
|
|
176
|
+
const P = /* @__PURE__ */ e(
|
|
168
177
|
"button",
|
|
169
178
|
{
|
|
170
179
|
type: "button",
|
|
171
|
-
onClick:
|
|
172
|
-
className:
|
|
180
|
+
onClick: j,
|
|
181
|
+
className: c(
|
|
173
182
|
"size-2 rounded-full cursor-pointer transition-opacity",
|
|
174
183
|
u.dot,
|
|
175
184
|
t.isCanceled && "opacity-50",
|
|
176
185
|
i
|
|
177
186
|
),
|
|
178
|
-
style:
|
|
187
|
+
style: N,
|
|
179
188
|
"aria-label": t.title
|
|
180
189
|
}
|
|
181
190
|
);
|
|
182
191
|
return l ? /* @__PURE__ */ r(ie, { children: [
|
|
183
|
-
/* @__PURE__ */ e(se, { asChild: !0, children:
|
|
184
|
-
/* @__PURE__ */ e(
|
|
192
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: P }),
|
|
193
|
+
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
185
194
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
186
195
|
/* @__PURE__ */ e("div", { className: "text-xs opacity-80", children: X(t) })
|
|
187
196
|
] }) })
|
|
188
|
-
] }) : /* @__PURE__ */ r(
|
|
189
|
-
/* @__PURE__ */ e(
|
|
190
|
-
/* @__PURE__ */ e(se, { asChild: !0, children:
|
|
191
|
-
/* @__PURE__ */ e(
|
|
197
|
+
] }) : /* @__PURE__ */ r(oe, { open: v, onOpenChange: b, children: [
|
|
198
|
+
/* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ r(ie, { children: [
|
|
199
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: P }),
|
|
200
|
+
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }) })
|
|
192
201
|
] }) }),
|
|
193
|
-
/* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose:
|
|
202
|
+
/* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: H }) : /* @__PURE__ */ e(ye, { event: t, onClose: H }) })
|
|
194
203
|
] });
|
|
195
204
|
}
|
|
196
205
|
if (n === "compact") {
|
|
197
|
-
const
|
|
206
|
+
const P = /* @__PURE__ */ r(
|
|
198
207
|
"div",
|
|
199
208
|
{
|
|
200
209
|
role: "button",
|
|
201
210
|
tabIndex: 0,
|
|
202
|
-
draggable: !!
|
|
203
|
-
onDragStart:
|
|
204
|
-
onDragEnd:
|
|
205
|
-
onClick: l ?
|
|
206
|
-
onKeyDown: (
|
|
207
|
-
(
|
|
211
|
+
draggable: !!D,
|
|
212
|
+
onDragStart: F,
|
|
213
|
+
onDragEnd: U,
|
|
214
|
+
onClick: l ? j : void 0,
|
|
215
|
+
onKeyDown: (J) => {
|
|
216
|
+
(J.key === "Enter" || J.key === " ") && (J.preventDefault(), j());
|
|
208
217
|
},
|
|
209
|
-
className:
|
|
218
|
+
className: c(
|
|
210
219
|
"group flex w-full relative items-center shadow-[0_0_1px_rgba(0,0,0,0.3)] gap-0 rounded px-1.5 py-1 text-left text-xs transition-colors hover:opacity-80",
|
|
211
|
-
|
|
212
|
-
|
|
220
|
+
D ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
|
|
221
|
+
z && "opacity-50",
|
|
213
222
|
// Cancelled events get gray background with strikethrough
|
|
214
|
-
|
|
223
|
+
R ? "bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 line-through" : [
|
|
215
224
|
o === "colored" && [u.bg, u.text],
|
|
216
225
|
o === "mixed" && [u.bg, u.text],
|
|
217
226
|
o === "dot" && "bg-muted/50"
|
|
218
227
|
],
|
|
219
228
|
i
|
|
220
229
|
),
|
|
221
|
-
style:
|
|
230
|
+
style: N,
|
|
222
231
|
children: [
|
|
223
|
-
["dot", "mixed"].includes(o) &&
|
|
232
|
+
["dot", "mixed"].includes(o) && !R && /* @__PURE__ */ e(
|
|
224
233
|
"svg",
|
|
225
234
|
{
|
|
226
235
|
width: "8",
|
|
@@ -252,7 +261,7 @@ function Se({
|
|
|
252
261
|
/* @__PURE__ */ e(
|
|
253
262
|
"div",
|
|
254
263
|
{
|
|
255
|
-
className:
|
|
264
|
+
className: c(
|
|
256
265
|
"w-fit mt-0.5 text-[10px] px-1 py-0.5 border border-dashed rounded-full font-medium",
|
|
257
266
|
u.border
|
|
258
267
|
),
|
|
@@ -260,32 +269,32 @@ function Se({
|
|
|
260
269
|
}
|
|
261
270
|
)
|
|
262
271
|
] }) }),
|
|
263
|
-
/* @__PURE__ */ e("div", { className: "flex gap-0.5", children:
|
|
272
|
+
/* @__PURE__ */ e("div", { className: "flex gap-0.5", children: I })
|
|
264
273
|
]
|
|
265
274
|
}
|
|
266
275
|
);
|
|
267
276
|
return l ? /* @__PURE__ */ r(ie, { children: [
|
|
268
|
-
/* @__PURE__ */ e(se, { asChild: !0, children:
|
|
269
|
-
/* @__PURE__ */ e(
|
|
277
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: P }),
|
|
278
|
+
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
270
279
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
271
280
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
|
|
272
281
|
] }) })
|
|
273
|
-
] }) : /* @__PURE__ */ r(
|
|
274
|
-
/* @__PURE__ */ e(
|
|
275
|
-
/* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose:
|
|
282
|
+
] }) : /* @__PURE__ */ r(oe, { open: v, onOpenChange: b, children: [
|
|
283
|
+
/* @__PURE__ */ e(ae, { asChild: !0, children: P }),
|
|
284
|
+
/* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: H }) : /* @__PURE__ */ e(ye, { event: t, onClose: H }) })
|
|
276
285
|
] });
|
|
277
286
|
}
|
|
278
|
-
const
|
|
287
|
+
const te = /* @__PURE__ */ r(
|
|
279
288
|
"button",
|
|
280
289
|
{
|
|
281
290
|
type: "button",
|
|
282
|
-
onClick:
|
|
283
|
-
className:
|
|
291
|
+
onClick: j,
|
|
292
|
+
className: c(
|
|
284
293
|
"group relative flex w-full flex-col gap-1 rounded-md border-l-[3px] px-2 py-1.5 text-left transition-all",
|
|
285
294
|
"shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
|
|
286
295
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
287
296
|
// Cancelled events get gray background with strikethrough
|
|
288
|
-
|
|
297
|
+
R ? "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
298
|
o === "colored" && [
|
|
290
299
|
u.bg,
|
|
291
300
|
u.accentBorder,
|
|
@@ -300,11 +309,11 @@ function Se({
|
|
|
300
309
|
],
|
|
301
310
|
i
|
|
302
311
|
),
|
|
303
|
-
style:
|
|
312
|
+
style: N,
|
|
304
313
|
children: [
|
|
305
314
|
/* @__PURE__ */ r("div", { className: "flex items-start justify-between gap-1", children: [
|
|
306
315
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
307
|
-
["dot", "mixed"].includes(o) &&
|
|
316
|
+
["dot", "mixed"].includes(o) && !R && /* @__PURE__ */ e(
|
|
308
317
|
"svg",
|
|
309
318
|
{
|
|
310
319
|
width: "8",
|
|
@@ -319,58 +328,58 @@ function Se({
|
|
|
319
328
|
/* @__PURE__ */ r(
|
|
320
329
|
"span",
|
|
321
330
|
{
|
|
322
|
-
className:
|
|
331
|
+
className: c(
|
|
323
332
|
"text-sm font-medium truncate",
|
|
324
|
-
|
|
325
|
-
|
|
333
|
+
!R && o !== "dot" && u.text,
|
|
334
|
+
R && "line-through"
|
|
326
335
|
),
|
|
327
336
|
children: [
|
|
328
337
|
t.title,
|
|
329
|
-
|
|
338
|
+
G && /* @__PURE__ */ r("span", { className: "font-normal opacity-75", children: [
|
|
330
339
|
" ",
|
|
331
340
|
"- ",
|
|
332
|
-
|
|
341
|
+
G
|
|
333
342
|
] })
|
|
334
343
|
]
|
|
335
344
|
}
|
|
336
345
|
)
|
|
337
346
|
] }),
|
|
338
|
-
|
|
347
|
+
I
|
|
339
348
|
] }),
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
/* @__PURE__ */ e(
|
|
349
|
+
k && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: k }),
|
|
350
|
+
d != null && d > 0 && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
351
|
+
/* @__PURE__ */ e(ze, { className: "h-3 w-3 shrink-0" }),
|
|
343
352
|
/* @__PURE__ */ r("span", { children: [
|
|
344
|
-
|
|
353
|
+
d,
|
|
345
354
|
" participant",
|
|
346
|
-
|
|
355
|
+
d !== 1 ? "s" : ""
|
|
347
356
|
] })
|
|
348
357
|
] }),
|
|
349
358
|
f && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
350
359
|
/* @__PURE__ */ e(je, { className: "h-3 w-3 shrink-0" }),
|
|
351
360
|
/* @__PURE__ */ e("span", { children: X(t) })
|
|
352
361
|
] }),
|
|
353
|
-
|
|
354
|
-
/* @__PURE__ */ e(
|
|
355
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
362
|
+
O && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
363
|
+
/* @__PURE__ */ e(lt, { className: "h-3 w-3 shrink-0" }),
|
|
364
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: O })
|
|
356
365
|
] }),
|
|
357
366
|
s && t.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: t.description }),
|
|
358
367
|
x && t.participants && t.participants.length > 0 && /* @__PURE__ */ r("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
359
|
-
/* @__PURE__ */ e(
|
|
360
|
-
/* @__PURE__ */ e("span", { className: "truncate", children: t.participants.map((
|
|
368
|
+
/* @__PURE__ */ e(ze, { className: "h-3 w-3 shrink-0" }),
|
|
369
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: t.participants.map((P) => P.name).join(", ") })
|
|
361
370
|
] })
|
|
362
371
|
]
|
|
363
372
|
}
|
|
364
373
|
);
|
|
365
374
|
return l ? /* @__PURE__ */ r(ie, { children: [
|
|
366
|
-
/* @__PURE__ */ e(se, { asChild: !0, children:
|
|
367
|
-
/* @__PURE__ */ e(
|
|
375
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: te }),
|
|
376
|
+
/* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
368
377
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
369
378
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
|
|
370
379
|
] }) })
|
|
371
|
-
] }) : /* @__PURE__ */ r(
|
|
372
|
-
/* @__PURE__ */ e(
|
|
373
|
-
/* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose:
|
|
380
|
+
] }) : /* @__PURE__ */ r(oe, { open: v, onOpenChange: b, children: [
|
|
381
|
+
/* @__PURE__ */ e(ae, { asChild: !0, children: te }),
|
|
382
|
+
/* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: H }) : /* @__PURE__ */ e(ye, { event: t, onClose: H }) })
|
|
374
383
|
] });
|
|
375
384
|
}
|
|
376
385
|
function je({ className: t }) {
|
|
@@ -392,7 +401,7 @@ function je({ className: t }) {
|
|
|
392
401
|
}
|
|
393
402
|
);
|
|
394
403
|
}
|
|
395
|
-
function
|
|
404
|
+
function Nt({ className: t }) {
|
|
396
405
|
return /* @__PURE__ */ e(
|
|
397
406
|
"svg",
|
|
398
407
|
{
|
|
@@ -408,7 +417,7 @@ function vt({ className: t }) {
|
|
|
408
417
|
}
|
|
409
418
|
);
|
|
410
419
|
}
|
|
411
|
-
function
|
|
420
|
+
function kt({ className: t }) {
|
|
412
421
|
return /* @__PURE__ */ r(
|
|
413
422
|
"svg",
|
|
414
423
|
{
|
|
@@ -427,7 +436,7 @@ function Nt({ className: t }) {
|
|
|
427
436
|
}
|
|
428
437
|
);
|
|
429
438
|
}
|
|
430
|
-
function
|
|
439
|
+
function ze({ className: t }) {
|
|
431
440
|
return /* @__PURE__ */ r(
|
|
432
441
|
"svg",
|
|
433
442
|
{
|
|
@@ -448,7 +457,7 @@ function Ee({ className: t }) {
|
|
|
448
457
|
}
|
|
449
458
|
);
|
|
450
459
|
}
|
|
451
|
-
function
|
|
460
|
+
function lt({ className: t }) {
|
|
452
461
|
return /* @__PURE__ */ r(
|
|
453
462
|
"svg",
|
|
454
463
|
{
|
|
@@ -474,12 +483,12 @@ function ye({
|
|
|
474
483
|
const o = de(t.color), a = t.isCanceled ?? !1;
|
|
475
484
|
return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
|
|
476
485
|
/* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
|
|
477
|
-
/* @__PURE__ */ e("div", { className:
|
|
486
|
+
/* @__PURE__ */ e("div", { className: c("size-4 rounded shrink-0 mt-0.5", o.dot) }),
|
|
478
487
|
/* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: [
|
|
479
488
|
/* @__PURE__ */ e(
|
|
480
489
|
"h3",
|
|
481
490
|
{
|
|
482
|
-
className:
|
|
491
|
+
className: c(
|
|
483
492
|
"font-semibold text-lg",
|
|
484
493
|
a && "line-through opacity-50"
|
|
485
494
|
),
|
|
@@ -509,7 +518,7 @@ function ye({
|
|
|
509
518
|
) })
|
|
510
519
|
] });
|
|
511
520
|
}
|
|
512
|
-
function
|
|
521
|
+
function dt({
|
|
513
522
|
event: t,
|
|
514
523
|
position: n,
|
|
515
524
|
hourHeight: o = 96,
|
|
@@ -518,64 +527,73 @@ function lt({
|
|
|
518
527
|
className: f,
|
|
519
528
|
disablePopover: s = !1,
|
|
520
529
|
renderPopover: x,
|
|
521
|
-
enableDrag:
|
|
530
|
+
enableDrag: N = !0
|
|
522
531
|
}) {
|
|
523
|
-
const l = de(t.color), [y, w] =
|
|
524
|
-
|
|
525
|
-
|
|
532
|
+
const l = de(t.color), [y, w] = Y(!1), [h, g] = Y(!1), u = Re(), v = it();
|
|
533
|
+
be(() => {
|
|
534
|
+
if (!s && v?.focusEventId && v.focusEventId === t.id) {
|
|
535
|
+
const H = setTimeout(() => {
|
|
536
|
+
w(!0), v.clearFocusEventId();
|
|
537
|
+
}, 300);
|
|
538
|
+
return () => clearTimeout(H);
|
|
539
|
+
}
|
|
540
|
+
}, [v?.focusEventId, t.id, s]);
|
|
541
|
+
const b = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), z = b / 60 * o - 8, L = t.endDate < st(/* @__PURE__ */ new Date()), M = t.isCanceled ?? !1, $ = N && u && !M && !L, T = b < 35, A = b > 25, E = b >= 45, B = t.data, W = t.scheduleTypeName || B?.scheduleTypeName || B?.typeName, V = B?.productName, R = B?.nrParticipant, D = B?.siteName, m = B?.siteCity, _ = [D, m].filter(Boolean).join(", "), I = a === "dot", G = S(() => {
|
|
542
|
+
h || (s && i ? i(t) : s || w(!0));
|
|
543
|
+
}, [h, s, i, t]), k = S(() => {
|
|
526
544
|
w(!1);
|
|
527
|
-
}, []),
|
|
528
|
-
(
|
|
529
|
-
if (
|
|
530
|
-
|
|
531
|
-
const
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
545
|
+
}, []), d = S(
|
|
546
|
+
(H) => {
|
|
547
|
+
if (!$) return;
|
|
548
|
+
H.dataTransfer.effectAllowed = "move", H.dataTransfer.setData("text/plain", t.id);
|
|
549
|
+
const F = H.currentTarget, U = F.getBoundingClientRect();
|
|
550
|
+
H.dataTransfer.setDragImage(
|
|
551
|
+
F,
|
|
552
|
+
H.clientX - U.left,
|
|
553
|
+
H.clientY - U.top
|
|
536
554
|
), g(!0), u?.startDrag?.(t);
|
|
537
555
|
},
|
|
538
|
-
[
|
|
539
|
-
),
|
|
556
|
+
[$, t, u]
|
|
557
|
+
), p = S(() => {
|
|
540
558
|
g(!1), u?.isDragging && u.endDrag?.();
|
|
541
|
-
}, [u]),
|
|
542
|
-
(
|
|
543
|
-
(
|
|
559
|
+
}, [u]), C = S(
|
|
560
|
+
(H) => {
|
|
561
|
+
(H.key === "Enter" || H.key === " ") && (H.preventDefault(), G());
|
|
544
562
|
},
|
|
545
|
-
[
|
|
546
|
-
),
|
|
563
|
+
[G]
|
|
564
|
+
), O = /* @__PURE__ */ r(
|
|
547
565
|
"div",
|
|
548
566
|
{
|
|
549
567
|
role: "button",
|
|
550
568
|
tabIndex: 0,
|
|
551
|
-
draggable:
|
|
552
|
-
onDragStart:
|
|
553
|
-
onDragEnd:
|
|
554
|
-
onKeyDown:
|
|
555
|
-
onClick:
|
|
556
|
-
className:
|
|
569
|
+
draggable: !!$,
|
|
570
|
+
onDragStart: d,
|
|
571
|
+
onDragEnd: p,
|
|
572
|
+
onKeyDown: C,
|
|
573
|
+
onClick: h ? void 0 : G,
|
|
574
|
+
className: c(
|
|
557
575
|
"group flex w-full select-none flex-col gap-0.5 overflow-hidden rounded-md border-l-[3px] px-2 py-1.5 text-xs text-left",
|
|
558
576
|
"shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
|
|
559
577
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
560
578
|
"transition-all",
|
|
561
|
-
|
|
562
|
-
|
|
579
|
+
$ ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
|
|
580
|
+
h && "opacity-50",
|
|
563
581
|
// Cancelled events get gray background with strikethrough
|
|
564
582
|
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
583
|
// Colored/mixed variants
|
|
566
|
-
!
|
|
584
|
+
!I && [
|
|
567
585
|
l.bg,
|
|
568
586
|
l.accentBorder,
|
|
569
587
|
l.text
|
|
570
588
|
],
|
|
571
589
|
// Dot variant - neutral background
|
|
572
|
-
|
|
590
|
+
I && "bg-neutral-50 dark:bg-neutral-900 border-l-neutral-400 dark:border-l-neutral-600"
|
|
573
591
|
],
|
|
574
592
|
// Short events center content
|
|
575
|
-
|
|
593
|
+
T && "py-0 justify-center",
|
|
576
594
|
f
|
|
577
595
|
),
|
|
578
|
-
style: { height: `${Math.max(
|
|
596
|
+
style: { height: `${Math.max(z, 20)}px` },
|
|
579
597
|
children: [
|
|
580
598
|
/* @__PURE__ */ r("div", { className: "flex items-start gap-1.5 min-w-0", children: [
|
|
581
599
|
["mixed", "dot"].includes(a) && !M && /* @__PURE__ */ e(
|
|
@@ -593,54 +611,54 @@ function lt({
|
|
|
593
611
|
/* @__PURE__ */ e("div", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ r(
|
|
594
612
|
"p",
|
|
595
613
|
{
|
|
596
|
-
className:
|
|
614
|
+
className: c(
|
|
597
615
|
"font-semibold truncate leading-tight",
|
|
598
|
-
!M &&
|
|
616
|
+
!M && I && "text-foreground"
|
|
599
617
|
),
|
|
600
618
|
children: [
|
|
601
619
|
t.title,
|
|
602
|
-
|
|
620
|
+
W && /* @__PURE__ */ r("span", { className: "font-normal opacity-75", children: [
|
|
603
621
|
" ",
|
|
604
622
|
"- ",
|
|
605
|
-
|
|
623
|
+
W
|
|
606
624
|
] })
|
|
607
625
|
]
|
|
608
626
|
}
|
|
609
627
|
) })
|
|
610
628
|
] }),
|
|
611
|
-
|
|
629
|
+
E && V && /* @__PURE__ */ e(
|
|
612
630
|
"p",
|
|
613
631
|
{
|
|
614
|
-
className:
|
|
632
|
+
className: c(
|
|
615
633
|
"text-[11px] truncate leading-tight",
|
|
616
|
-
|
|
634
|
+
I ? "text-muted-foreground" : "opacity-80"
|
|
617
635
|
),
|
|
618
|
-
children:
|
|
636
|
+
children: V
|
|
619
637
|
}
|
|
620
638
|
),
|
|
621
|
-
|
|
639
|
+
R != null && R > 0 && /* @__PURE__ */ r(
|
|
622
640
|
"div",
|
|
623
641
|
{
|
|
624
|
-
className:
|
|
642
|
+
className: c(
|
|
625
643
|
"flex items-center gap-1 text-[11px] leading-tight",
|
|
626
|
-
|
|
644
|
+
I ? "text-muted-foreground" : "opacity-80"
|
|
627
645
|
),
|
|
628
646
|
children: [
|
|
629
|
-
/* @__PURE__ */ e(
|
|
647
|
+
/* @__PURE__ */ e(ze, { className: "h-3 w-3 shrink-0" }),
|
|
630
648
|
/* @__PURE__ */ r("span", { children: [
|
|
631
|
-
|
|
649
|
+
R,
|
|
632
650
|
" participant",
|
|
633
|
-
|
|
651
|
+
R !== 1 ? "s" : ""
|
|
634
652
|
] })
|
|
635
653
|
]
|
|
636
654
|
}
|
|
637
655
|
),
|
|
638
|
-
|
|
656
|
+
A && /* @__PURE__ */ r(
|
|
639
657
|
"div",
|
|
640
658
|
{
|
|
641
|
-
className:
|
|
659
|
+
className: c(
|
|
642
660
|
"flex items-center gap-1 text-[11px] tabular-nums leading-tight",
|
|
643
|
-
|
|
661
|
+
I ? "text-muted-foreground" : "opacity-90"
|
|
644
662
|
),
|
|
645
663
|
children: [
|
|
646
664
|
/* @__PURE__ */ e(je, { className: "h-3 w-3 shrink-0" }),
|
|
@@ -648,38 +666,38 @@ function lt({
|
|
|
648
666
|
]
|
|
649
667
|
}
|
|
650
668
|
),
|
|
651
|
-
|
|
669
|
+
E && _ && /* @__PURE__ */ r(
|
|
652
670
|
"div",
|
|
653
671
|
{
|
|
654
|
-
className:
|
|
672
|
+
className: c(
|
|
655
673
|
"flex items-center gap-1 text-[11px] truncate leading-tight",
|
|
656
|
-
|
|
674
|
+
I ? "text-muted-foreground" : "opacity-80"
|
|
657
675
|
),
|
|
658
676
|
children: [
|
|
659
|
-
/* @__PURE__ */ e(
|
|
660
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
677
|
+
/* @__PURE__ */ e(lt, { className: "h-3 w-3 shrink-0" }),
|
|
678
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: _ })
|
|
661
679
|
]
|
|
662
680
|
}
|
|
663
681
|
)
|
|
664
682
|
]
|
|
665
683
|
}
|
|
666
|
-
),
|
|
684
|
+
), j = /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
667
685
|
/* @__PURE__ */ r("div", { className: "font-medium", children: [
|
|
668
686
|
t.title,
|
|
669
|
-
|
|
687
|
+
W && /* @__PURE__ */ r("span", { className: "font-normal opacity-75", children: [
|
|
670
688
|
" ",
|
|
671
689
|
"- ",
|
|
672
|
-
|
|
690
|
+
W
|
|
673
691
|
] })
|
|
674
692
|
] }),
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
693
|
+
V && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: V }),
|
|
694
|
+
R != null && /* @__PURE__ */ r("div", { className: "text-xs text-muted-foreground", children: [
|
|
695
|
+
R,
|
|
678
696
|
" participant",
|
|
679
|
-
|
|
697
|
+
R !== 1 ? "s" : ""
|
|
680
698
|
] }),
|
|
681
699
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) }),
|
|
682
|
-
|
|
700
|
+
_ && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: _ })
|
|
683
701
|
] }) });
|
|
684
702
|
return s ? /* @__PURE__ */ e(
|
|
685
703
|
"div",
|
|
@@ -692,8 +710,8 @@ function lt({
|
|
|
692
710
|
minWidth: n.minWidth ? `${n.minWidth}px` : void 0
|
|
693
711
|
},
|
|
694
712
|
children: /* @__PURE__ */ r(ie, { children: [
|
|
695
|
-
/* @__PURE__ */ e(se, { asChild: !0, children:
|
|
696
|
-
|
|
713
|
+
/* @__PURE__ */ e(se, { asChild: !0, children: O }),
|
|
714
|
+
j
|
|
697
715
|
] })
|
|
698
716
|
}
|
|
699
717
|
) : /* @__PURE__ */ e(
|
|
@@ -706,14 +724,14 @@ function lt({
|
|
|
706
724
|
width: n.minWidth ? `max(${n.minWidth}px, ${n.width}%)` : `${n.width}%`,
|
|
707
725
|
minWidth: n.minWidth ? `${n.minWidth}px` : void 0
|
|
708
726
|
},
|
|
709
|
-
children: /* @__PURE__ */ r(
|
|
710
|
-
/* @__PURE__ */ e(
|
|
711
|
-
/* @__PURE__ */ e(Q, { className: "w-80", children: x ? x({ event: t, onClose:
|
|
727
|
+
children: /* @__PURE__ */ r(oe, { open: y, onOpenChange: w, children: [
|
|
728
|
+
/* @__PURE__ */ e(ae, { asChild: !0, children: O }),
|
|
729
|
+
/* @__PURE__ */ e(Q, { className: "w-80", children: x ? x({ event: t, onClose: k }) : /* @__PURE__ */ e(ye, { event: t, onClose: k }) })
|
|
712
730
|
] })
|
|
713
731
|
}
|
|
714
732
|
);
|
|
715
733
|
}
|
|
716
|
-
function
|
|
734
|
+
function Cn({
|
|
717
735
|
event: t,
|
|
718
736
|
spanDays: n,
|
|
719
737
|
isStart: o,
|
|
@@ -723,19 +741,19 @@ function Dn({
|
|
|
723
741
|
disablePopover: s = !1,
|
|
724
742
|
renderPopover: x
|
|
725
743
|
}) {
|
|
726
|
-
const
|
|
744
|
+
const N = de(t.color), [l, y] = Y(!1), w = t.isCanceled ?? !1, h = S(() => {
|
|
727
745
|
s && i ? i(t) : s || y(!0);
|
|
728
|
-
}, [s, i, t]), g =
|
|
746
|
+
}, [s, i, t]), g = S(() => {
|
|
729
747
|
y(!1);
|
|
730
748
|
}, []), u = /* @__PURE__ */ e(
|
|
731
749
|
"button",
|
|
732
750
|
{
|
|
733
751
|
type: "button",
|
|
734
|
-
onClick:
|
|
735
|
-
className:
|
|
752
|
+
onClick: h,
|
|
753
|
+
className: c(
|
|
736
754
|
"flex h-5 items-center px-1.5 text-xs font-medium transition-opacity hover:opacity-80",
|
|
737
755
|
// Cancelled events get gray background with strikethrough
|
|
738
|
-
w ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [
|
|
756
|
+
w ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [N.dot, "text-white"],
|
|
739
757
|
o && "rounded-l",
|
|
740
758
|
a && "rounded-r",
|
|
741
759
|
!o && "border-l-0",
|
|
@@ -745,15 +763,15 @@ function Dn({
|
|
|
745
763
|
style: { width: `${n * 100}%` },
|
|
746
764
|
children: o && /* @__PURE__ */ e("span", { className: "truncate", children: t.title })
|
|
747
765
|
}
|
|
748
|
-
),
|
|
766
|
+
), v = /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
749
767
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
750
768
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
|
|
751
769
|
] }) });
|
|
752
770
|
return s ? /* @__PURE__ */ r(ie, { children: [
|
|
753
771
|
/* @__PURE__ */ e(se, { asChild: !0, children: u }),
|
|
754
|
-
|
|
755
|
-
] }) : /* @__PURE__ */ r(
|
|
756
|
-
/* @__PURE__ */ e(
|
|
772
|
+
v
|
|
773
|
+
] }) : /* @__PURE__ */ r(oe, { open: l, onOpenChange: y, children: [
|
|
774
|
+
/* @__PURE__ */ e(ae, { asChild: !0, children: u }),
|
|
757
775
|
/* @__PURE__ */ e(Q, { className: "w-80", children: x ? x({ event: t, onClose: g }) : /* @__PURE__ */ e(ye, { event: t, onClose: g }) })
|
|
758
776
|
] });
|
|
759
777
|
}
|
|
@@ -770,36 +788,36 @@ if (typeof window < "u" && !document.getElementById("inno-calendar-event-marquee
|
|
|
770
788
|
}
|
|
771
789
|
`, document.head.appendChild(t);
|
|
772
790
|
}
|
|
773
|
-
const Ge = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ue =
|
|
791
|
+
const Ge = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ue = gt, ct = (t, n) => (o) => {
|
|
774
792
|
var a;
|
|
775
793
|
if (n?.variants == null) return Ue(t, o?.class, o?.className);
|
|
776
794
|
const { variants: i, defaultVariants: f } = n, s = Object.keys(i).map((l) => {
|
|
777
795
|
const y = o?.[l], w = f?.[l];
|
|
778
796
|
if (y === null) return null;
|
|
779
|
-
const
|
|
780
|
-
return i[l][
|
|
797
|
+
const h = Ge(y) || Ge(w);
|
|
798
|
+
return i[l][h];
|
|
781
799
|
}), x = o && Object.entries(o).reduce((l, y) => {
|
|
782
|
-
let [w,
|
|
783
|
-
return
|
|
784
|
-
}, {}),
|
|
785
|
-
let { class: w, className:
|
|
800
|
+
let [w, h] = y;
|
|
801
|
+
return h === void 0 || (l[w] = h), l;
|
|
802
|
+
}, {}), N = n == null || (a = n.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((l, y) => {
|
|
803
|
+
let { class: w, className: h, ...g } = y;
|
|
786
804
|
return Object.entries(g).every((u) => {
|
|
787
|
-
let [
|
|
788
|
-
return Array.isArray(
|
|
805
|
+
let [v, b] = u;
|
|
806
|
+
return Array.isArray(b) ? b.includes({
|
|
789
807
|
...f,
|
|
790
808
|
...x
|
|
791
|
-
}[
|
|
809
|
+
}[v]) : {
|
|
792
810
|
...f,
|
|
793
811
|
...x
|
|
794
|
-
}[
|
|
812
|
+
}[v] === b;
|
|
795
813
|
}) ? [
|
|
796
814
|
...l,
|
|
797
815
|
w,
|
|
798
|
-
|
|
816
|
+
h
|
|
799
817
|
] : l;
|
|
800
818
|
}, []);
|
|
801
|
-
return Ue(t, s,
|
|
802
|
-
},
|
|
819
|
+
return Ue(t, s, N, o?.class, o?.className);
|
|
820
|
+
}, Dt = ct(
|
|
803
821
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
804
822
|
{
|
|
805
823
|
variants: {
|
|
@@ -823,11 +841,11 @@ const Ge = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ue = ft, d
|
|
|
823
841
|
size: "default"
|
|
824
842
|
}
|
|
825
843
|
}
|
|
826
|
-
), me =
|
|
844
|
+
), me = Be(
|
|
827
845
|
({ className: t, variant: n, size: o, loading: a, disabled: i, children: f, ...s }, x) => /* @__PURE__ */ r(
|
|
828
846
|
"button",
|
|
829
847
|
{
|
|
830
|
-
className:
|
|
848
|
+
className: c(Dt({ variant: n, size: o, className: t })),
|
|
831
849
|
ref: x,
|
|
832
850
|
disabled: i || a,
|
|
833
851
|
...s,
|
|
@@ -868,17 +886,17 @@ const Ge = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Ue = ft, d
|
|
|
868
886
|
)
|
|
869
887
|
);
|
|
870
888
|
me.displayName = "Button";
|
|
871
|
-
const
|
|
872
|
-
const
|
|
873
|
-
const
|
|
889
|
+
const ut = (...t) => t.filter((n, o, a) => !!n && n.trim() !== "" && a.indexOf(n) === o).join(" ").trim();
|
|
890
|
+
const Ct = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
891
|
+
const St = (t) => t.replace(
|
|
874
892
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
875
893
|
(n, o, a) => a ? a.toUpperCase() : o.toLowerCase()
|
|
876
894
|
);
|
|
877
895
|
const qe = (t) => {
|
|
878
|
-
const n =
|
|
896
|
+
const n = St(t);
|
|
879
897
|
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
880
898
|
};
|
|
881
|
-
var
|
|
899
|
+
var Mt = {
|
|
882
900
|
xmlns: "http://www.w3.org/2000/svg",
|
|
883
901
|
width: 24,
|
|
884
902
|
height: 24,
|
|
@@ -889,13 +907,13 @@ var St = {
|
|
|
889
907
|
strokeLinecap: "round",
|
|
890
908
|
strokeLinejoin: "round"
|
|
891
909
|
};
|
|
892
|
-
const
|
|
910
|
+
const Tt = (t) => {
|
|
893
911
|
for (const n in t)
|
|
894
912
|
if (n.startsWith("aria-") || n === "role" || n === "title")
|
|
895
913
|
return !0;
|
|
896
914
|
return !1;
|
|
897
915
|
};
|
|
898
|
-
const
|
|
916
|
+
const Wt = Be(
|
|
899
917
|
({
|
|
900
918
|
color: t = "currentColor",
|
|
901
919
|
size: n = 24,
|
|
@@ -905,32 +923,32 @@ const Tt = $e(
|
|
|
905
923
|
children: f,
|
|
906
924
|
iconNode: s,
|
|
907
925
|
...x
|
|
908
|
-
},
|
|
926
|
+
}, N) => Ee(
|
|
909
927
|
"svg",
|
|
910
928
|
{
|
|
911
|
-
ref:
|
|
912
|
-
...
|
|
929
|
+
ref: N,
|
|
930
|
+
...Mt,
|
|
913
931
|
width: n,
|
|
914
932
|
height: n,
|
|
915
933
|
stroke: t,
|
|
916
934
|
strokeWidth: a ? Number(o) * 24 / Number(n) : o,
|
|
917
|
-
className:
|
|
918
|
-
...!f && !
|
|
935
|
+
className: ut("lucide", i),
|
|
936
|
+
...!f && !Tt(x) && { "aria-hidden": "true" },
|
|
919
937
|
...x
|
|
920
938
|
},
|
|
921
939
|
[
|
|
922
|
-
...s.map(([l, y]) =>
|
|
940
|
+
...s.map(([l, y]) => Ee(l, y)),
|
|
923
941
|
...Array.isArray(f) ? f : [f]
|
|
924
942
|
]
|
|
925
943
|
)
|
|
926
944
|
);
|
|
927
945
|
const Pe = (t, n) => {
|
|
928
|
-
const o =
|
|
929
|
-
({ className: a, ...i }, f) =>
|
|
946
|
+
const o = Be(
|
|
947
|
+
({ className: a, ...i }, f) => Ee(Wt, {
|
|
930
948
|
ref: f,
|
|
931
949
|
iconNode: n,
|
|
932
|
-
className:
|
|
933
|
-
`lucide-${
|
|
950
|
+
className: ut(
|
|
951
|
+
`lucide-${Ct(qe(t))}`,
|
|
934
952
|
`lucide-${t}`,
|
|
935
953
|
a
|
|
936
954
|
),
|
|
@@ -939,13 +957,13 @@ const Pe = (t, n) => {
|
|
|
939
957
|
);
|
|
940
958
|
return o.displayName = qe(t), o;
|
|
941
959
|
};
|
|
942
|
-
const
|
|
943
|
-
const
|
|
944
|
-
const
|
|
945
|
-
|
|
960
|
+
const Lt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], At = Pe("check", Lt);
|
|
961
|
+
const Et = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], zt = Pe("chevron-right", Et);
|
|
962
|
+
const _t = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], It = Pe("circle", _t), Ke = K.Root, Xe = K.Trigger, Bt = ee.forwardRef(({ className: t, inset: n, children: o, ...a }, i) => /* @__PURE__ */ r(
|
|
963
|
+
K.SubTrigger,
|
|
946
964
|
{
|
|
947
965
|
ref: i,
|
|
948
|
-
className:
|
|
966
|
+
className: c(
|
|
949
967
|
"flex cursor-default select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
|
950
968
|
n && "pl-8",
|
|
951
969
|
t
|
|
@@ -957,37 +975,37 @@ const Et = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], _t = Pe
|
|
|
957
975
|
]
|
|
958
976
|
}
|
|
959
977
|
));
|
|
960
|
-
Bt.displayName =
|
|
978
|
+
Bt.displayName = K.SubTrigger.displayName;
|
|
961
979
|
const $t = ee.forwardRef(({ className: t, ...n }, o) => /* @__PURE__ */ e(
|
|
962
|
-
|
|
980
|
+
K.SubContent,
|
|
963
981
|
{
|
|
964
982
|
ref: o,
|
|
965
|
-
className:
|
|
983
|
+
className: c(
|
|
966
984
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
967
985
|
t
|
|
968
986
|
),
|
|
969
987
|
...n
|
|
970
988
|
}
|
|
971
989
|
));
|
|
972
|
-
$t.displayName =
|
|
973
|
-
const _e = ee.forwardRef(({ className: t, sideOffset: n = 4, ...o }, a) => /* @__PURE__ */ e(
|
|
974
|
-
|
|
990
|
+
$t.displayName = K.SubContent.displayName;
|
|
991
|
+
const _e = ee.forwardRef(({ className: t, sideOffset: n = 4, ...o }, a) => /* @__PURE__ */ e(K.Portal, { children: /* @__PURE__ */ e(
|
|
992
|
+
K.Content,
|
|
975
993
|
{
|
|
976
994
|
ref: a,
|
|
977
995
|
sideOffset: n,
|
|
978
|
-
className:
|
|
996
|
+
className: c(
|
|
979
997
|
"z-50 rounded-xl border bg-popover p-1 text-popover-foreground shadow-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
980
998
|
t
|
|
981
999
|
),
|
|
982
1000
|
...o
|
|
983
1001
|
}
|
|
984
1002
|
) }));
|
|
985
|
-
_e.displayName =
|
|
986
|
-
const
|
|
987
|
-
|
|
1003
|
+
_e.displayName = K.Content.displayName;
|
|
1004
|
+
const Ie = ee.forwardRef(({ className: t, inset: n, ...o }, a) => /* @__PURE__ */ e(
|
|
1005
|
+
K.Item,
|
|
988
1006
|
{
|
|
989
1007
|
ref: a,
|
|
990
|
-
className:
|
|
1008
|
+
className: c(
|
|
991
1009
|
"relative flex cursor-pointer select-none items-center rounded-lg px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
992
1010
|
n && "pl-8",
|
|
993
1011
|
t
|
|
@@ -995,59 +1013,59 @@ const Be = ee.forwardRef(({ className: t, inset: n, ...o }, a) => /* @__PURE__ *
|
|
|
995
1013
|
...o
|
|
996
1014
|
}
|
|
997
1015
|
));
|
|
998
|
-
|
|
999
|
-
const
|
|
1000
|
-
|
|
1016
|
+
Ie.displayName = K.Item.displayName;
|
|
1017
|
+
const Ht = ee.forwardRef(({ className: t, children: n, checked: o = !1, ...a }, i) => /* @__PURE__ */ r(
|
|
1018
|
+
K.CheckboxItem,
|
|
1001
1019
|
{
|
|
1002
1020
|
ref: i,
|
|
1003
|
-
className:
|
|
1021
|
+
className: c(
|
|
1004
1022
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1005
1023
|
t
|
|
1006
1024
|
),
|
|
1007
1025
|
checked: o,
|
|
1008
1026
|
...a,
|
|
1009
1027
|
children: [
|
|
1010
|
-
/* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(
|
|
1028
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(K.ItemIndicator, { children: /* @__PURE__ */ e(At, { className: "h-4 w-4" }) }) }),
|
|
1011
1029
|
n
|
|
1012
1030
|
]
|
|
1013
1031
|
}
|
|
1014
1032
|
));
|
|
1015
|
-
|
|
1016
|
-
const
|
|
1017
|
-
|
|
1033
|
+
Ht.displayName = K.CheckboxItem.displayName;
|
|
1034
|
+
const Rt = ee.forwardRef(({ className: t, children: n, ...o }, a) => /* @__PURE__ */ r(
|
|
1035
|
+
K.RadioItem,
|
|
1018
1036
|
{
|
|
1019
1037
|
ref: a,
|
|
1020
|
-
className:
|
|
1038
|
+
className: c(
|
|
1021
1039
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
|
1022
1040
|
t
|
|
1023
1041
|
),
|
|
1024
1042
|
...o,
|
|
1025
1043
|
children: [
|
|
1026
|
-
/* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(
|
|
1044
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(K.ItemIndicator, { children: /* @__PURE__ */ e(It, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1027
1045
|
n
|
|
1028
1046
|
]
|
|
1029
1047
|
}
|
|
1030
1048
|
));
|
|
1031
|
-
|
|
1032
|
-
const
|
|
1033
|
-
|
|
1049
|
+
Rt.displayName = K.RadioItem.displayName;
|
|
1050
|
+
const Ot = ee.forwardRef(({ className: t, inset: n, ...o }, a) => /* @__PURE__ */ e(
|
|
1051
|
+
K.Label,
|
|
1034
1052
|
{
|
|
1035
1053
|
ref: a,
|
|
1036
|
-
className:
|
|
1054
|
+
className: c("px-2 py-1.5 text-sm font-semibold", n && "pl-8", t),
|
|
1037
1055
|
...o
|
|
1038
1056
|
}
|
|
1039
1057
|
));
|
|
1040
|
-
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1058
|
+
Ot.displayName = K.Label.displayName;
|
|
1059
|
+
const jt = ee.forwardRef(({ className: t, ...n }, o) => /* @__PURE__ */ e(
|
|
1060
|
+
K.Separator,
|
|
1043
1061
|
{
|
|
1044
1062
|
ref: o,
|
|
1045
|
-
className:
|
|
1063
|
+
className: c("-mx-1 my-1 h-px bg-muted", t),
|
|
1046
1064
|
...n
|
|
1047
1065
|
}
|
|
1048
1066
|
));
|
|
1049
|
-
|
|
1050
|
-
const
|
|
1067
|
+
jt.displayName = K.Separator.displayName;
|
|
1068
|
+
const Pt = ct(
|
|
1051
1069
|
"inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
1052
1070
|
{
|
|
1053
1071
|
variants: {
|
|
@@ -1061,10 +1079,10 @@ const jt = dt(
|
|
|
1061
1079
|
defaultVariants: { variant: "default" }
|
|
1062
1080
|
}
|
|
1063
1081
|
);
|
|
1064
|
-
function
|
|
1065
|
-
return /* @__PURE__ */ e("div", { className:
|
|
1082
|
+
function Ft({ className: t, variant: n, ...o }) {
|
|
1083
|
+
return /* @__PURE__ */ e("div", { className: c(Pt({ variant: n }), t), ...o });
|
|
1066
1084
|
}
|
|
1067
|
-
function
|
|
1085
|
+
function Vt({ className: t }) {
|
|
1068
1086
|
return /* @__PURE__ */ e(
|
|
1069
1087
|
"svg",
|
|
1070
1088
|
{
|
|
@@ -1082,7 +1100,7 @@ function Ft({ className: t }) {
|
|
|
1082
1100
|
}
|
|
1083
1101
|
);
|
|
1084
1102
|
}
|
|
1085
|
-
function
|
|
1103
|
+
function Gt({ className: t }) {
|
|
1086
1104
|
return /* @__PURE__ */ e(
|
|
1087
1105
|
"svg",
|
|
1088
1106
|
{
|
|
@@ -1100,7 +1118,7 @@ function Vt({ className: t }) {
|
|
|
1100
1118
|
}
|
|
1101
1119
|
);
|
|
1102
1120
|
}
|
|
1103
|
-
const
|
|
1121
|
+
const Ut = [
|
|
1104
1122
|
"January",
|
|
1105
1123
|
"February",
|
|
1106
1124
|
"March",
|
|
@@ -1114,7 +1132,7 @@ const Gt = [
|
|
|
1114
1132
|
"November",
|
|
1115
1133
|
"December"
|
|
1116
1134
|
];
|
|
1117
|
-
function
|
|
1135
|
+
function qt({
|
|
1118
1136
|
date: t,
|
|
1119
1137
|
view: n,
|
|
1120
1138
|
events: o = [],
|
|
@@ -1124,15 +1142,15 @@ function Ut({
|
|
|
1124
1142
|
showEventCount: s = !0,
|
|
1125
1143
|
className: x
|
|
1126
1144
|
}) {
|
|
1127
|
-
const
|
|
1128
|
-
return /* @__PURE__ */ r("div", { className:
|
|
1145
|
+
const N = Ut[t.getMonth()], l = t.getFullYear(), y = s ? xt(o, t, n, f) : 0, w = yt(t, n);
|
|
1146
|
+
return /* @__PURE__ */ r("div", { className: c("min-w-0 flex-1", x), children: [
|
|
1129
1147
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-wrap", children: [
|
|
1130
1148
|
/* @__PURE__ */ r("span", { className: "text-base sm:text-lg font-semibold truncate", children: [
|
|
1131
|
-
|
|
1149
|
+
N,
|
|
1132
1150
|
" ",
|
|
1133
1151
|
l
|
|
1134
1152
|
] }),
|
|
1135
|
-
s && /* @__PURE__ */ e(
|
|
1153
|
+
s && /* @__PURE__ */ e(Ft, { variant: "outline", className: "px-1 sm:px-1.5 text-[10px] sm:text-xs shrink-0", children: y })
|
|
1136
1154
|
] }),
|
|
1137
1155
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
|
|
1138
1156
|
/* @__PURE__ */ e(
|
|
@@ -1142,7 +1160,7 @@ function Ut({
|
|
|
1142
1160
|
size: "icon",
|
|
1143
1161
|
className: "size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",
|
|
1144
1162
|
onClick: a,
|
|
1145
|
-
children: /* @__PURE__ */ e(
|
|
1163
|
+
children: /* @__PURE__ */ e(Vt, {})
|
|
1146
1164
|
}
|
|
1147
1165
|
),
|
|
1148
1166
|
/* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: w }),
|
|
@@ -1153,13 +1171,13 @@ function Ut({
|
|
|
1153
1171
|
size: "icon",
|
|
1154
1172
|
className: "size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",
|
|
1155
1173
|
onClick: i,
|
|
1156
|
-
children: /* @__PURE__ */ e(
|
|
1174
|
+
children: /* @__PURE__ */ e(Gt, {})
|
|
1157
1175
|
}
|
|
1158
1176
|
)
|
|
1159
1177
|
] })
|
|
1160
1178
|
] });
|
|
1161
1179
|
}
|
|
1162
|
-
const
|
|
1180
|
+
const Kt = [
|
|
1163
1181
|
"JAN",
|
|
1164
1182
|
"FEB",
|
|
1165
1183
|
"MAR",
|
|
@@ -1173,13 +1191,13 @@ const qt = [
|
|
|
1173
1191
|
"NOV",
|
|
1174
1192
|
"DEC"
|
|
1175
1193
|
];
|
|
1176
|
-
function
|
|
1194
|
+
function Xt({ onClick: t, className: n }) {
|
|
1177
1195
|
const o = /* @__PURE__ */ new Date();
|
|
1178
1196
|
return /* @__PURE__ */ r(
|
|
1179
1197
|
"button",
|
|
1180
1198
|
{
|
|
1181
1199
|
type: "button",
|
|
1182
|
-
className:
|
|
1200
|
+
className: c(
|
|
1183
1201
|
"flex size-11 sm:size-14 flex-col items-start overflow-hidden rounded-lg border shrink-0",
|
|
1184
1202
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1185
1203
|
"hover:bg-accent/50 transition-colors",
|
|
@@ -1187,13 +1205,13 @@ function Kt({ onClick: t, className: n }) {
|
|
|
1187
1205
|
),
|
|
1188
1206
|
onClick: t,
|
|
1189
1207
|
children: [
|
|
1190
|
-
/* @__PURE__ */ e("p", { className: "flex h-4 sm:h-6 w-full items-center justify-center bg-primary text-center text-[10px] sm:text-xs font-semibold text-primary-foreground", children:
|
|
1208
|
+
/* @__PURE__ */ e("p", { className: "flex h-4 sm:h-6 w-full items-center justify-center bg-primary text-center text-[10px] sm:text-xs font-semibold text-primary-foreground", children: Kt[o.getMonth()] }),
|
|
1191
1209
|
/* @__PURE__ */ e("p", { className: "flex w-full flex-1 items-center justify-center text-sm sm:text-lg font-bold", children: o.getDate() })
|
|
1192
1210
|
]
|
|
1193
1211
|
}
|
|
1194
1212
|
);
|
|
1195
1213
|
}
|
|
1196
|
-
function
|
|
1214
|
+
function Yt({ className: t }) {
|
|
1197
1215
|
return /* @__PURE__ */ r(
|
|
1198
1216
|
"svg",
|
|
1199
1217
|
{
|
|
@@ -1263,7 +1281,7 @@ function Ye({ className: t }) {
|
|
|
1263
1281
|
}
|
|
1264
1282
|
);
|
|
1265
1283
|
}
|
|
1266
|
-
function
|
|
1284
|
+
function Jt({ className: t }) {
|
|
1267
1285
|
return /* @__PURE__ */ r(
|
|
1268
1286
|
"svg",
|
|
1269
1287
|
{
|
|
@@ -1305,7 +1323,7 @@ function Je({ className: t }) {
|
|
|
1305
1323
|
}
|
|
1306
1324
|
);
|
|
1307
1325
|
}
|
|
1308
|
-
function
|
|
1326
|
+
function Zt({ className: t }) {
|
|
1309
1327
|
return /* @__PURE__ */ r(
|
|
1310
1328
|
"svg",
|
|
1311
1329
|
{
|
|
@@ -1330,7 +1348,7 @@ function Jt({ className: t }) {
|
|
|
1330
1348
|
}
|
|
1331
1349
|
);
|
|
1332
1350
|
}
|
|
1333
|
-
function
|
|
1351
|
+
function Qt({ className: t }) {
|
|
1334
1352
|
return /* @__PURE__ */ r(
|
|
1335
1353
|
"svg",
|
|
1336
1354
|
{
|
|
@@ -1351,7 +1369,7 @@ function Zt({ className: t }) {
|
|
|
1351
1369
|
}
|
|
1352
1370
|
);
|
|
1353
1371
|
}
|
|
1354
|
-
function
|
|
1372
|
+
function en({ className: t }) {
|
|
1355
1373
|
return /* @__PURE__ */ r(
|
|
1356
1374
|
"svg",
|
|
1357
1375
|
{
|
|
@@ -1373,7 +1391,7 @@ function Qt({ className: t }) {
|
|
|
1373
1391
|
}
|
|
1374
1392
|
);
|
|
1375
1393
|
}
|
|
1376
|
-
function
|
|
1394
|
+
function tn({ className: t }) {
|
|
1377
1395
|
return /* @__PURE__ */ r(
|
|
1378
1396
|
"svg",
|
|
1379
1397
|
{
|
|
@@ -1397,21 +1415,21 @@ function en({ className: t }) {
|
|
|
1397
1415
|
}
|
|
1398
1416
|
);
|
|
1399
1417
|
}
|
|
1400
|
-
const
|
|
1401
|
-
{ value: "day", label: "Day", icon:
|
|
1402
|
-
{ value: "week", label: "Week", icon:
|
|
1403
|
-
{ value: "month", label: "Month", icon:
|
|
1404
|
-
{ value: "year", label: "Year", icon:
|
|
1418
|
+
const nn = [
|
|
1419
|
+
{ value: "day", label: "Day", icon: Zt },
|
|
1420
|
+
{ value: "week", label: "Week", icon: Qt },
|
|
1421
|
+
{ value: "month", label: "Month", icon: en },
|
|
1422
|
+
{ value: "year", label: "Year", icon: tn }
|
|
1405
1423
|
// { value: 'agenda', label: 'Agenda', icon: ListIcon }, NOTE: Not needed currently
|
|
1406
1424
|
], Ze = [
|
|
1407
1425
|
{ value: "timeline-day", label: "1 Day", icon: he },
|
|
1408
1426
|
{ value: "timeline-3day", label: "3 Days", icon: he },
|
|
1409
1427
|
{ value: "timeline-week", label: "7 Days", icon: he }
|
|
1410
|
-
],
|
|
1428
|
+
], rn = [
|
|
1411
1429
|
{ value: "resource-day", label: "1 Day", icon: he },
|
|
1412
1430
|
{ value: "resource-week", label: "7 Days", icon: he }
|
|
1413
1431
|
];
|
|
1414
|
-
function
|
|
1432
|
+
function Sn({
|
|
1415
1433
|
currentDate: t,
|
|
1416
1434
|
view: n,
|
|
1417
1435
|
events: o = [],
|
|
@@ -1420,98 +1438,98 @@ function Cn({
|
|
|
1420
1438
|
onNavigateNext: f,
|
|
1421
1439
|
onNavigate: s,
|
|
1422
1440
|
onViewChange: x,
|
|
1423
|
-
onAddEvent:
|
|
1441
|
+
onAddEvent: N,
|
|
1424
1442
|
availableViews: l = ["day", "week", "month", "agenda"],
|
|
1425
1443
|
showTimelineViews: y = !1,
|
|
1426
1444
|
timelineViews: w,
|
|
1427
|
-
settingsContent:
|
|
1445
|
+
settingsContent: h,
|
|
1428
1446
|
showSettings: g = !1,
|
|
1429
1447
|
filterContent: u,
|
|
1430
|
-
actions:
|
|
1431
|
-
className:
|
|
1432
|
-
weekStartsOn:
|
|
1433
|
-
labels:
|
|
1448
|
+
actions: v,
|
|
1449
|
+
className: b,
|
|
1450
|
+
weekStartsOn: z = 1,
|
|
1451
|
+
labels: L = {}
|
|
1434
1452
|
}) {
|
|
1435
|
-
const
|
|
1453
|
+
const M = q(
|
|
1436
1454
|
() => ({
|
|
1437
1455
|
today: "Today",
|
|
1438
1456
|
addEvent: "Add Event",
|
|
1439
1457
|
calendarView: "Calendar View",
|
|
1440
1458
|
resourceView: "Resource View",
|
|
1441
|
-
...
|
|
1459
|
+
...L
|
|
1442
1460
|
}),
|
|
1443
|
-
[
|
|
1444
|
-
),
|
|
1461
|
+
[L]
|
|
1462
|
+
), $ = () => {
|
|
1445
1463
|
a?.(), s?.("today");
|
|
1446
|
-
},
|
|
1464
|
+
}, T = () => {
|
|
1447
1465
|
i?.(), s?.("prev");
|
|
1448
1466
|
}, A = () => {
|
|
1449
1467
|
f?.(), s?.("next");
|
|
1450
|
-
},
|
|
1468
|
+
}, E = ["day", "week", "month", "year", "agenda"].includes(
|
|
1451
1469
|
n
|
|
1452
|
-
),
|
|
1453
|
-
(
|
|
1454
|
-
),
|
|
1455
|
-
return /* @__PURE__ */ r("div", { className:
|
|
1470
|
+
), B = n.startsWith("timeline-") || n.startsWith("resource-"), W = nn.filter(
|
|
1471
|
+
(m) => l.includes(m.value)
|
|
1472
|
+
), V = E ? W.find((m) => m.value === n) : null, R = [...Ze, ...rn], D = B ? R.find((m) => m.value === n) : null;
|
|
1473
|
+
return /* @__PURE__ */ r("div", { className: c("flex flex-col w-full gap-3 mb-2", b), children: [
|
|
1456
1474
|
/* @__PURE__ */ r("div", { className: "flex lg:flex-row flex-col w-full justify-between gap-3", children: [
|
|
1457
1475
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1458
1476
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
|
|
1459
|
-
/* @__PURE__ */ e(
|
|
1477
|
+
/* @__PURE__ */ e(Xt, { onClick: $ }),
|
|
1460
1478
|
/* @__PURE__ */ e(
|
|
1461
|
-
|
|
1479
|
+
qt,
|
|
1462
1480
|
{
|
|
1463
1481
|
date: t,
|
|
1464
1482
|
view: n,
|
|
1465
1483
|
events: o,
|
|
1466
|
-
onNavigatePrev:
|
|
1484
|
+
onNavigatePrev: T,
|
|
1467
1485
|
onNavigateNext: A,
|
|
1468
|
-
weekStartsOn:
|
|
1486
|
+
weekStartsOn: z
|
|
1469
1487
|
}
|
|
1470
1488
|
)
|
|
1471
1489
|
] }),
|
|
1472
|
-
|
|
1490
|
+
N && /* @__PURE__ */ e(
|
|
1473
1491
|
me,
|
|
1474
1492
|
{
|
|
1475
1493
|
size: "icon",
|
|
1476
1494
|
className: "shrink-0 lg:hidden",
|
|
1477
|
-
onClick:
|
|
1495
|
+
onClick: N,
|
|
1478
1496
|
children: /* @__PURE__ */ e(Je, { className: "size-4" })
|
|
1479
1497
|
}
|
|
1480
1498
|
)
|
|
1481
1499
|
] }),
|
|
1482
1500
|
/* @__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 &&
|
|
1501
|
+
x && W.length > 0 && /* @__PURE__ */ r(Ke, { children: [
|
|
1484
1502
|
/* @__PURE__ */ r(
|
|
1485
1503
|
Xe,
|
|
1486
1504
|
{
|
|
1487
|
-
className:
|
|
1505
|
+
className: c(
|
|
1488
1506
|
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
|
|
1489
1507
|
"h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
|
|
1490
|
-
|
|
1508
|
+
E ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
|
|
1491
1509
|
),
|
|
1492
1510
|
children: [
|
|
1493
|
-
/* @__PURE__ */ e(
|
|
1494
|
-
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children:
|
|
1511
|
+
/* @__PURE__ */ e(Yt, { className: "size-4" }),
|
|
1512
|
+
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: V?.label ?? M.calendarView }),
|
|
1495
1513
|
/* @__PURE__ */ e(Ye, { className: "size-3 opacity-60" })
|
|
1496
1514
|
]
|
|
1497
1515
|
}
|
|
1498
1516
|
),
|
|
1499
|
-
/* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children:
|
|
1500
|
-
const
|
|
1517
|
+
/* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: W.map((m) => {
|
|
1518
|
+
const _ = m.icon;
|
|
1501
1519
|
return /* @__PURE__ */ r(
|
|
1502
|
-
|
|
1520
|
+
Ie,
|
|
1503
1521
|
{
|
|
1504
|
-
onClick: () => x(
|
|
1505
|
-
className:
|
|
1522
|
+
onClick: () => x(m.value),
|
|
1523
|
+
className: c(
|
|
1506
1524
|
"gap-2",
|
|
1507
|
-
n ===
|
|
1525
|
+
n === m.value && "bg-accent"
|
|
1508
1526
|
),
|
|
1509
1527
|
children: [
|
|
1510
|
-
/* @__PURE__ */ e(
|
|
1511
|
-
/* @__PURE__ */ e("span", { children:
|
|
1528
|
+
/* @__PURE__ */ e(_, { className: "size-4" }),
|
|
1529
|
+
/* @__PURE__ */ e("span", { children: m.label })
|
|
1512
1530
|
]
|
|
1513
1531
|
},
|
|
1514
|
-
|
|
1532
|
+
m.value
|
|
1515
1533
|
);
|
|
1516
1534
|
}) })
|
|
1517
1535
|
] }),
|
|
@@ -1519,45 +1537,45 @@ function Cn({
|
|
|
1519
1537
|
/* @__PURE__ */ r(
|
|
1520
1538
|
Xe,
|
|
1521
1539
|
{
|
|
1522
|
-
className:
|
|
1540
|
+
className: c(
|
|
1523
1541
|
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
|
|
1524
1542
|
"h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
|
|
1525
|
-
|
|
1543
|
+
B ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-white hover:bg-zinc-50 hover:text-accent-foreground"
|
|
1526
1544
|
),
|
|
1527
1545
|
children: [
|
|
1528
1546
|
/* @__PURE__ */ e(he, { className: "size-4" }),
|
|
1529
|
-
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: D?.label ??
|
|
1547
|
+
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: D?.label ?? M.resourceView }),
|
|
1530
1548
|
/* @__PURE__ */ e(Ye, { className: "size-3 opacity-60" })
|
|
1531
1549
|
]
|
|
1532
1550
|
}
|
|
1533
1551
|
),
|
|
1534
|
-
/* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: Ze.map((
|
|
1535
|
-
const
|
|
1552
|
+
/* @__PURE__ */ e(_e, { align: "start", className: "min-w-[120px]", children: Ze.map((m) => {
|
|
1553
|
+
const _ = m.icon;
|
|
1536
1554
|
return /* @__PURE__ */ r(
|
|
1537
|
-
|
|
1555
|
+
Ie,
|
|
1538
1556
|
{
|
|
1539
|
-
onClick: () => x(
|
|
1540
|
-
className:
|
|
1557
|
+
onClick: () => x(m.value),
|
|
1558
|
+
className: c(
|
|
1541
1559
|
"gap-2",
|
|
1542
|
-
n ===
|
|
1560
|
+
n === m.value && "bg-accent"
|
|
1543
1561
|
),
|
|
1544
1562
|
children: [
|
|
1545
|
-
/* @__PURE__ */ e(
|
|
1546
|
-
/* @__PURE__ */ e("span", { children:
|
|
1563
|
+
/* @__PURE__ */ e(_, { className: "size-4" }),
|
|
1564
|
+
/* @__PURE__ */ e("span", { children: m.label })
|
|
1547
1565
|
]
|
|
1548
1566
|
},
|
|
1549
|
-
|
|
1567
|
+
m.value
|
|
1550
1568
|
);
|
|
1551
1569
|
}) })
|
|
1552
1570
|
] }),
|
|
1553
|
-
g &&
|
|
1554
|
-
/* @__PURE__ */ e(
|
|
1571
|
+
g && h && /* @__PURE__ */ r(oe, { children: [
|
|
1572
|
+
/* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1555
1573
|
me,
|
|
1556
1574
|
{
|
|
1557
1575
|
variant: "outline",
|
|
1558
1576
|
size: "icon",
|
|
1559
1577
|
className: "min-w-10 min-h-10 shrink-0 mx-0",
|
|
1560
|
-
children: /* @__PURE__ */ e(
|
|
1578
|
+
children: /* @__PURE__ */ e(Jt, { className: "size-4 sm:size-5" })
|
|
1561
1579
|
}
|
|
1562
1580
|
) }),
|
|
1563
1581
|
/* @__PURE__ */ e(
|
|
@@ -1566,19 +1584,19 @@ function Cn({
|
|
|
1566
1584
|
className: "w-auto min-w-80 p-0",
|
|
1567
1585
|
align: "end",
|
|
1568
1586
|
sideOffset: 8,
|
|
1569
|
-
children: /* @__PURE__ */ e("div", { className: "max-h-[70vh] overflow-y-auto p-4 space-y-6", children:
|
|
1587
|
+
children: /* @__PURE__ */ e("div", { className: "max-h-[70vh] overflow-y-auto p-4 space-y-6", children: h })
|
|
1570
1588
|
}
|
|
1571
1589
|
)
|
|
1572
1590
|
] }),
|
|
1573
|
-
|
|
1574
|
-
|
|
1591
|
+
v,
|
|
1592
|
+
N && /* @__PURE__ */ r(
|
|
1575
1593
|
me,
|
|
1576
1594
|
{
|
|
1577
1595
|
className: "hidden lg:flex shrink-0 max-h-10",
|
|
1578
|
-
onClick:
|
|
1596
|
+
onClick: N,
|
|
1579
1597
|
children: [
|
|
1580
1598
|
/* @__PURE__ */ e(Je, { className: "size-4" }),
|
|
1581
|
-
|
|
1599
|
+
M.addEvent
|
|
1582
1600
|
]
|
|
1583
1601
|
}
|
|
1584
1602
|
)
|
|
@@ -1587,7 +1605,7 @@ function Cn({
|
|
|
1587
1605
|
u && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 pb-1 -mb-1 scrollbar-none", children: u })
|
|
1588
1606
|
] });
|
|
1589
1607
|
}
|
|
1590
|
-
function
|
|
1608
|
+
function Mn({
|
|
1591
1609
|
events: t,
|
|
1592
1610
|
date: n,
|
|
1593
1611
|
daysAhead: o = 60,
|
|
@@ -1596,28 +1614,28 @@ function Sn({
|
|
|
1596
1614
|
className: f,
|
|
1597
1615
|
renderEvent: s,
|
|
1598
1616
|
renderPopover: x,
|
|
1599
|
-
slots:
|
|
1617
|
+
slots: N,
|
|
1600
1618
|
classNames: l
|
|
1601
1619
|
}) {
|
|
1602
|
-
const y =
|
|
1603
|
-
const
|
|
1604
|
-
|
|
1605
|
-
const g = new Date(
|
|
1606
|
-
return g.setDate(g.getDate() + o), t.filter((u) => u.endDate >=
|
|
1607
|
-
}, [t, o, n]), w =
|
|
1608
|
-
const
|
|
1609
|
-
for (const [u,
|
|
1620
|
+
const y = q(() => {
|
|
1621
|
+
const h = new Date(n);
|
|
1622
|
+
h.setHours(0, 0, 0, 0);
|
|
1623
|
+
const g = new Date(h);
|
|
1624
|
+
return g.setDate(g.getDate() + o), t.filter((u) => u.endDate >= h && u.startDate <= g);
|
|
1625
|
+
}, [t, o, n]), w = q(() => {
|
|
1626
|
+
const h = bt(y), g = [];
|
|
1627
|
+
for (const [u, v] of h)
|
|
1610
1628
|
g.push({
|
|
1611
1629
|
date: new Date(u),
|
|
1612
1630
|
dateKey: u,
|
|
1613
|
-
events:
|
|
1631
|
+
events: v
|
|
1614
1632
|
});
|
|
1615
|
-
return g.sort((u,
|
|
1633
|
+
return g.sort((u, v) => u.date.getTime() - v.date.getTime()), g;
|
|
1616
1634
|
}, [y]);
|
|
1617
|
-
return w.length === 0 ? /* @__PURE__ */ e("div", { className:
|
|
1635
|
+
return w.length === 0 ? /* @__PURE__ */ e("div", { className: c("flex flex-col items-center justify-center h-full py-12", f), children: /* @__PURE__ */ r("div", { className: "text-center", children: [
|
|
1618
1636
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "No events found" }),
|
|
1619
1637
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground/70", children: "No events scheduled for this period" })
|
|
1620
|
-
] }) }) : /* @__PURE__ */ r("div", { className:
|
|
1638
|
+
] }) }) : /* @__PURE__ */ r("div", { className: c("flex flex-col h-full overflow-auto", l?.agendaList, f), children: [
|
|
1621
1639
|
/* @__PURE__ */ e("div", { className: "sticky top-0 z-10 bg-background border-b px-4 py-3", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-between", children: [
|
|
1622
1640
|
/* @__PURE__ */ e("h2", { className: "text-lg font-medium", children: "Schedule" }),
|
|
1623
1641
|
/* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
|
|
@@ -1626,13 +1644,13 @@ function Sn({
|
|
|
1626
1644
|
y.length !== 1 ? "s" : ""
|
|
1627
1645
|
] })
|
|
1628
1646
|
] }) }),
|
|
1629
|
-
/* @__PURE__ */ e("div", { className: "flex-1", children: w.map(({ date:
|
|
1630
|
-
const
|
|
1631
|
-
return /* @__PURE__ */ r("div", { className:
|
|
1647
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: w.map(({ date: h, dateKey: g, events: u }) => {
|
|
1648
|
+
const v = ce(h), b = h.toLocaleDateString([], { weekday: "short" }), z = h.getDate(), L = h.toLocaleDateString([], { month: "short" });
|
|
1649
|
+
return /* @__PURE__ */ r("div", { className: c("", l?.agendaDayGroup), children: [
|
|
1632
1650
|
/* @__PURE__ */ e(
|
|
1633
1651
|
"div",
|
|
1634
1652
|
{
|
|
1635
|
-
className:
|
|
1653
|
+
className: c(
|
|
1636
1654
|
"sticky top-[52px] z-10 bg-background px-4 py-3 border-b",
|
|
1637
1655
|
l?.agendaDayHeader
|
|
1638
1656
|
),
|
|
@@ -1641,38 +1659,38 @@ function Sn({
|
|
|
1641
1659
|
/* @__PURE__ */ e(
|
|
1642
1660
|
"span",
|
|
1643
1661
|
{
|
|
1644
|
-
className:
|
|
1662
|
+
className: c(
|
|
1645
1663
|
"text-[11px] font-medium uppercase tracking-wide",
|
|
1646
|
-
|
|
1664
|
+
v ? "text-primary" : "text-muted-foreground"
|
|
1647
1665
|
),
|
|
1648
|
-
children:
|
|
1666
|
+
children: b
|
|
1649
1667
|
}
|
|
1650
1668
|
),
|
|
1651
1669
|
/* @__PURE__ */ e(
|
|
1652
1670
|
"span",
|
|
1653
1671
|
{
|
|
1654
|
-
className:
|
|
1672
|
+
className: c(
|
|
1655
1673
|
"flex items-center justify-center rounded-full mt-0.5",
|
|
1656
1674
|
"size-10 text-xl font-normal",
|
|
1657
|
-
|
|
1675
|
+
v ? "bg-primary text-primary-foreground" : "text-foreground"
|
|
1658
1676
|
),
|
|
1659
|
-
children:
|
|
1677
|
+
children: z
|
|
1660
1678
|
}
|
|
1661
1679
|
)
|
|
1662
1680
|
] }),
|
|
1663
1681
|
/* @__PURE__ */ r("span", { className: "text-sm text-muted-foreground", children: [
|
|
1664
|
-
|
|
1682
|
+
L,
|
|
1665
1683
|
" ",
|
|
1666
|
-
|
|
1684
|
+
h.getFullYear()
|
|
1667
1685
|
] })
|
|
1668
1686
|
] })
|
|
1669
1687
|
}
|
|
1670
1688
|
),
|
|
1671
1689
|
/* @__PURE__ */ e("div", { className: "px-4 py-3 space-y-2 border-b last:border-b-0", children: u.map(
|
|
1672
|
-
(
|
|
1673
|
-
|
|
1690
|
+
(M) => s ? /* @__PURE__ */ e("div", { children: s({ event: M, variant: "full" }) }, M.id) : /* @__PURE__ */ e(
|
|
1691
|
+
Me,
|
|
1674
1692
|
{
|
|
1675
|
-
event:
|
|
1693
|
+
event: M,
|
|
1676
1694
|
variant: "full",
|
|
1677
1695
|
badgeVariant: a,
|
|
1678
1696
|
onClick: i,
|
|
@@ -1683,15 +1701,15 @@ function Sn({
|
|
|
1683
1701
|
showParticipants: !0,
|
|
1684
1702
|
...l?.eventCard && { className: l.eventCard }
|
|
1685
1703
|
},
|
|
1686
|
-
|
|
1704
|
+
M.id
|
|
1687
1705
|
)
|
|
1688
1706
|
) })
|
|
1689
1707
|
] }, g);
|
|
1690
1708
|
}) })
|
|
1691
1709
|
] });
|
|
1692
1710
|
}
|
|
1693
|
-
const
|
|
1694
|
-
function
|
|
1711
|
+
const ve = 360, Ne = 480, We = 280;
|
|
1712
|
+
function on({
|
|
1695
1713
|
isOpen: t,
|
|
1696
1714
|
onClose: n,
|
|
1697
1715
|
date: o,
|
|
@@ -1700,52 +1718,52 @@ function rn({
|
|
|
1700
1718
|
badgeVariant: f = "colored",
|
|
1701
1719
|
onEventClick: s,
|
|
1702
1720
|
renderEvent: x,
|
|
1703
|
-
renderPopover:
|
|
1721
|
+
renderPopover: N,
|
|
1704
1722
|
className: l
|
|
1705
1723
|
}) {
|
|
1706
|
-
const y =
|
|
1707
|
-
() => [...a].sort((
|
|
1724
|
+
const y = ne(null), w = ne(null), [h, g] = Y("closed"), u = q(
|
|
1725
|
+
() => [...a].sort((T, A) => T.startDate.getTime() - A.startDate.getTime()),
|
|
1708
1726
|
[a]
|
|
1709
|
-
),
|
|
1710
|
-
if (!i) return { top: 0, left: 0, width:
|
|
1711
|
-
const
|
|
1712
|
-
let
|
|
1713
|
-
|
|
1714
|
-
const
|
|
1715
|
-
let
|
|
1716
|
-
return
|
|
1727
|
+
), v = q(() => {
|
|
1728
|
+
if (!i) return { top: 0, left: 0, width: ve, maxHeight: Ne };
|
|
1729
|
+
const T = typeof window < "u" ? window.innerWidth : 1200, A = typeof window < "u" ? window.innerHeight : 800;
|
|
1730
|
+
let E = i.left + i.width / 2 - ve / 2;
|
|
1731
|
+
E = Math.max(16, Math.min(E, T - ve - 16));
|
|
1732
|
+
const B = Math.min(a.length * 68 + 80, Ne);
|
|
1733
|
+
let W = i.top + i.height / 2 - B / 2;
|
|
1734
|
+
return W = Math.max(16, Math.min(W, A - B - 16)), { top: W, left: E, width: ve, maxHeight: Ne };
|
|
1717
1735
|
}, [i, a.length]);
|
|
1718
|
-
|
|
1736
|
+
$e(() => {
|
|
1719
1737
|
if (t && i)
|
|
1720
1738
|
g("entering"), requestAnimationFrame(() => {
|
|
1721
1739
|
requestAnimationFrame(() => {
|
|
1722
1740
|
g("open");
|
|
1723
1741
|
});
|
|
1724
1742
|
});
|
|
1725
|
-
else if (!t &&
|
|
1743
|
+
else if (!t && h === "open") {
|
|
1726
1744
|
g("exiting");
|
|
1727
|
-
const
|
|
1745
|
+
const T = setTimeout(() => {
|
|
1728
1746
|
g("closed");
|
|
1729
|
-
},
|
|
1730
|
-
return () => clearTimeout(
|
|
1747
|
+
}, We);
|
|
1748
|
+
return () => clearTimeout(T);
|
|
1731
1749
|
}
|
|
1732
|
-
}, [t, i]),
|
|
1733
|
-
if (
|
|
1734
|
-
const
|
|
1750
|
+
}, [t, i]), be(() => {
|
|
1751
|
+
if (h === "closed") return;
|
|
1752
|
+
const T = (A) => {
|
|
1735
1753
|
A.key === "Escape" && (A.stopPropagation(), n());
|
|
1736
1754
|
};
|
|
1737
|
-
return document.addEventListener("keydown",
|
|
1738
|
-
}, [
|
|
1739
|
-
|
|
1740
|
-
}, [
|
|
1741
|
-
const
|
|
1742
|
-
(
|
|
1743
|
-
|
|
1755
|
+
return document.addEventListener("keydown", T), () => document.removeEventListener("keydown", T);
|
|
1756
|
+
}, [h, n]), be(() => {
|
|
1757
|
+
h === "open" && w.current && w.current.focus();
|
|
1758
|
+
}, [h]);
|
|
1759
|
+
const b = S(
|
|
1760
|
+
(T) => {
|
|
1761
|
+
T.target === y.current && n();
|
|
1744
1762
|
},
|
|
1745
1763
|
[n]
|
|
1746
1764
|
);
|
|
1747
|
-
if (
|
|
1748
|
-
const
|
|
1765
|
+
if (h === "closed") return null;
|
|
1766
|
+
const z = h === "entering" || h === "exiting", L = z && i ? {
|
|
1749
1767
|
// Collapsed state: match the day cell exactly
|
|
1750
1768
|
position: "fixed",
|
|
1751
1769
|
top: i.top,
|
|
@@ -1753,39 +1771,39 @@ function rn({
|
|
|
1753
1771
|
width: i.width,
|
|
1754
1772
|
height: i.height,
|
|
1755
1773
|
maxHeight: i.height,
|
|
1756
|
-
opacity:
|
|
1774
|
+
opacity: h === "entering" ? 0.7 : 0,
|
|
1757
1775
|
transform: "scale(1)",
|
|
1758
1776
|
borderRadius: "8px"
|
|
1759
1777
|
} : {
|
|
1760
1778
|
// Expanded state: full panel
|
|
1761
1779
|
position: "fixed",
|
|
1762
|
-
top:
|
|
1763
|
-
left:
|
|
1764
|
-
width:
|
|
1765
|
-
maxHeight:
|
|
1780
|
+
top: v.top,
|
|
1781
|
+
left: v.left,
|
|
1782
|
+
width: v.width,
|
|
1783
|
+
maxHeight: v.maxHeight,
|
|
1766
1784
|
opacity: 1,
|
|
1767
1785
|
transform: "scale(1)",
|
|
1768
1786
|
borderRadius: "12px"
|
|
1769
|
-
},
|
|
1787
|
+
}, M = z ? 0 : 1, $ = o.toLocaleDateString(void 0, {
|
|
1770
1788
|
weekday: "long",
|
|
1771
1789
|
month: "long",
|
|
1772
1790
|
day: "numeric"
|
|
1773
1791
|
});
|
|
1774
|
-
return /* @__PURE__ */ r(
|
|
1792
|
+
return /* @__PURE__ */ r(ft, { children: [
|
|
1775
1793
|
/* @__PURE__ */ e(
|
|
1776
1794
|
"div",
|
|
1777
1795
|
{
|
|
1778
1796
|
ref: y,
|
|
1779
1797
|
role: "presentation",
|
|
1780
|
-
onClick:
|
|
1798
|
+
onClick: b,
|
|
1781
1799
|
className: "ic-expansion-backdrop",
|
|
1782
1800
|
style: {
|
|
1783
1801
|
position: "fixed",
|
|
1784
1802
|
inset: 0,
|
|
1785
1803
|
zIndex: 50,
|
|
1786
1804
|
backgroundColor: "rgba(0, 0, 0, 0.2)",
|
|
1787
|
-
opacity:
|
|
1788
|
-
transition: `opacity ${
|
|
1805
|
+
opacity: M,
|
|
1806
|
+
transition: `opacity ${We}ms cubic-bezier(0.32, 0.72, 0, 1)`
|
|
1789
1807
|
}
|
|
1790
1808
|
}
|
|
1791
1809
|
),
|
|
@@ -1795,24 +1813,24 @@ function rn({
|
|
|
1795
1813
|
ref: w,
|
|
1796
1814
|
role: "dialog",
|
|
1797
1815
|
"aria-modal": "true",
|
|
1798
|
-
"aria-label": `Events for ${
|
|
1816
|
+
"aria-label": `Events for ${$}`,
|
|
1799
1817
|
tabIndex: -1,
|
|
1800
|
-
className:
|
|
1818
|
+
className: c(
|
|
1801
1819
|
"ic-expansion-panel",
|
|
1802
1820
|
"bg-background border border-border shadow-2xl overflow-hidden",
|
|
1803
1821
|
"focus:outline-none",
|
|
1804
1822
|
l
|
|
1805
1823
|
),
|
|
1806
1824
|
style: {
|
|
1807
|
-
...
|
|
1825
|
+
...L,
|
|
1808
1826
|
zIndex: 51,
|
|
1809
|
-
transition: `all ${
|
|
1827
|
+
transition: `all ${We}ms cubic-bezier(0.32, 0.72, 0, 1)`,
|
|
1810
1828
|
willChange: "top, left, width, height, max-height, opacity, border-radius"
|
|
1811
1829
|
},
|
|
1812
1830
|
children: [
|
|
1813
1831
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between px-4 py-3 border-b bg-muted/30", children: [
|
|
1814
1832
|
/* @__PURE__ */ r("div", { className: "flex flex-col", children: [
|
|
1815
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-semibold text-foreground", children:
|
|
1833
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-semibold text-foreground", children: $ }),
|
|
1816
1834
|
/* @__PURE__ */ r("span", { className: "text-xs text-muted-foreground", children: [
|
|
1817
1835
|
a.length,
|
|
1818
1836
|
" event",
|
|
@@ -1850,28 +1868,28 @@ function rn({
|
|
|
1850
1868
|
"div",
|
|
1851
1869
|
{
|
|
1852
1870
|
className: "overflow-y-auto px-3 py-2 space-y-1.5",
|
|
1853
|
-
style: { maxHeight: `${
|
|
1871
|
+
style: { maxHeight: `${Ne - 64}px` },
|
|
1854
1872
|
children: [
|
|
1855
|
-
u.map((
|
|
1873
|
+
u.map((T) => /* @__PURE__ */ e(
|
|
1856
1874
|
"div",
|
|
1857
1875
|
{
|
|
1858
1876
|
onPointerDown: (A) => A.stopPropagation(),
|
|
1859
|
-
children: x ? x({ event:
|
|
1860
|
-
|
|
1877
|
+
children: x ? x({ event: T, variant: "compact" }) : /* @__PURE__ */ e(
|
|
1878
|
+
Me,
|
|
1861
1879
|
{
|
|
1862
|
-
event:
|
|
1880
|
+
event: T,
|
|
1863
1881
|
variant: "compact",
|
|
1864
1882
|
badgeVariant: f,
|
|
1865
1883
|
onClick: (A) => {
|
|
1866
1884
|
n(), s?.(A);
|
|
1867
1885
|
},
|
|
1868
|
-
disablePopover: !!s && !
|
|
1869
|
-
renderPopover:
|
|
1886
|
+
disablePopover: !!s && !N,
|
|
1887
|
+
renderPopover: N,
|
|
1870
1888
|
showTime: !0
|
|
1871
1889
|
}
|
|
1872
1890
|
)
|
|
1873
1891
|
},
|
|
1874
|
-
|
|
1892
|
+
T.id
|
|
1875
1893
|
)),
|
|
1876
1894
|
a.length === 0 && /* @__PURE__ */ e("div", { className: "py-6 text-center text-sm text-muted-foreground", children: "No events" })
|
|
1877
1895
|
]
|
|
@@ -1882,24 +1900,24 @@ function rn({
|
|
|
1882
1900
|
)
|
|
1883
1901
|
] });
|
|
1884
1902
|
}
|
|
1885
|
-
function
|
|
1903
|
+
function an({
|
|
1886
1904
|
event: t,
|
|
1887
1905
|
date: n,
|
|
1888
1906
|
onEventClick: o,
|
|
1889
1907
|
disablePopover: a,
|
|
1890
1908
|
renderPopover: i
|
|
1891
1909
|
}) {
|
|
1892
|
-
const [f, s] =
|
|
1910
|
+
const [f, s] = Y(!1), x = de(t.color), N = Ce(t), l = le(t.startDate, n), y = le(t.endDate, n), w = N && le(t.startDate, t.endDate), h = S(() => {
|
|
1893
1911
|
a && o ? o(t) : a || s(!0);
|
|
1894
|
-
}, [a, o, t]), g =
|
|
1912
|
+
}, [a, o, t]), g = S(() => {
|
|
1895
1913
|
s(!1);
|
|
1896
1914
|
}, []), u = /* @__PURE__ */ r(
|
|
1897
1915
|
"button",
|
|
1898
1916
|
{
|
|
1899
1917
|
type: "button",
|
|
1900
|
-
onClick:
|
|
1918
|
+
onClick: h,
|
|
1901
1919
|
title: X(t),
|
|
1902
|
-
className:
|
|
1920
|
+
className: c(
|
|
1903
1921
|
"inline-flex items-center gap-1 rounded px-1.5 py-0.5 text-[10px] font-medium transition-opacity hover:opacity-80",
|
|
1904
1922
|
"sm:px-2 sm:py-1 sm:text-xs",
|
|
1905
1923
|
x.bg,
|
|
@@ -1914,28 +1932,28 @@ function on({
|
|
|
1914
1932
|
w && /* @__PURE__ */ e("span", { className: "text-[9px] opacity-70 sm:text-[10px]", children: "All day" })
|
|
1915
1933
|
]
|
|
1916
1934
|
}
|
|
1917
|
-
),
|
|
1935
|
+
), v = /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
1918
1936
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
1919
1937
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t) })
|
|
1920
1938
|
] }) });
|
|
1921
1939
|
return a ? /* @__PURE__ */ r(ie, { children: [
|
|
1922
1940
|
/* @__PURE__ */ e(se, { asChild: !0, children: u }),
|
|
1923
|
-
|
|
1924
|
-
] }) : /* @__PURE__ */ r(
|
|
1925
|
-
/* @__PURE__ */ e(
|
|
1926
|
-
/* @__PURE__ */ e(Q, { className: "w-80", children: i ? i({ event: t, onClose: g }) : /* @__PURE__ */ e(
|
|
1941
|
+
v
|
|
1942
|
+
] }) : /* @__PURE__ */ r(oe, { open: f, onOpenChange: s, children: [
|
|
1943
|
+
/* @__PURE__ */ e(ae, { asChild: !0, children: u }),
|
|
1944
|
+
/* @__PURE__ */ e(Q, { className: "w-80", children: i ? i({ event: t, onClose: g }) : /* @__PURE__ */ e(sn, { event: t, onClose: g }) })
|
|
1927
1945
|
] });
|
|
1928
1946
|
}
|
|
1929
|
-
function
|
|
1947
|
+
function sn({
|
|
1930
1948
|
event: t,
|
|
1931
1949
|
onClose: n
|
|
1932
1950
|
}) {
|
|
1933
1951
|
const o = de(t.color), a = t.isCanceled ?? !1;
|
|
1934
1952
|
return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
|
|
1935
1953
|
/* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
|
|
1936
|
-
/* @__PURE__ */ e("div", { className:
|
|
1954
|
+
/* @__PURE__ */ e("div", { className: c("size-4 rounded shrink-0 mt-0.5", o.dot) }),
|
|
1937
1955
|
/* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: [
|
|
1938
|
-
/* @__PURE__ */ e("h3", { className:
|
|
1956
|
+
/* @__PURE__ */ e("h3", { className: c("font-semibold text-lg", a && "line-through opacity-50"), children: t.title }),
|
|
1939
1957
|
/* @__PURE__ */ e("div", { className: "flex items-center gap-1 text-sm text-muted-foreground mt-1 tabular-nums", children: X(t) })
|
|
1940
1958
|
] })
|
|
1941
1959
|
] }),
|
|
@@ -1955,7 +1973,7 @@ function an({
|
|
|
1955
1973
|
) })
|
|
1956
1974
|
] });
|
|
1957
1975
|
}
|
|
1958
|
-
function
|
|
1976
|
+
function ln({
|
|
1959
1977
|
events: t,
|
|
1960
1978
|
date: n,
|
|
1961
1979
|
onEventClick: o,
|
|
@@ -1964,13 +1982,13 @@ function sn({
|
|
|
1964
1982
|
className: f
|
|
1965
1983
|
}) {
|
|
1966
1984
|
if (t.length === 0) return null;
|
|
1967
|
-
const s = t.some((l) =>
|
|
1968
|
-
(l) => !le(l.startDate, l.endDate) ||
|
|
1969
|
-
),
|
|
1970
|
-
return /* @__PURE__ */ r("div", { className:
|
|
1971
|
-
/* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children:
|
|
1985
|
+
const s = t.some((l) => Ce(l) && le(l.startDate, l.endDate)), x = t.some(
|
|
1986
|
+
(l) => !le(l.startDate, l.endDate) || Ce(l) && !le(l.startDate, l.endDate)
|
|
1987
|
+
), N = s && x ? "All day / Multi-day" : s ? "All day" : "Multi-day";
|
|
1988
|
+
return /* @__PURE__ */ r("div", { className: c("border-b bg-muted/20 px-2 py-1.5 space-y-1", "sm:px-4 sm:py-2", f), children: [
|
|
1989
|
+
/* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: N }),
|
|
1972
1990
|
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((l) => /* @__PURE__ */ e(
|
|
1973
|
-
|
|
1991
|
+
an,
|
|
1974
1992
|
{
|
|
1975
1993
|
event: l,
|
|
1976
1994
|
date: n,
|
|
@@ -1982,8 +2000,8 @@ function sn({
|
|
|
1982
2000
|
)) })
|
|
1983
2001
|
] });
|
|
1984
2002
|
}
|
|
1985
|
-
const
|
|
1986
|
-
function
|
|
2003
|
+
const dn = 5;
|
|
2004
|
+
function mt({
|
|
1987
2005
|
slot: t,
|
|
1988
2006
|
onSelectionStart: n,
|
|
1989
2007
|
onSelectionMove: o,
|
|
@@ -1992,56 +2010,56 @@ function ut({
|
|
|
1992
2010
|
isSelecting: f = !1,
|
|
1993
2011
|
disabled: s = !1,
|
|
1994
2012
|
ariaLabel: x,
|
|
1995
|
-
children:
|
|
2013
|
+
children: N,
|
|
1996
2014
|
className: l,
|
|
1997
2015
|
height: y,
|
|
1998
2016
|
style: w,
|
|
1999
|
-
dataAttributes:
|
|
2017
|
+
dataAttributes: h
|
|
2000
2018
|
}) {
|
|
2001
|
-
const g =
|
|
2019
|
+
const g = ne(null), u = ne(!1), v = ne(!1), b = ne(null), [z, L] = Y(!1), M = Re(), $ = S(
|
|
2002
2020
|
(D) => {
|
|
2003
|
-
s || D.button !== 0 && D.pointerType === "mouse" || (D.preventDefault(), g.current = { x: D.clientX, y: D.clientY }, u.current = !1,
|
|
2021
|
+
s || D.button !== 0 && D.pointerType === "mouse" || (D.preventDefault(), g.current = { x: D.clientX, y: D.clientY }, u.current = !1, v.current = !0, n?.(t));
|
|
2004
2022
|
},
|
|
2005
2023
|
[s, t, n]
|
|
2006
|
-
),
|
|
2024
|
+
), T = S(
|
|
2007
2025
|
(D) => {
|
|
2008
|
-
if (!(g.current &&
|
|
2009
|
-
const
|
|
2010
|
-
Math.sqrt(
|
|
2026
|
+
if (!(g.current && v.current && !s)) return;
|
|
2027
|
+
const m = D.clientX - g.current.x, _ = D.clientY - g.current.y;
|
|
2028
|
+
Math.sqrt(m * m + _ * _) >= dn && (u.current = !0);
|
|
2011
2029
|
},
|
|
2012
2030
|
[s]
|
|
2013
|
-
), A =
|
|
2031
|
+
), A = S(
|
|
2014
2032
|
(D) => {
|
|
2015
2033
|
s || (D.buttons > 0 || f) && o?.(t);
|
|
2016
2034
|
},
|
|
2017
2035
|
[s, f, t, o]
|
|
2018
|
-
),
|
|
2019
|
-
s || (a?.(), g.current = null, u.current = !1,
|
|
2020
|
-
}, [s, a]),
|
|
2036
|
+
), E = S(() => {
|
|
2037
|
+
s || (a?.(), g.current = null, u.current = !1, v.current = !1);
|
|
2038
|
+
}, [s, a]), B = S(
|
|
2021
2039
|
(D) => {
|
|
2022
|
-
if (!
|
|
2023
|
-
D.preventDefault(), D.dataTransfer.dropEffect = "move",
|
|
2024
|
-
const
|
|
2025
|
-
|
|
2040
|
+
if (!M?.isDragging || s) return;
|
|
2041
|
+
D.preventDefault(), D.dataTransfer.dropEffect = "move", L(!0);
|
|
2042
|
+
const m = /* @__PURE__ */ new Date(), _ = t.hour ?? m.getHours(), I = t.minute ?? (m.getMinutes() >= 30 ? 30 : 0);
|
|
2043
|
+
M.updateDragPreview?.(t.date, _, I);
|
|
2026
2044
|
},
|
|
2027
|
-
[
|
|
2028
|
-
),
|
|
2029
|
-
|
|
2030
|
-
}, []),
|
|
2045
|
+
[M, s, t]
|
|
2046
|
+
), W = S(() => {
|
|
2047
|
+
L(!1);
|
|
2048
|
+
}, []), V = S(
|
|
2031
2049
|
(D) => {
|
|
2032
|
-
D.preventDefault(),
|
|
2050
|
+
D.preventDefault(), L(!1), !(!M?.isDragging || s) && M.endDrag?.();
|
|
2033
2051
|
},
|
|
2034
|
-
[
|
|
2052
|
+
[M, s]
|
|
2035
2053
|
);
|
|
2036
|
-
|
|
2054
|
+
be(() => {
|
|
2037
2055
|
const D = () => {
|
|
2038
|
-
|
|
2056
|
+
v.current && (v.current = !1, g.current = null, u.current = !1);
|
|
2039
2057
|
};
|
|
2040
2058
|
return window.addEventListener("pointerup", D), window.addEventListener("pointercancel", D), () => {
|
|
2041
2059
|
window.removeEventListener("pointerup", D), window.removeEventListener("pointercancel", D);
|
|
2042
2060
|
};
|
|
2043
2061
|
}, []);
|
|
2044
|
-
const
|
|
2062
|
+
const R = S(
|
|
2045
2063
|
(D) => {
|
|
2046
2064
|
s || (D.key === "Enter" || D.key === " ") && (D.preventDefault(), n?.(t), a?.());
|
|
2047
2065
|
},
|
|
@@ -2050,21 +2068,21 @@ function ut({
|
|
|
2050
2068
|
return /* @__PURE__ */ e(
|
|
2051
2069
|
"button",
|
|
2052
2070
|
{
|
|
2053
|
-
ref:
|
|
2071
|
+
ref: b,
|
|
2054
2072
|
type: "button",
|
|
2055
2073
|
"aria-label": x,
|
|
2056
2074
|
"aria-disabled": s,
|
|
2057
2075
|
"aria-pressed": i,
|
|
2058
2076
|
disabled: s,
|
|
2059
|
-
onPointerDown:
|
|
2060
|
-
onPointerMove:
|
|
2061
|
-
onPointerUp:
|
|
2077
|
+
onPointerDown: $,
|
|
2078
|
+
onPointerMove: T,
|
|
2079
|
+
onPointerUp: E,
|
|
2062
2080
|
onPointerEnter: A,
|
|
2063
|
-
onKeyDown:
|
|
2064
|
-
onDragOver:
|
|
2065
|
-
onDragLeave:
|
|
2066
|
-
onDrop:
|
|
2067
|
-
className:
|
|
2081
|
+
onKeyDown: R,
|
|
2082
|
+
onDragOver: B,
|
|
2083
|
+
onDragLeave: W,
|
|
2084
|
+
onDrop: V,
|
|
2085
|
+
className: c(
|
|
2068
2086
|
"select-none touch-none cursor-pointer transition-colors",
|
|
2069
2087
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-inset",
|
|
2070
2088
|
// Hover state (only when not in selection)
|
|
@@ -2072,18 +2090,18 @@ function ut({
|
|
|
2072
2090
|
// Selection state — blue tint matching the primary color
|
|
2073
2091
|
i && "bg-blue-100/70",
|
|
2074
2092
|
// Drag over state - visual feedback when event is dragged over
|
|
2075
|
-
|
|
2093
|
+
z && "bg-primary/20 ring-2 ring-primary ring-inset",
|
|
2076
2094
|
// Disabled state
|
|
2077
2095
|
s && "cursor-not-allowed opacity-50",
|
|
2078
2096
|
l
|
|
2079
2097
|
),
|
|
2080
2098
|
style: { height: y, ...w },
|
|
2081
|
-
...
|
|
2082
|
-
children:
|
|
2099
|
+
...h,
|
|
2100
|
+
children: N
|
|
2083
2101
|
}
|
|
2084
2102
|
);
|
|
2085
2103
|
}
|
|
2086
|
-
function
|
|
2104
|
+
function ht({
|
|
2087
2105
|
slot: t,
|
|
2088
2106
|
date: n,
|
|
2089
2107
|
hour: o,
|
|
@@ -2092,14 +2110,14 @@ function mt({
|
|
|
2092
2110
|
...f
|
|
2093
2111
|
}) {
|
|
2094
2112
|
const s = t ?? { date: n, hour: o ?? 0, minute: a ?? 0 }, x = i ?? `Add event at ${(s.hour ?? 0).toString().padStart(2, "0")}:${(s.minute ?? 0).toString().padStart(2, "0")} on ${s.date.toLocaleDateString()}`;
|
|
2095
|
-
return /* @__PURE__ */ e(
|
|
2113
|
+
return /* @__PURE__ */ e(mt, { slot: s, ariaLabel: x, ...f });
|
|
2096
2114
|
}
|
|
2097
|
-
function
|
|
2115
|
+
function cn({ slot: t, date: n, ariaLabel: o, ...a }) {
|
|
2098
2116
|
const i = t ?? { date: n }, f = o ?? `Select ${i.date.toLocaleDateString()}`;
|
|
2099
|
-
return /* @__PURE__ */ e(
|
|
2117
|
+
return /* @__PURE__ */ e(mt, { slot: i, ariaLabel: f, ...a });
|
|
2100
2118
|
}
|
|
2101
|
-
const fe = 96,
|
|
2102
|
-
function
|
|
2119
|
+
const fe = 96, Le = 72, Ae = 80;
|
|
2120
|
+
function Tn({
|
|
2103
2121
|
events: t,
|
|
2104
2122
|
date: n,
|
|
2105
2123
|
visibleHours: o = { startHour: 0, endHour: 24 },
|
|
@@ -2108,38 +2126,38 @@ function Mn({
|
|
|
2108
2126
|
badgeVariant: f = "colored",
|
|
2109
2127
|
onEventClick: s,
|
|
2110
2128
|
onSlotSelect: x,
|
|
2111
|
-
className:
|
|
2129
|
+
className: N,
|
|
2112
2130
|
renderEvent: l,
|
|
2113
2131
|
renderPopover: y,
|
|
2114
2132
|
slots: w,
|
|
2115
|
-
classNames:
|
|
2133
|
+
classNames: h
|
|
2116
2134
|
}) {
|
|
2117
|
-
const g = 60 / i, u = 100 / g,
|
|
2135
|
+
const g = 60 / i, u = 100 / g, v = q(() => {
|
|
2118
2136
|
const k = [];
|
|
2119
|
-
for (let
|
|
2120
|
-
k.push(
|
|
2137
|
+
for (let d = 0; d < g; d++)
|
|
2138
|
+
k.push(d * i);
|
|
2121
2139
|
return k;
|
|
2122
|
-
}, [g, i]),
|
|
2123
|
-
const k = rt(
|
|
2140
|
+
}, [g, i]), b = q(() => He(t, n), [t, n]), { singleDay: z, multiDay: L } = q(() => nt(b), [b]), M = q(() => {
|
|
2141
|
+
const k = rt(z, n, o, fe), d = /* @__PURE__ */ new Map();
|
|
2124
2142
|
for (const p of k)
|
|
2125
|
-
|
|
2126
|
-
return
|
|
2127
|
-
}, [
|
|
2143
|
+
d.set(p.event.id, p.position);
|
|
2144
|
+
return d;
|
|
2145
|
+
}, [z, n, o]), $ = q(() => ot(o), [o]), T = /* @__PURE__ */ new Date(), A = ce(n), E = q(() => {
|
|
2128
2146
|
if (!A) return 0;
|
|
2129
|
-
const k =
|
|
2147
|
+
const k = T.getHours() + T.getMinutes() / 60;
|
|
2130
2148
|
return k < o.startHour || k > o.endHour ? -1 : (k - o.startHour) * fe;
|
|
2131
|
-
}, [A, o,
|
|
2132
|
-
|
|
2133
|
-
const k =
|
|
2149
|
+
}, [A, o, T]), B = ne(null);
|
|
2150
|
+
$e(() => {
|
|
2151
|
+
const k = B.current;
|
|
2134
2152
|
if (!k) return;
|
|
2135
|
-
const
|
|
2153
|
+
const d = () => {
|
|
2136
2154
|
let p;
|
|
2137
2155
|
if (A) {
|
|
2138
|
-
const
|
|
2139
|
-
p = Math.max(
|
|
2156
|
+
const O = (/* @__PURE__ */ new Date()).getHours();
|
|
2157
|
+
p = Math.max(O - 1, o.startHour);
|
|
2140
2158
|
} else {
|
|
2141
|
-
const
|
|
2142
|
-
|
|
2159
|
+
const O = n.getDay(), j = a?.[O];
|
|
2160
|
+
j?.enabled && j.from > 0 ? p = Math.max(j.from - 1, o.startHour) : p = Math.max(7, o.startHour);
|
|
2143
2161
|
}
|
|
2144
2162
|
const C = (p - o.startHour) * fe;
|
|
2145
2163
|
k.scrollTo({
|
|
@@ -2148,142 +2166,142 @@ function Mn({
|
|
|
2148
2166
|
});
|
|
2149
2167
|
};
|
|
2150
2168
|
requestAnimationFrame(() => {
|
|
2151
|
-
requestAnimationFrame(
|
|
2169
|
+
requestAnimationFrame(d);
|
|
2152
2170
|
});
|
|
2153
2171
|
}, [n, a, o, A]);
|
|
2154
|
-
const
|
|
2172
|
+
const W = Oe(), V = S(
|
|
2155
2173
|
(k) => {
|
|
2156
|
-
|
|
2174
|
+
W?.startSelection(k);
|
|
2157
2175
|
},
|
|
2158
|
-
[
|
|
2159
|
-
),
|
|
2176
|
+
[W]
|
|
2177
|
+
), R = S(
|
|
2160
2178
|
(k) => {
|
|
2161
|
-
|
|
2179
|
+
W?.updateSelection(k);
|
|
2162
2180
|
},
|
|
2163
|
-
[
|
|
2164
|
-
), D =
|
|
2165
|
-
|
|
2166
|
-
}, [
|
|
2181
|
+
[W]
|
|
2182
|
+
), D = S(() => {
|
|
2183
|
+
W?.endSelection();
|
|
2184
|
+
}, [W]), m = S(
|
|
2167
2185
|
(k) => {
|
|
2168
2186
|
s?.(k);
|
|
2169
2187
|
},
|
|
2170
2188
|
[s]
|
|
2171
|
-
),
|
|
2172
|
-
return /* @__PURE__ */ r("div", { className:
|
|
2189
|
+
), _ = n.toLocaleDateString([], { weekday: "short" }), I = n.getDate(), G = ce(n);
|
|
2190
|
+
return /* @__PURE__ */ r("div", { className: c("flex flex-col h-full", N), children: [
|
|
2173
2191
|
/* @__PURE__ */ e(
|
|
2174
2192
|
"div",
|
|
2175
2193
|
{
|
|
2176
|
-
className:
|
|
2194
|
+
className: c(
|
|
2177
2195
|
"flex items-center gap-3 border-b px-4 py-3",
|
|
2178
|
-
|
|
2179
|
-
|
|
2196
|
+
h?.columnHeader,
|
|
2197
|
+
G && h?.columnHeaderToday
|
|
2180
2198
|
),
|
|
2181
2199
|
children: /* @__PURE__ */ r("div", { className: "flex flex-col items-center", children: [
|
|
2182
2200
|
/* @__PURE__ */ e(
|
|
2183
2201
|
"span",
|
|
2184
2202
|
{
|
|
2185
|
-
className:
|
|
2203
|
+
className: c(
|
|
2186
2204
|
"text-[11px] font-medium uppercase tracking-wide",
|
|
2187
|
-
|
|
2205
|
+
G ? "text-primary" : "text-muted-foreground"
|
|
2188
2206
|
),
|
|
2189
|
-
children:
|
|
2207
|
+
children: _
|
|
2190
2208
|
}
|
|
2191
2209
|
),
|
|
2192
2210
|
/* @__PURE__ */ e(
|
|
2193
2211
|
"span",
|
|
2194
2212
|
{
|
|
2195
|
-
className:
|
|
2213
|
+
className: c(
|
|
2196
2214
|
"flex items-center justify-center rounded-full mt-0.5",
|
|
2197
2215
|
"size-12 text-3xl font-normal",
|
|
2198
|
-
|
|
2216
|
+
G ? "bg-primary text-primary-foreground" : "text-foreground"
|
|
2199
2217
|
),
|
|
2200
|
-
children:
|
|
2218
|
+
children: I
|
|
2201
2219
|
}
|
|
2202
2220
|
)
|
|
2203
2221
|
] })
|
|
2204
2222
|
}
|
|
2205
2223
|
),
|
|
2206
|
-
|
|
2207
|
-
|
|
2224
|
+
L.length > 0 && /* @__PURE__ */ e(
|
|
2225
|
+
ln,
|
|
2208
2226
|
{
|
|
2209
|
-
events:
|
|
2227
|
+
events: L,
|
|
2210
2228
|
date: n,
|
|
2211
|
-
onEventClick:
|
|
2229
|
+
onEventClick: m,
|
|
2212
2230
|
disablePopover: !!s && !y,
|
|
2213
2231
|
renderPopover: y,
|
|
2214
|
-
...
|
|
2232
|
+
...h?.multiDayBanner && { className: h.multiDayBanner }
|
|
2215
2233
|
}
|
|
2216
2234
|
),
|
|
2217
2235
|
/* @__PURE__ */ e(
|
|
2218
2236
|
"div",
|
|
2219
2237
|
{
|
|
2220
|
-
ref:
|
|
2221
|
-
className:
|
|
2238
|
+
ref: B,
|
|
2239
|
+
className: c("flex-1", h?.scrollContainer),
|
|
2222
2240
|
children: /* @__PURE__ */ r("div", { className: "relative min-h-full", children: [
|
|
2223
|
-
|
|
2241
|
+
$.map((k, d) => {
|
|
2224
2242
|
const C = !at(n, k, a);
|
|
2225
2243
|
return /* @__PURE__ */ r(
|
|
2226
2244
|
"div",
|
|
2227
2245
|
{
|
|
2228
|
-
className:
|
|
2246
|
+
className: c(
|
|
2229
2247
|
"relative flex",
|
|
2230
2248
|
C && "bg-calendar-disabled-hour",
|
|
2231
|
-
|
|
2232
|
-
C ?
|
|
2249
|
+
h?.timeSlot,
|
|
2250
|
+
C ? h?.timeSlotNonWorking : h?.timeSlotWorking
|
|
2233
2251
|
),
|
|
2234
2252
|
style: { height: fe },
|
|
2235
2253
|
children: [
|
|
2236
2254
|
/* @__PURE__ */ e(
|
|
2237
2255
|
"div",
|
|
2238
2256
|
{
|
|
2239
|
-
className:
|
|
2257
|
+
className: c(
|
|
2240
2258
|
"relative flex-shrink-0 border-r border-border/50 bg-zinc-50 dark:bg-zinc-900",
|
|
2241
|
-
|
|
2259
|
+
h?.timeGutter
|
|
2242
2260
|
),
|
|
2243
|
-
style: { width:
|
|
2244
|
-
children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children:
|
|
2261
|
+
style: { width: Le },
|
|
2262
|
+
children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: d !== 0 && /* @__PURE__ */ e(
|
|
2245
2263
|
"span",
|
|
2246
2264
|
{
|
|
2247
|
-
className:
|
|
2265
|
+
className: c(
|
|
2248
2266
|
"text-[10px] sm:text-xs text-muted-foreground",
|
|
2249
|
-
|
|
2267
|
+
h?.timeGutterLabel
|
|
2250
2268
|
),
|
|
2251
|
-
children:
|
|
2269
|
+
children: Se(k)
|
|
2252
2270
|
}
|
|
2253
2271
|
) })
|
|
2254
2272
|
}
|
|
2255
2273
|
),
|
|
2256
2274
|
/* @__PURE__ */ r("div", { className: "relative flex-1", children: [
|
|
2257
2275
|
A && !C && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
|
|
2258
|
-
|
|
2259
|
-
|
|
2276
|
+
d !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
|
|
2277
|
+
v.slice(1).map((O) => /* @__PURE__ */ e(
|
|
2260
2278
|
"div",
|
|
2261
2279
|
{
|
|
2262
2280
|
className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
|
|
2263
|
-
style: { top: `${
|
|
2281
|
+
style: { top: `${O / 60 * 100}%` }
|
|
2264
2282
|
},
|
|
2265
|
-
|
|
2283
|
+
O
|
|
2266
2284
|
)),
|
|
2267
|
-
|
|
2268
|
-
const
|
|
2285
|
+
v.map((O, j) => {
|
|
2286
|
+
const H = { date: n, hour: k, minute: O };
|
|
2269
2287
|
return /* @__PURE__ */ e(
|
|
2270
|
-
|
|
2288
|
+
ht,
|
|
2271
2289
|
{
|
|
2272
|
-
slot:
|
|
2273
|
-
onSelectionStart:
|
|
2274
|
-
onSelectionMove:
|
|
2290
|
+
slot: H,
|
|
2291
|
+
onSelectionStart: V,
|
|
2292
|
+
onSelectionMove: R,
|
|
2275
2293
|
onSelectionEnd: D,
|
|
2276
|
-
isSelected:
|
|
2277
|
-
isSelecting:
|
|
2294
|
+
isSelected: W?.isSlotSelected(H) ?? !1,
|
|
2295
|
+
isSelecting: W?.isSelecting ?? !1,
|
|
2278
2296
|
disabled: C,
|
|
2279
2297
|
className: "absolute inset-x-0",
|
|
2280
2298
|
style: {
|
|
2281
|
-
top: `${
|
|
2299
|
+
top: `${j * u}%`,
|
|
2282
2300
|
height: `${u}%`
|
|
2283
2301
|
},
|
|
2284
|
-
ariaLabel: `Add event at ${
|
|
2302
|
+
ariaLabel: `Add event at ${Se(k)}:${String(O).padStart(2, "0")}`
|
|
2285
2303
|
},
|
|
2286
|
-
|
|
2304
|
+
O
|
|
2287
2305
|
);
|
|
2288
2306
|
})
|
|
2289
2307
|
] })
|
|
@@ -2296,56 +2314,56 @@ function Mn({
|
|
|
2296
2314
|
"div",
|
|
2297
2315
|
{
|
|
2298
2316
|
className: "absolute top-0 bottom-0 right-0 pointer-events-none",
|
|
2299
|
-
style: { left:
|
|
2300
|
-
children:
|
|
2301
|
-
const
|
|
2302
|
-
if (!
|
|
2303
|
-
const p = `calc(${
|
|
2317
|
+
style: { left: Le },
|
|
2318
|
+
children: z.map((k) => {
|
|
2319
|
+
const d = M.get(k.id);
|
|
2320
|
+
if (!d) return null;
|
|
2321
|
+
const p = `calc(${d.width}% - 2px)`, C = `max(${Ae}px, ${p})`;
|
|
2304
2322
|
return l ? /* @__PURE__ */ e(
|
|
2305
2323
|
"div",
|
|
2306
2324
|
{
|
|
2307
2325
|
className: "absolute pointer-events-auto p-0.5",
|
|
2308
2326
|
style: {
|
|
2309
|
-
top: `${
|
|
2310
|
-
left: `${
|
|
2327
|
+
top: `${d.top}px`,
|
|
2328
|
+
left: `${d.left}%`,
|
|
2311
2329
|
width: C,
|
|
2312
|
-
minWidth: `${
|
|
2330
|
+
minWidth: `${Ae}px`
|
|
2313
2331
|
},
|
|
2314
|
-
children: l({ event: k, position:
|
|
2332
|
+
children: l({ event: k, position: d })
|
|
2315
2333
|
},
|
|
2316
2334
|
k.id
|
|
2317
2335
|
) : /* @__PURE__ */ e(
|
|
2318
|
-
|
|
2336
|
+
dt,
|
|
2319
2337
|
{
|
|
2320
2338
|
event: k,
|
|
2321
2339
|
position: {
|
|
2322
|
-
top:
|
|
2323
|
-
left:
|
|
2324
|
-
width:
|
|
2325
|
-
minWidth:
|
|
2340
|
+
top: d.top,
|
|
2341
|
+
left: d.left,
|
|
2342
|
+
width: d.width,
|
|
2343
|
+
minWidth: Ae
|
|
2326
2344
|
},
|
|
2327
2345
|
hourHeight: fe,
|
|
2328
2346
|
badgeVariant: f,
|
|
2329
2347
|
onClick: s,
|
|
2330
2348
|
disablePopover: !!s && !y,
|
|
2331
2349
|
renderPopover: y,
|
|
2332
|
-
className:
|
|
2350
|
+
className: c("pointer-events-auto", h?.eventCard)
|
|
2333
2351
|
},
|
|
2334
2352
|
k.id
|
|
2335
2353
|
);
|
|
2336
2354
|
})
|
|
2337
2355
|
}
|
|
2338
2356
|
),
|
|
2339
|
-
A &&
|
|
2357
|
+
A && E >= 0 && /* @__PURE__ */ r(
|
|
2340
2358
|
"div",
|
|
2341
2359
|
{
|
|
2342
|
-
className:
|
|
2360
|
+
className: c(
|
|
2343
2361
|
"absolute left-0 right-0 z-20 flex items-center pointer-events-none",
|
|
2344
|
-
|
|
2362
|
+
h?.currentTimeIndicator
|
|
2345
2363
|
),
|
|
2346
2364
|
style: {
|
|
2347
|
-
top:
|
|
2348
|
-
left:
|
|
2365
|
+
top: E,
|
|
2366
|
+
left: Le
|
|
2349
2367
|
},
|
|
2350
2368
|
children: [
|
|
2351
2369
|
/* @__PURE__ */ e("div", { className: "h-2.5 w-2.5 -ml-1 rounded-full bg-red-500" }),
|
|
@@ -2358,7 +2376,7 @@ function Mn({
|
|
|
2358
2376
|
)
|
|
2359
2377
|
] });
|
|
2360
2378
|
}
|
|
2361
|
-
const
|
|
2379
|
+
const un = [
|
|
2362
2380
|
{ full: "Monday", short: "Mon", tiny: "M" },
|
|
2363
2381
|
{ full: "Tuesday", short: "Tue", tiny: "T" },
|
|
2364
2382
|
{ full: "Wednesday", short: "Wed", tiny: "W" },
|
|
@@ -2366,7 +2384,7 @@ const cn = [
|
|
|
2366
2384
|
{ full: "Friday", short: "Fri", tiny: "F" },
|
|
2367
2385
|
{ full: "Saturday", short: "Sat", tiny: "S" },
|
|
2368
2386
|
{ full: "Sunday", short: "Sun", tiny: "S" }
|
|
2369
|
-
],
|
|
2387
|
+
], mn = [
|
|
2370
2388
|
{ full: "Sunday", short: "Sun", tiny: "S" },
|
|
2371
2389
|
{ full: "Monday", short: "Mon", tiny: "M" },
|
|
2372
2390
|
{ full: "Tuesday", short: "Tue", tiny: "T" },
|
|
@@ -2375,7 +2393,7 @@ const cn = [
|
|
|
2375
2393
|
{ full: "Friday", short: "Fri", tiny: "F" },
|
|
2376
2394
|
{ full: "Saturday", short: "Sat", tiny: "S" }
|
|
2377
2395
|
], ge = 3;
|
|
2378
|
-
function
|
|
2396
|
+
function Wn({
|
|
2379
2397
|
events: t,
|
|
2380
2398
|
date: n,
|
|
2381
2399
|
weekStartsOn: o = 1,
|
|
@@ -2384,95 +2402,95 @@ function Tn({
|
|
|
2384
2402
|
onSlotSelect: f,
|
|
2385
2403
|
onDayClick: s,
|
|
2386
2404
|
className: x,
|
|
2387
|
-
renderEvent:
|
|
2405
|
+
renderEvent: N,
|
|
2388
2406
|
renderPopover: l,
|
|
2389
2407
|
showMoreMode: y,
|
|
2390
2408
|
showMoreEventsInPopover: w = !1,
|
|
2391
|
-
slots:
|
|
2409
|
+
slots: h,
|
|
2392
2410
|
classNames: g
|
|
2393
2411
|
}) {
|
|
2394
|
-
const u = y ?? (w ? "popover" : "expand"),
|
|
2395
|
-
const
|
|
2396
|
-
for (const
|
|
2397
|
-
const
|
|
2398
|
-
|
|
2412
|
+
const u = y ?? (w ? "popover" : "expand"), v = h?.dayCellHeader, b = h?.dayCellFooter, [z, L] = Y(null), [M, $] = Y(null), T = q(() => wt(n, o), [n, o]), A = q(() => {
|
|
2413
|
+
const m = /* @__PURE__ */ new Map();
|
|
2414
|
+
for (const _ of T) {
|
|
2415
|
+
const I = _.date.toDateString(), G = He(t, _.date);
|
|
2416
|
+
G.sort((k, d) => k.startDate.getTime() - d.startDate.getTime()), m.set(I, G);
|
|
2399
2417
|
}
|
|
2400
|
-
return
|
|
2401
|
-
}, [
|
|
2402
|
-
(
|
|
2403
|
-
|
|
2418
|
+
return m;
|
|
2419
|
+
}, [T, t]), E = Oe(), B = S(
|
|
2420
|
+
(m) => {
|
|
2421
|
+
E?.startSelection(m);
|
|
2404
2422
|
},
|
|
2405
|
-
[
|
|
2406
|
-
),
|
|
2407
|
-
(
|
|
2408
|
-
|
|
2423
|
+
[E]
|
|
2424
|
+
), W = S(
|
|
2425
|
+
(m) => {
|
|
2426
|
+
E?.updateSelection(m);
|
|
2409
2427
|
},
|
|
2410
|
-
[
|
|
2411
|
-
),
|
|
2412
|
-
|
|
2413
|
-
}, [
|
|
2414
|
-
(
|
|
2415
|
-
s?.(
|
|
2428
|
+
[E]
|
|
2429
|
+
), V = S(() => {
|
|
2430
|
+
E?.endSelection();
|
|
2431
|
+
}, [E]), R = S(
|
|
2432
|
+
(m) => {
|
|
2433
|
+
s?.(m);
|
|
2416
2434
|
},
|
|
2417
2435
|
[s]
|
|
2418
|
-
), D = o === 0 ?
|
|
2419
|
-
return /* @__PURE__ */ r("div", { className:
|
|
2436
|
+
), D = o === 0 ? mn : un;
|
|
2437
|
+
return /* @__PURE__ */ r("div", { className: c("flex flex-col h-full overflow-hidden", x), children: [
|
|
2420
2438
|
/* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-auto", children: /* @__PURE__ */ r("div", { className: "flex flex-col flex-1 min-w-[560px] sm:min-w-0", children: [
|
|
2421
2439
|
/* @__PURE__ */ e(
|
|
2422
2440
|
"div",
|
|
2423
2441
|
{
|
|
2424
|
-
className:
|
|
2442
|
+
className: c(
|
|
2425
2443
|
"grid grid-cols-7 border-b !sticky !top-0 bg-background z-10",
|
|
2426
2444
|
g?.weekdayHeader
|
|
2427
2445
|
),
|
|
2428
|
-
children: D.map((
|
|
2446
|
+
children: D.map((m, _) => /* @__PURE__ */ r(
|
|
2429
2447
|
"div",
|
|
2430
2448
|
{
|
|
2431
|
-
className:
|
|
2449
|
+
className: c(
|
|
2432
2450
|
"py-2 sm:py-2.5 text-center text-[11px] uppercase font-medium tracking-wide text-muted-foreground",
|
|
2433
|
-
|
|
2451
|
+
_ >= 5 && "text-muted-foreground/70",
|
|
2434
2452
|
// Weekend
|
|
2435
2453
|
g?.weekdayLabel
|
|
2436
2454
|
),
|
|
2437
2455
|
children: [
|
|
2438
|
-
/* @__PURE__ */ e("span", { className: "sm:hidden", children:
|
|
2439
|
-
/* @__PURE__ */ e("span", { className: "hidden sm:inline", children:
|
|
2456
|
+
/* @__PURE__ */ e("span", { className: "sm:hidden", children: m.short }),
|
|
2457
|
+
/* @__PURE__ */ e("span", { className: "hidden sm:inline", children: m.short })
|
|
2440
2458
|
]
|
|
2441
2459
|
},
|
|
2442
|
-
|
|
2460
|
+
m.full
|
|
2443
2461
|
))
|
|
2444
2462
|
}
|
|
2445
2463
|
),
|
|
2446
|
-
/* @__PURE__ */ e("div", { className:
|
|
2447
|
-
const
|
|
2464
|
+
/* @__PURE__ */ e("div", { className: c("grid grid-cols-7 auto-rows-min", g?.monthGrid), children: T.map((m) => {
|
|
2465
|
+
const _ = m.date.toDateString(), I = A.get(_) || [], G = ce(m.date), k = m.date.getDay() === 0 || m.date.getDay() === 6, d = I.length > ge;
|
|
2448
2466
|
return /* @__PURE__ */ r(
|
|
2449
|
-
|
|
2467
|
+
cn,
|
|
2450
2468
|
{
|
|
2451
|
-
date:
|
|
2452
|
-
dataAttributes: { "data-day-key":
|
|
2453
|
-
onSelectionStart:
|
|
2454
|
-
onSelectionMove:
|
|
2455
|
-
onSelectionEnd:
|
|
2456
|
-
isSelected:
|
|
2457
|
-
isSelecting:
|
|
2458
|
-
className:
|
|
2469
|
+
date: m.date,
|
|
2470
|
+
dataAttributes: { "data-day-key": _ },
|
|
2471
|
+
onSelectionStart: B,
|
|
2472
|
+
onSelectionMove: W,
|
|
2473
|
+
onSelectionEnd: V,
|
|
2474
|
+
isSelected: E?.isSlotSelected({ date: m.date }) ?? !1,
|
|
2475
|
+
isSelecting: E?.isSelecting ?? !1,
|
|
2476
|
+
className: c(
|
|
2459
2477
|
"relative flex flex-col border-r border-b text-left min-h-[80px] sm:min-h-[100px] overflow-hidden",
|
|
2460
2478
|
"[&:nth-child(7n)]:border-r-0",
|
|
2461
|
-
!
|
|
2462
|
-
k &&
|
|
2479
|
+
!m.isCurrentMonth && "bg-muted/20",
|
|
2480
|
+
k && m.isCurrentMonth && "bg-muted/10",
|
|
2463
2481
|
g?.dayCell,
|
|
2464
|
-
|
|
2465
|
-
!
|
|
2482
|
+
G && g?.dayCellToday,
|
|
2483
|
+
!m.isCurrentMonth && g?.dayCellOutside,
|
|
2466
2484
|
k && g?.dayCellWeekend
|
|
2467
2485
|
),
|
|
2468
|
-
ariaLabel: `${
|
|
2486
|
+
ariaLabel: `${m.date.toLocaleDateString()} - ${I.length} events. Click to create event, double-click to view day.`,
|
|
2469
2487
|
children: [
|
|
2470
2488
|
/* @__PURE__ */ e(
|
|
2471
2489
|
"div",
|
|
2472
2490
|
{
|
|
2473
|
-
className:
|
|
2491
|
+
className: c(
|
|
2474
2492
|
"flex items-center justify-center p-1",
|
|
2475
|
-
!
|
|
2493
|
+
!m.isCurrentMonth && "text-muted-foreground/40",
|
|
2476
2494
|
g?.dayCellNumber
|
|
2477
2495
|
),
|
|
2478
2496
|
children: /* @__PURE__ */ e(
|
|
@@ -2480,25 +2498,25 @@ function Tn({
|
|
|
2480
2498
|
{
|
|
2481
2499
|
type: "button",
|
|
2482
2500
|
onClick: (p) => {
|
|
2483
|
-
p.stopPropagation(),
|
|
2501
|
+
p.stopPropagation(), R(m.date);
|
|
2484
2502
|
},
|
|
2485
|
-
className:
|
|
2503
|
+
className: c(
|
|
2486
2504
|
"flex items-center justify-center rounded-full transition-colors",
|
|
2487
2505
|
"size-7 text-sm font-normal",
|
|
2488
|
-
|
|
2506
|
+
G ? "bg-primary text-primary-foreground" : "hover:bg-muted"
|
|
2489
2507
|
),
|
|
2490
|
-
children:
|
|
2508
|
+
children: m.date.getDate()
|
|
2491
2509
|
}
|
|
2492
2510
|
)
|
|
2493
2511
|
}
|
|
2494
2512
|
),
|
|
2495
|
-
|
|
2496
|
-
|
|
2513
|
+
v && /* @__PURE__ */ e(
|
|
2514
|
+
v,
|
|
2497
2515
|
{
|
|
2498
|
-
date:
|
|
2499
|
-
events:
|
|
2500
|
-
isToday:
|
|
2501
|
-
isCurrentMonth:
|
|
2516
|
+
date: m.date,
|
|
2517
|
+
events: I,
|
|
2518
|
+
isToday: G,
|
|
2519
|
+
isCurrentMonth: m.isCurrentMonth,
|
|
2502
2520
|
isWeekend: k,
|
|
2503
2521
|
view: "month"
|
|
2504
2522
|
}
|
|
@@ -2506,19 +2524,19 @@ function Tn({
|
|
|
2506
2524
|
/* @__PURE__ */ r(
|
|
2507
2525
|
"div",
|
|
2508
2526
|
{
|
|
2509
|
-
className:
|
|
2527
|
+
className: c(
|
|
2510
2528
|
"flex-1 overflow-hidden px-2 pt-1 pb-1 space-y-1",
|
|
2511
2529
|
g?.dayCellContent
|
|
2512
2530
|
),
|
|
2513
2531
|
children: [
|
|
2514
|
-
|
|
2532
|
+
I.slice(0, ge).map((p) => /* @__PURE__ */ e(
|
|
2515
2533
|
"div",
|
|
2516
2534
|
{
|
|
2517
2535
|
onPointerDown: (C) => {
|
|
2518
2536
|
C.stopPropagation();
|
|
2519
2537
|
},
|
|
2520
|
-
children:
|
|
2521
|
-
|
|
2538
|
+
children: N ? N({ event: p, variant: "compact" }) : /* @__PURE__ */ e(
|
|
2539
|
+
Me,
|
|
2522
2540
|
{
|
|
2523
2541
|
event: p,
|
|
2524
2542
|
variant: "compact",
|
|
@@ -2536,52 +2554,52 @@ function Tn({
|
|
|
2536
2554
|
},
|
|
2537
2555
|
p.id
|
|
2538
2556
|
)),
|
|
2539
|
-
|
|
2557
|
+
d && u === "expand" && /* @__PURE__ */ r(
|
|
2540
2558
|
"button",
|
|
2541
2559
|
{
|
|
2542
2560
|
type: "button",
|
|
2543
2561
|
onPointerDown: (p) => p.stopPropagation(),
|
|
2544
2562
|
onClick: (p) => {
|
|
2545
2563
|
p.stopPropagation();
|
|
2546
|
-
const C = document.querySelector(`[data-day-key="${
|
|
2547
|
-
|
|
2548
|
-
date:
|
|
2549
|
-
events:
|
|
2564
|
+
const C = document.querySelector(`[data-day-key="${_}"]`);
|
|
2565
|
+
$({
|
|
2566
|
+
date: m.date,
|
|
2567
|
+
events: I,
|
|
2550
2568
|
rect: C?.getBoundingClientRect() ?? new DOMRect(window.innerWidth / 2 - 180, window.innerHeight / 2 - 240, 0, 0)
|
|
2551
2569
|
});
|
|
2552
2570
|
},
|
|
2553
|
-
className:
|
|
2571
|
+
className: c(
|
|
2554
2572
|
"w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
|
|
2555
2573
|
g?.moreEventsIndicator
|
|
2556
2574
|
),
|
|
2557
2575
|
children: [
|
|
2558
2576
|
"+",
|
|
2559
|
-
|
|
2577
|
+
I.length - ge,
|
|
2560
2578
|
" more"
|
|
2561
2579
|
]
|
|
2562
2580
|
}
|
|
2563
2581
|
),
|
|
2564
|
-
|
|
2565
|
-
|
|
2582
|
+
d && u === "popover" && /* @__PURE__ */ r(
|
|
2583
|
+
oe,
|
|
2566
2584
|
{
|
|
2567
|
-
open:
|
|
2568
|
-
onOpenChange: (p) =>
|
|
2585
|
+
open: z === _,
|
|
2586
|
+
onOpenChange: (p) => L(p ? _ : null),
|
|
2569
2587
|
children: [
|
|
2570
|
-
/* @__PURE__ */ e(
|
|
2588
|
+
/* @__PURE__ */ e(ae, { asChild: !0, children: /* @__PURE__ */ r(
|
|
2571
2589
|
"button",
|
|
2572
2590
|
{
|
|
2573
2591
|
type: "button",
|
|
2574
2592
|
onPointerDown: (p) => p.stopPropagation(),
|
|
2575
2593
|
onClick: (p) => {
|
|
2576
|
-
p.stopPropagation(),
|
|
2594
|
+
p.stopPropagation(), L(_);
|
|
2577
2595
|
},
|
|
2578
|
-
className:
|
|
2596
|
+
className: c(
|
|
2579
2597
|
"w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
|
|
2580
2598
|
g?.moreEventsIndicator
|
|
2581
2599
|
),
|
|
2582
2600
|
children: [
|
|
2583
2601
|
"+",
|
|
2584
|
-
|
|
2602
|
+
I.length - ge,
|
|
2585
2603
|
" more"
|
|
2586
2604
|
]
|
|
2587
2605
|
}
|
|
@@ -2596,24 +2614,24 @@ function Tn({
|
|
|
2596
2614
|
onPointerDown: (p) => p.stopPropagation(),
|
|
2597
2615
|
children: [
|
|
2598
2616
|
/* @__PURE__ */ r("div", { className: "flex items-center justify-between mb-2 pb-2 border-b", children: [
|
|
2599
|
-
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children:
|
|
2617
|
+
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children: m.date.toLocaleDateString(void 0, {
|
|
2600
2618
|
weekday: "short",
|
|
2601
2619
|
month: "short",
|
|
2602
2620
|
day: "numeric"
|
|
2603
2621
|
}) }),
|
|
2604
2622
|
/* @__PURE__ */ r("span", { className: "text-xs text-muted-foreground", children: [
|
|
2605
|
-
|
|
2623
|
+
I.length,
|
|
2606
2624
|
" events"
|
|
2607
2625
|
] })
|
|
2608
2626
|
] }),
|
|
2609
|
-
/* @__PURE__ */ e("div", { className: "space-y-1.5", children:
|
|
2610
|
-
|
|
2627
|
+
/* @__PURE__ */ e("div", { className: "space-y-1.5", children: I.map((p) => /* @__PURE__ */ e("div", { children: N ? N({ event: p, variant: "compact" }) : /* @__PURE__ */ e(
|
|
2628
|
+
Me,
|
|
2611
2629
|
{
|
|
2612
2630
|
event: p,
|
|
2613
2631
|
variant: "compact",
|
|
2614
2632
|
badgeVariant: a,
|
|
2615
2633
|
onClick: (C) => {
|
|
2616
|
-
|
|
2634
|
+
L(null), i?.(C);
|
|
2617
2635
|
},
|
|
2618
2636
|
disablePopover: !!i && !l,
|
|
2619
2637
|
renderPopover: l,
|
|
@@ -2626,19 +2644,19 @@ function Tn({
|
|
|
2626
2644
|
]
|
|
2627
2645
|
}
|
|
2628
2646
|
),
|
|
2629
|
-
|
|
2647
|
+
d && u === "dayView" && /* @__PURE__ */ r(
|
|
2630
2648
|
"div",
|
|
2631
2649
|
{
|
|
2632
2650
|
onPointerDown: (p) => {
|
|
2633
|
-
p.stopPropagation(),
|
|
2651
|
+
p.stopPropagation(), R(m.date);
|
|
2634
2652
|
},
|
|
2635
|
-
className:
|
|
2653
|
+
className: c(
|
|
2636
2654
|
"w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
|
|
2637
2655
|
g?.moreEventsIndicator
|
|
2638
2656
|
),
|
|
2639
2657
|
children: [
|
|
2640
2658
|
"+",
|
|
2641
|
-
|
|
2659
|
+
I.length - ge,
|
|
2642
2660
|
" more"
|
|
2643
2661
|
]
|
|
2644
2662
|
}
|
|
@@ -2646,40 +2664,40 @@ function Tn({
|
|
|
2646
2664
|
]
|
|
2647
2665
|
}
|
|
2648
2666
|
),
|
|
2649
|
-
|
|
2650
|
-
|
|
2667
|
+
b && /* @__PURE__ */ e(
|
|
2668
|
+
b,
|
|
2651
2669
|
{
|
|
2652
|
-
date:
|
|
2653
|
-
events:
|
|
2654
|
-
isToday:
|
|
2655
|
-
isCurrentMonth:
|
|
2670
|
+
date: m.date,
|
|
2671
|
+
events: I,
|
|
2672
|
+
isToday: G,
|
|
2673
|
+
isCurrentMonth: m.isCurrentMonth,
|
|
2656
2674
|
isWeekend: k,
|
|
2657
2675
|
view: "month"
|
|
2658
2676
|
}
|
|
2659
2677
|
)
|
|
2660
2678
|
]
|
|
2661
2679
|
},
|
|
2662
|
-
|
|
2680
|
+
_
|
|
2663
2681
|
);
|
|
2664
2682
|
}) })
|
|
2665
2683
|
] }) }),
|
|
2666
2684
|
/* @__PURE__ */ e(
|
|
2667
|
-
|
|
2685
|
+
on,
|
|
2668
2686
|
{
|
|
2669
|
-
isOpen:
|
|
2670
|
-
onClose: () =>
|
|
2671
|
-
date:
|
|
2672
|
-
events:
|
|
2673
|
-
anchorRect:
|
|
2687
|
+
isOpen: M !== null,
|
|
2688
|
+
onClose: () => $(null),
|
|
2689
|
+
date: M?.date ?? /* @__PURE__ */ new Date(),
|
|
2690
|
+
events: M?.events ?? [],
|
|
2691
|
+
anchorRect: M?.rect ?? null,
|
|
2674
2692
|
badgeVariant: a,
|
|
2675
2693
|
onEventClick: i,
|
|
2676
|
-
renderEvent:
|
|
2694
|
+
renderEvent: N,
|
|
2677
2695
|
renderPopover: l
|
|
2678
2696
|
}
|
|
2679
2697
|
)
|
|
2680
2698
|
] });
|
|
2681
2699
|
}
|
|
2682
|
-
const
|
|
2700
|
+
const Te = 26, Qe = 2, ke = 4;
|
|
2683
2701
|
function et(t, n) {
|
|
2684
2702
|
const o = Ve(t);
|
|
2685
2703
|
for (let i = 0; i < n.length; i++) {
|
|
@@ -2689,7 +2707,7 @@ function et(t, n) {
|
|
|
2689
2707
|
const a = n[0];
|
|
2690
2708
|
return a && o < Ve(a) ? -1 : 7;
|
|
2691
2709
|
}
|
|
2692
|
-
function
|
|
2710
|
+
function hn(t) {
|
|
2693
2711
|
const n = [...t].sort((a, i) => {
|
|
2694
2712
|
const f = a.endCol - a.startCol, s = i.endCol - i.startCol;
|
|
2695
2713
|
return s !== f ? s - f : a.startCol - i.startCol;
|
|
@@ -2699,13 +2717,13 @@ function mn(t) {
|
|
|
2699
2717
|
for (let s = 0; s < o.length; s++) {
|
|
2700
2718
|
const x = o[s];
|
|
2701
2719
|
if (!x) continue;
|
|
2702
|
-
let
|
|
2720
|
+
let N = !0;
|
|
2703
2721
|
for (let l = a.startCol; l <= a.endCol; l++)
|
|
2704
2722
|
if (x[l]) {
|
|
2705
|
-
|
|
2723
|
+
N = !1;
|
|
2706
2724
|
break;
|
|
2707
2725
|
}
|
|
2708
|
-
if (
|
|
2726
|
+
if (N) {
|
|
2709
2727
|
i = s;
|
|
2710
2728
|
break;
|
|
2711
2729
|
}
|
|
@@ -2718,22 +2736,22 @@ function mn(t) {
|
|
|
2718
2736
|
return { ...a, row: i };
|
|
2719
2737
|
});
|
|
2720
2738
|
}
|
|
2721
|
-
function
|
|
2739
|
+
function pn({
|
|
2722
2740
|
pe: t,
|
|
2723
2741
|
onEventClick: n,
|
|
2724
2742
|
disablePopover: o,
|
|
2725
2743
|
renderPopover: a
|
|
2726
2744
|
}) {
|
|
2727
|
-
const [i, f] =
|
|
2745
|
+
const [i, f] = Y(!1), s = de(t.event.color), x = S(() => {
|
|
2728
2746
|
o && n ? n(t.event) : o || f(!0);
|
|
2729
|
-
}, [o, n, t.event]),
|
|
2747
|
+
}, [o, n, t.event]), N = S(() => {
|
|
2730
2748
|
f(!1);
|
|
2731
2749
|
}, []), l = /* @__PURE__ */ r(
|
|
2732
2750
|
"button",
|
|
2733
2751
|
{
|
|
2734
2752
|
type: "button",
|
|
2735
2753
|
onClick: x,
|
|
2736
|
-
className:
|
|
2754
|
+
className: c(
|
|
2737
2755
|
"inline-flex items-center gap-1 rounded text-[10px] font-medium transition-opacity hover:opacity-80 mx-0.5 overflow-hidden w-full",
|
|
2738
2756
|
"sm:text-xs",
|
|
2739
2757
|
s.bg,
|
|
@@ -2743,8 +2761,8 @@ function hn({
|
|
|
2743
2761
|
t.continuesAfter && "rounded-r-none -mr-0.5 pr-1"
|
|
2744
2762
|
),
|
|
2745
2763
|
style: {
|
|
2746
|
-
height:
|
|
2747
|
-
lineHeight: `${
|
|
2764
|
+
height: Te,
|
|
2765
|
+
lineHeight: `${Te}px`,
|
|
2748
2766
|
paddingLeft: t.continuesBefore ? 4 : 6,
|
|
2749
2767
|
paddingRight: t.continuesAfter ? 4 : 6
|
|
2750
2768
|
},
|
|
@@ -2755,7 +2773,7 @@ function hn({
|
|
|
2755
2773
|
t.continuesAfter && /* @__PURE__ */ e("span", { className: "text-[9px] opacity-60 flex-shrink-0", children: "▸" })
|
|
2756
2774
|
]
|
|
2757
2775
|
}
|
|
2758
|
-
), y = /* @__PURE__ */ e(
|
|
2776
|
+
), y = /* @__PURE__ */ e(re, { children: /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5", children: [
|
|
2759
2777
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.event.title }),
|
|
2760
2778
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: X(t.event) })
|
|
2761
2779
|
] }) }), w = {
|
|
@@ -2765,24 +2783,24 @@ function hn({
|
|
|
2765
2783
|
return o ? /* @__PURE__ */ e("div", { style: w, children: /* @__PURE__ */ r(ie, { children: [
|
|
2766
2784
|
/* @__PURE__ */ e(se, { asChild: !0, children: l }),
|
|
2767
2785
|
y
|
|
2768
|
-
] }) }) : /* @__PURE__ */ e("div", { style: w, children: /* @__PURE__ */ r(
|
|
2769
|
-
/* @__PURE__ */ e(
|
|
2770
|
-
/* @__PURE__ */ e(Q, { className: "w-80", children: a ? a({ event: t.event, onClose:
|
|
2786
|
+
] }) }) : /* @__PURE__ */ e("div", { style: w, children: /* @__PURE__ */ r(oe, { open: i, onOpenChange: f, children: [
|
|
2787
|
+
/* @__PURE__ */ e(ae, { asChild: !0, children: l }),
|
|
2788
|
+
/* @__PURE__ */ e(Q, { className: "w-80", children: a ? a({ event: t.event, onClose: N }) : /* @__PURE__ */ e(fn, { event: t.event, onClose: N }) })
|
|
2771
2789
|
] }) });
|
|
2772
2790
|
}
|
|
2773
|
-
function
|
|
2791
|
+
function fn({
|
|
2774
2792
|
event: t,
|
|
2775
2793
|
onClose: n
|
|
2776
2794
|
}) {
|
|
2777
2795
|
const o = de(t.color), a = t.isCanceled ?? !1;
|
|
2778
2796
|
return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
|
|
2779
2797
|
/* @__PURE__ */ r("div", { className: "flex items-start gap-3", children: [
|
|
2780
|
-
/* @__PURE__ */ e("div", { className:
|
|
2798
|
+
/* @__PURE__ */ e("div", { className: c("size-4 rounded shrink-0 mt-0.5", o.dot) }),
|
|
2781
2799
|
/* @__PURE__ */ r("div", { className: "flex-1 min-w-0", children: [
|
|
2782
2800
|
/* @__PURE__ */ e(
|
|
2783
2801
|
"h3",
|
|
2784
2802
|
{
|
|
2785
|
-
className:
|
|
2803
|
+
className: c(
|
|
2786
2804
|
"font-semibold text-lg",
|
|
2787
2805
|
a && "line-through opacity-50"
|
|
2788
2806
|
),
|
|
@@ -2808,7 +2826,7 @@ function pn({
|
|
|
2808
2826
|
) })
|
|
2809
2827
|
] });
|
|
2810
2828
|
}
|
|
2811
|
-
function
|
|
2829
|
+
function gn({
|
|
2812
2830
|
events: t,
|
|
2813
2831
|
weekDays: n,
|
|
2814
2832
|
hourColumnWidth: o,
|
|
@@ -2817,45 +2835,45 @@ function fn({
|
|
|
2817
2835
|
onEventClick: f,
|
|
2818
2836
|
disablePopover: s = !1,
|
|
2819
2837
|
renderPopover: x,
|
|
2820
|
-
className:
|
|
2838
|
+
className: N
|
|
2821
2839
|
}) {
|
|
2822
|
-
const l =
|
|
2840
|
+
const l = q(() => {
|
|
2823
2841
|
if (t.length === 0) return [];
|
|
2824
|
-
const
|
|
2825
|
-
const
|
|
2826
|
-
if (
|
|
2827
|
-
const A =
|
|
2842
|
+
const b = t.map((z) => {
|
|
2843
|
+
const L = et(z.startDate, n), M = et(z.endDate, n), $ = Math.max(0, L), T = Math.min(6, M);
|
|
2844
|
+
if ($ > 6 || T < 0) return null;
|
|
2845
|
+
const A = L < 0, E = M > 6, W = Ce(z) && le(z.startDate, z.endDate);
|
|
2828
2846
|
return {
|
|
2829
|
-
event:
|
|
2830
|
-
startCol:
|
|
2831
|
-
endCol:
|
|
2847
|
+
event: z,
|
|
2848
|
+
startCol: $,
|
|
2849
|
+
endCol: T,
|
|
2832
2850
|
continuesBefore: A,
|
|
2833
|
-
continuesAfter:
|
|
2834
|
-
isSingleDayAllDay:
|
|
2851
|
+
continuesAfter: E,
|
|
2852
|
+
isSingleDayAllDay: W
|
|
2835
2853
|
};
|
|
2836
2854
|
}).filter(Boolean);
|
|
2837
|
-
return
|
|
2855
|
+
return hn(b);
|
|
2838
2856
|
}, [t, n]);
|
|
2839
2857
|
if (l.length === 0) return null;
|
|
2840
|
-
const y = Math.max(...l.map((
|
|
2858
|
+
const y = Math.max(...l.map((b) => b.row)) + 1, w = Math.min(y, ke), h = y > ke, g = h ? l.filter((b) => b.row >= ke).length : 0, u = [
|
|
2841
2859
|
`${o}px`,
|
|
2842
|
-
...i.map((
|
|
2843
|
-
].join(" "),
|
|
2860
|
+
...i.map((b) => b > a ? `${b}px` : `minmax(${a}px, 1fr)`)
|
|
2861
|
+
].join(" "), v = w * Te + (w - 1) * Qe + 8;
|
|
2844
2862
|
return /* @__PURE__ */ r(
|
|
2845
2863
|
"div",
|
|
2846
2864
|
{
|
|
2847
|
-
className:
|
|
2865
|
+
className: c(
|
|
2848
2866
|
"ic-all-day-row border-b bg-muted/20 relative",
|
|
2849
|
-
|
|
2867
|
+
N
|
|
2850
2868
|
),
|
|
2851
2869
|
style: {
|
|
2852
2870
|
display: "grid",
|
|
2853
2871
|
gridTemplateColumns: u,
|
|
2854
|
-
gridTemplateRows: `repeat(${w}, ${
|
|
2872
|
+
gridTemplateRows: `repeat(${w}, ${Te}px)`,
|
|
2855
2873
|
gap: `${Qe}px 0`,
|
|
2856
2874
|
paddingTop: 4,
|
|
2857
2875
|
paddingBottom: 4,
|
|
2858
|
-
minHeight:
|
|
2876
|
+
minHeight: v
|
|
2859
2877
|
},
|
|
2860
2878
|
children: [
|
|
2861
2879
|
/* @__PURE__ */ e(
|
|
@@ -2869,28 +2887,28 @@ function fn({
|
|
|
2869
2887
|
children: /* @__PURE__ */ e("span", { className: "hidden sm:inline", children: "All day" })
|
|
2870
2888
|
}
|
|
2871
2889
|
),
|
|
2872
|
-
n.map((
|
|
2890
|
+
n.map((b, z) => /* @__PURE__ */ e(
|
|
2873
2891
|
"div",
|
|
2874
2892
|
{
|
|
2875
2893
|
className: "pointer-events-none border-r last:border-r-0",
|
|
2876
2894
|
style: {
|
|
2877
|
-
gridColumn:
|
|
2895
|
+
gridColumn: z + 2,
|
|
2878
2896
|
gridRow: `1 / span ${w}`
|
|
2879
2897
|
}
|
|
2880
2898
|
},
|
|
2881
|
-
|
|
2899
|
+
b.toDateString()
|
|
2882
2900
|
)),
|
|
2883
|
-
l.filter((
|
|
2884
|
-
|
|
2901
|
+
l.filter((b) => b.row < ke).map((b) => /* @__PURE__ */ e(
|
|
2902
|
+
pn,
|
|
2885
2903
|
{
|
|
2886
|
-
pe:
|
|
2904
|
+
pe: b,
|
|
2887
2905
|
onEventClick: f,
|
|
2888
2906
|
disablePopover: s,
|
|
2889
2907
|
renderPopover: x
|
|
2890
2908
|
},
|
|
2891
|
-
|
|
2909
|
+
b.event.id
|
|
2892
2910
|
)),
|
|
2893
|
-
|
|
2911
|
+
h && /* @__PURE__ */ r(
|
|
2894
2912
|
"div",
|
|
2895
2913
|
{
|
|
2896
2914
|
className: "text-[10px] text-muted-foreground font-medium px-2 flex items-center",
|
|
@@ -2909,8 +2927,8 @@ function fn({
|
|
|
2909
2927
|
}
|
|
2910
2928
|
);
|
|
2911
2929
|
}
|
|
2912
|
-
const ue = 96, xe = 56, tt = 72, Z = 120,
|
|
2913
|
-
function
|
|
2930
|
+
const ue = 96, xe = 56, tt = 72, Z = 120, De = 100, xn = 3;
|
|
2931
|
+
function Ln({
|
|
2914
2932
|
events: t,
|
|
2915
2933
|
date: n,
|
|
2916
2934
|
weekStartsOn: o = 1,
|
|
@@ -2919,128 +2937,128 @@ function Wn({
|
|
|
2919
2937
|
slotDuration: f = 30,
|
|
2920
2938
|
badgeVariant: s = "colored",
|
|
2921
2939
|
onEventClick: x,
|
|
2922
|
-
onSlotSelect:
|
|
2940
|
+
onSlotSelect: N,
|
|
2923
2941
|
onDayClick: l,
|
|
2924
2942
|
className: y,
|
|
2925
2943
|
renderEvent: w,
|
|
2926
|
-
renderPopover:
|
|
2944
|
+
renderPopover: h,
|
|
2927
2945
|
slots: g,
|
|
2928
2946
|
classNames: u
|
|
2929
2947
|
}) {
|
|
2930
|
-
const
|
|
2931
|
-
const
|
|
2932
|
-
for (let p = 0; p <
|
|
2933
|
-
|
|
2934
|
-
return
|
|
2935
|
-
}, [
|
|
2936
|
-
() =>
|
|
2948
|
+
const v = 60 / f, b = 100 / v, z = q(() => {
|
|
2949
|
+
const d = [];
|
|
2950
|
+
for (let p = 0; p < v; p++)
|
|
2951
|
+
d.push(p * f);
|
|
2952
|
+
return d;
|
|
2953
|
+
}, [v, f]), L = q(
|
|
2954
|
+
() => vt(n, o),
|
|
2937
2955
|
[n, o]
|
|
2938
|
-
),
|
|
2956
|
+
), M = q(
|
|
2939
2957
|
() => ot(a),
|
|
2940
2958
|
[a]
|
|
2941
|
-
),
|
|
2942
|
-
const
|
|
2943
|
-
for (const p of
|
|
2944
|
-
const C = p.toDateString(),
|
|
2945
|
-
|
|
2959
|
+
), $ = q(() => {
|
|
2960
|
+
const d = /* @__PURE__ */ new Map();
|
|
2961
|
+
for (const p of L) {
|
|
2962
|
+
const C = p.toDateString(), O = He(t, p), { singleDay: j, multiDay: H } = nt(O), F = rt(
|
|
2963
|
+
j,
|
|
2946
2964
|
p,
|
|
2947
2965
|
a,
|
|
2948
2966
|
ue
|
|
2949
|
-
),
|
|
2950
|
-
let
|
|
2951
|
-
for (const
|
|
2952
|
-
if (
|
|
2953
|
-
const
|
|
2954
|
-
|
|
2967
|
+
), U = /* @__PURE__ */ new Map();
|
|
2968
|
+
let te = 1;
|
|
2969
|
+
for (const P of F)
|
|
2970
|
+
if (U.set(P.event.id, P.position), P.position.width > 0) {
|
|
2971
|
+
const J = Math.round(100 / P.position.width);
|
|
2972
|
+
te = Math.max(te, J);
|
|
2955
2973
|
}
|
|
2956
|
-
|
|
2957
|
-
singleDay:
|
|
2958
|
-
multiDay:
|
|
2959
|
-
positions:
|
|
2960
|
-
maxOverlapping:
|
|
2974
|
+
d.set(C, {
|
|
2975
|
+
singleDay: j,
|
|
2976
|
+
multiDay: H,
|
|
2977
|
+
positions: U,
|
|
2978
|
+
maxOverlapping: te
|
|
2961
2979
|
});
|
|
2962
2980
|
}
|
|
2963
|
-
return
|
|
2964
|
-
}, [
|
|
2965
|
-
const
|
|
2966
|
-
for (const { multiDay: p } of
|
|
2981
|
+
return d;
|
|
2982
|
+
}, [L, t, a]), T = q(() => {
|
|
2983
|
+
const d = /* @__PURE__ */ new Map();
|
|
2984
|
+
for (const { multiDay: p } of $.values())
|
|
2967
2985
|
for (const C of p)
|
|
2968
|
-
|
|
2969
|
-
return Array.from(
|
|
2970
|
-
}, [
|
|
2971
|
-
if (
|
|
2972
|
-
const
|
|
2973
|
-
return
|
|
2974
|
-
}, [
|
|
2975
|
-
|
|
2976
|
-
const
|
|
2977
|
-
if (!
|
|
2986
|
+
d.set(C.id, C);
|
|
2987
|
+
return Array.from(d.values());
|
|
2988
|
+
}, [$]), A = /* @__PURE__ */ new Date(), E = L.findIndex((d) => ce(d)), B = q(() => {
|
|
2989
|
+
if (E < 0) return -1;
|
|
2990
|
+
const d = A.getHours() + A.getMinutes() / 60;
|
|
2991
|
+
return d < a.startHour || d > a.endHour ? -1 : (d - a.startHour) * ue;
|
|
2992
|
+
}, [E, a, A]), W = ne(null);
|
|
2993
|
+
$e(() => {
|
|
2994
|
+
const d = W.current;
|
|
2995
|
+
if (!d) return;
|
|
2978
2996
|
const p = () => {
|
|
2979
2997
|
let C;
|
|
2980
|
-
if (
|
|
2981
|
-
const
|
|
2982
|
-
C = Math.max(
|
|
2998
|
+
if (E !== -1) {
|
|
2999
|
+
const j = (/* @__PURE__ */ new Date()).getHours();
|
|
3000
|
+
C = Math.max(j - 1, a.startHour);
|
|
2983
3001
|
} else {
|
|
2984
|
-
const
|
|
2985
|
-
let
|
|
2986
|
-
if (!
|
|
2987
|
-
const
|
|
2988
|
-
|
|
3002
|
+
const H = (/* @__PURE__ */ new Date()).getDay();
|
|
3003
|
+
let F = i?.[H];
|
|
3004
|
+
if (!F?.enabled || F.from === 0) {
|
|
3005
|
+
const U = i?.[1];
|
|
3006
|
+
U?.enabled && (F = U);
|
|
2989
3007
|
}
|
|
2990
|
-
|
|
2991
|
-
|
|
3008
|
+
F?.enabled && F.from > 0 ? C = Math.max(
|
|
3009
|
+
F.from - 1,
|
|
2992
3010
|
a.startHour
|
|
2993
3011
|
) : C = Math.max(7, a.startHour);
|
|
2994
3012
|
}
|
|
2995
|
-
const
|
|
2996
|
-
|
|
2997
|
-
top:
|
|
3013
|
+
const O = (C - a.startHour) * ue;
|
|
3014
|
+
d.scrollTo({
|
|
3015
|
+
top: O,
|
|
2998
3016
|
behavior: "instant"
|
|
2999
3017
|
});
|
|
3000
3018
|
};
|
|
3001
3019
|
requestAnimationFrame(() => {
|
|
3002
3020
|
requestAnimationFrame(p);
|
|
3003
3021
|
});
|
|
3004
|
-
}, [n, i, a,
|
|
3005
|
-
const
|
|
3006
|
-
(
|
|
3007
|
-
|
|
3022
|
+
}, [n, i, a, E]);
|
|
3023
|
+
const V = Oe(), R = S(
|
|
3024
|
+
(d) => {
|
|
3025
|
+
V?.startSelection(d);
|
|
3008
3026
|
},
|
|
3009
|
-
[
|
|
3010
|
-
), D =
|
|
3011
|
-
(
|
|
3012
|
-
|
|
3027
|
+
[V]
|
|
3028
|
+
), D = S(
|
|
3029
|
+
(d) => {
|
|
3030
|
+
V?.updateSelection(d);
|
|
3013
3031
|
},
|
|
3014
|
-
[
|
|
3015
|
-
),
|
|
3016
|
-
|
|
3017
|
-
}, [
|
|
3018
|
-
(
|
|
3019
|
-
x?.(
|
|
3032
|
+
[V]
|
|
3033
|
+
), m = S(() => {
|
|
3034
|
+
V?.endSelection();
|
|
3035
|
+
}, [V]), _ = S(
|
|
3036
|
+
(d) => {
|
|
3037
|
+
x?.(d);
|
|
3020
3038
|
},
|
|
3021
3039
|
[x]
|
|
3022
|
-
),
|
|
3023
|
-
const
|
|
3024
|
-
for (const p of
|
|
3025
|
-
const C = p.toDateString(),
|
|
3026
|
-
|
|
3027
|
-
Math.max(Z,
|
|
3028
|
-
) :
|
|
3040
|
+
), I = xe + 7 * Z, G = q(() => {
|
|
3041
|
+
const d = [];
|
|
3042
|
+
for (const p of L) {
|
|
3043
|
+
const C = p.toDateString(), j = $.get(C)?.maxOverlapping ?? 1;
|
|
3044
|
+
j > xn ? d.push(
|
|
3045
|
+
Math.max(Z, j * De)
|
|
3046
|
+
) : d.push(Z);
|
|
3029
3047
|
}
|
|
3030
|
-
return
|
|
3031
|
-
}, [
|
|
3032
|
-
return /* @__PURE__ */ r("div", { className:
|
|
3033
|
-
|
|
3034
|
-
|
|
3048
|
+
return d;
|
|
3049
|
+
}, [L, $]), k = xe + G.reduce((d, p) => d + p, 0);
|
|
3050
|
+
return /* @__PURE__ */ r("div", { className: c("ic-week-view flex flex-col h-full", y), children: [
|
|
3051
|
+
T.length > 0 && /* @__PURE__ */ e(
|
|
3052
|
+
gn,
|
|
3035
3053
|
{
|
|
3036
|
-
events:
|
|
3037
|
-
weekDays:
|
|
3054
|
+
events: T,
|
|
3055
|
+
weekDays: L,
|
|
3038
3056
|
hourColumnWidth: xe,
|
|
3039
3057
|
minDayColumnWidth: Z,
|
|
3040
|
-
dayColumnWidths:
|
|
3041
|
-
onEventClick:
|
|
3042
|
-
disablePopover: !!x && !
|
|
3043
|
-
renderPopover:
|
|
3058
|
+
dayColumnWidths: G,
|
|
3059
|
+
onEventClick: _,
|
|
3060
|
+
disablePopover: !!x && !h,
|
|
3061
|
+
renderPopover: h,
|
|
3044
3062
|
...u?.multiDayBanner && {
|
|
3045
3063
|
className: u.multiDayBanner
|
|
3046
3064
|
}
|
|
@@ -3049,12 +3067,12 @@ function Wn({
|
|
|
3049
3067
|
/* @__PURE__ */ e(
|
|
3050
3068
|
"div",
|
|
3051
3069
|
{
|
|
3052
|
-
ref:
|
|
3053
|
-
className:
|
|
3070
|
+
ref: W,
|
|
3071
|
+
className: c(
|
|
3054
3072
|
"ic-week-scroll-container flex-1",
|
|
3055
3073
|
u?.scrollContainer
|
|
3056
3074
|
),
|
|
3057
|
-
children: /* @__PURE__ */ r("div", { style: { minWidth: Math.max(
|
|
3075
|
+
children: /* @__PURE__ */ r("div", { style: { minWidth: Math.max(I, k) }, children: [
|
|
3058
3076
|
/* @__PURE__ */ e("div", { className: "ic-week-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ r("div", { className: "flex", children: [
|
|
3059
3077
|
/* @__PURE__ */ e(
|
|
3060
3078
|
"div",
|
|
@@ -3064,53 +3082,53 @@ function Wn({
|
|
|
3064
3082
|
children: /* @__PURE__ */ r("span", { className: "hidden sm:inline", children: [
|
|
3065
3083
|
"GMT",
|
|
3066
3084
|
(() => {
|
|
3067
|
-
const
|
|
3085
|
+
const d = (/* @__PURE__ */ new Date()).getTimezoneOffset(), p = Math.abs(Math.floor(d / 60)), C = d <= 0 ? "+" : "-";
|
|
3068
3086
|
return p > 0 ? `${C}${String(p).padStart(2, "0")}` : "";
|
|
3069
3087
|
})()
|
|
3070
3088
|
] })
|
|
3071
3089
|
}
|
|
3072
3090
|
),
|
|
3073
|
-
|
|
3074
|
-
const C = ce(
|
|
3091
|
+
L.map((d, p) => {
|
|
3092
|
+
const C = ce(d), O = G[p] ?? Z, j = O > Z;
|
|
3075
3093
|
return /* @__PURE__ */ r(
|
|
3076
3094
|
"div",
|
|
3077
3095
|
{
|
|
3078
|
-
className:
|
|
3096
|
+
className: c(
|
|
3079
3097
|
"flex-1 flex flex-col items-center justify-center border-r last:border-r-0 py-2",
|
|
3080
3098
|
u?.columnHeader,
|
|
3081
3099
|
C && u?.columnHeaderToday
|
|
3082
3100
|
),
|
|
3083
3101
|
style: {
|
|
3084
3102
|
height: tt,
|
|
3085
|
-
minWidth:
|
|
3103
|
+
minWidth: j ? O : Z
|
|
3086
3104
|
},
|
|
3087
3105
|
children: [
|
|
3088
3106
|
/* @__PURE__ */ e(
|
|
3089
3107
|
"span",
|
|
3090
3108
|
{
|
|
3091
|
-
className:
|
|
3109
|
+
className: c(
|
|
3092
3110
|
"text-[11px] font-medium uppercase tracking-wide",
|
|
3093
3111
|
C ? "text-primary" : "text-muted-foreground"
|
|
3094
3112
|
),
|
|
3095
|
-
children:
|
|
3113
|
+
children: d.toLocaleDateString([], { weekday: "short" })
|
|
3096
3114
|
}
|
|
3097
3115
|
),
|
|
3098
3116
|
/* @__PURE__ */ e(
|
|
3099
3117
|
"button",
|
|
3100
3118
|
{
|
|
3101
3119
|
type: "button",
|
|
3102
|
-
onClick: () => l?.(
|
|
3103
|
-
className:
|
|
3120
|
+
onClick: () => l?.(d),
|
|
3121
|
+
className: c(
|
|
3104
3122
|
"flex items-center justify-center rounded-full transition-colors mt-0.5",
|
|
3105
3123
|
"size-10 text-2xl font-normal",
|
|
3106
3124
|
C ? "bg-primary text-primary-foreground" : "text-foreground hover:bg-muted"
|
|
3107
3125
|
),
|
|
3108
|
-
children:
|
|
3126
|
+
children: d.getDate()
|
|
3109
3127
|
}
|
|
3110
3128
|
)
|
|
3111
3129
|
]
|
|
3112
3130
|
},
|
|
3113
|
-
|
|
3131
|
+
d.toDateString()
|
|
3114
3132
|
);
|
|
3115
3133
|
})
|
|
3116
3134
|
] }) }),
|
|
@@ -3118,12 +3136,12 @@ function Wn({
|
|
|
3118
3136
|
/* @__PURE__ */ e(
|
|
3119
3137
|
"div",
|
|
3120
3138
|
{
|
|
3121
|
-
className:
|
|
3139
|
+
className: c(
|
|
3122
3140
|
"ic-hour-column sticky left-0 z-10 bg-zinc-50 border-r",
|
|
3123
3141
|
u?.timeGutter
|
|
3124
3142
|
),
|
|
3125
3143
|
style: { width: xe },
|
|
3126
|
-
children:
|
|
3144
|
+
children: M.map((d, p) => /* @__PURE__ */ e(
|
|
3127
3145
|
"div",
|
|
3128
3146
|
{
|
|
3129
3147
|
className: "relative",
|
|
@@ -3131,134 +3149,134 @@ function Wn({
|
|
|
3131
3149
|
children: /* @__PURE__ */ e("div", { className: "absolute -top-2.5 right-1 sm:right-2 flex h-5 items-center", children: p !== 0 && /* @__PURE__ */ e(
|
|
3132
3150
|
"span",
|
|
3133
3151
|
{
|
|
3134
|
-
className:
|
|
3152
|
+
className: c(
|
|
3135
3153
|
"text-[10px] sm:text-xs text-muted-foreground",
|
|
3136
3154
|
u?.timeGutterLabel
|
|
3137
3155
|
),
|
|
3138
|
-
children:
|
|
3156
|
+
children: Se(d)
|
|
3139
3157
|
}
|
|
3140
3158
|
) })
|
|
3141
3159
|
},
|
|
3142
|
-
|
|
3160
|
+
d
|
|
3143
3161
|
))
|
|
3144
3162
|
}
|
|
3145
3163
|
),
|
|
3146
|
-
/* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children:
|
|
3147
|
-
const C =
|
|
3164
|
+
/* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: L.map((d, p) => {
|
|
3165
|
+
const C = d.toDateString(), O = $.get(C), j = G[p] ?? Z, H = j > Z;
|
|
3148
3166
|
return /* @__PURE__ */ r(
|
|
3149
3167
|
"div",
|
|
3150
3168
|
{
|
|
3151
3169
|
className: "ic-day-column relative flex-1",
|
|
3152
3170
|
style: {
|
|
3153
|
-
minWidth:
|
|
3171
|
+
minWidth: H ? j : Z
|
|
3154
3172
|
},
|
|
3155
3173
|
children: [
|
|
3156
|
-
|
|
3157
|
-
const
|
|
3158
|
-
|
|
3159
|
-
|
|
3174
|
+
M.map((F, U) => {
|
|
3175
|
+
const P = !at(
|
|
3176
|
+
d,
|
|
3177
|
+
F,
|
|
3160
3178
|
i
|
|
3161
3179
|
);
|
|
3162
3180
|
return /* @__PURE__ */ r(
|
|
3163
3181
|
"div",
|
|
3164
3182
|
{
|
|
3165
|
-
className:
|
|
3183
|
+
className: c(
|
|
3166
3184
|
"relative",
|
|
3167
|
-
|
|
3168
|
-
ce(
|
|
3185
|
+
P && "bg-calendar-disabled-hour",
|
|
3186
|
+
ce(d) && !P && "bg-primary/5",
|
|
3169
3187
|
u?.timeSlot,
|
|
3170
|
-
|
|
3188
|
+
P ? u?.timeSlotNonWorking : u?.timeSlotWorking
|
|
3171
3189
|
),
|
|
3172
3190
|
style: { height: ue },
|
|
3173
3191
|
children: [
|
|
3174
|
-
|
|
3175
|
-
|
|
3192
|
+
U !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
|
|
3193
|
+
z.slice(1).map((J) => /* @__PURE__ */ e(
|
|
3176
3194
|
"div",
|
|
3177
3195
|
{
|
|
3178
3196
|
className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
|
|
3179
|
-
style: { top: `${
|
|
3197
|
+
style: { top: `${J / 60 * 100}%` }
|
|
3180
3198
|
},
|
|
3181
|
-
|
|
3199
|
+
J
|
|
3182
3200
|
)),
|
|
3183
|
-
|
|
3201
|
+
z.map((J, pt) => {
|
|
3184
3202
|
const Fe = {
|
|
3185
|
-
date:
|
|
3186
|
-
hour:
|
|
3187
|
-
minute:
|
|
3203
|
+
date: d,
|
|
3204
|
+
hour: F,
|
|
3205
|
+
minute: J
|
|
3188
3206
|
};
|
|
3189
3207
|
return /* @__PURE__ */ e(
|
|
3190
|
-
|
|
3208
|
+
ht,
|
|
3191
3209
|
{
|
|
3192
3210
|
slot: Fe,
|
|
3193
|
-
onSelectionStart:
|
|
3211
|
+
onSelectionStart: R,
|
|
3194
3212
|
onSelectionMove: D,
|
|
3195
|
-
onSelectionEnd:
|
|
3196
|
-
isSelected:
|
|
3197
|
-
isSelecting:
|
|
3198
|
-
disabled:
|
|
3213
|
+
onSelectionEnd: m,
|
|
3214
|
+
isSelected: V?.isSlotSelected(Fe) ?? !1,
|
|
3215
|
+
isSelecting: V?.isSelecting ?? !1,
|
|
3216
|
+
disabled: P,
|
|
3199
3217
|
className: "absolute inset-x-0",
|
|
3200
3218
|
style: {
|
|
3201
|
-
top: `${
|
|
3202
|
-
height: `${
|
|
3219
|
+
top: `${pt * b}%`,
|
|
3220
|
+
height: `${b}%`
|
|
3203
3221
|
},
|
|
3204
|
-
ariaLabel: `Add event on ${
|
|
3222
|
+
ariaLabel: `Add event on ${d.toLocaleDateString()} at ${Se(F)}:${String(J).padStart(2, "0")}`
|
|
3205
3223
|
},
|
|
3206
|
-
|
|
3224
|
+
J
|
|
3207
3225
|
);
|
|
3208
3226
|
})
|
|
3209
3227
|
]
|
|
3210
3228
|
},
|
|
3211
|
-
|
|
3229
|
+
F
|
|
3212
3230
|
);
|
|
3213
3231
|
}),
|
|
3214
|
-
|
|
3215
|
-
const
|
|
3216
|
-
if (!
|
|
3217
|
-
const
|
|
3232
|
+
O?.singleDay.map((F) => {
|
|
3233
|
+
const U = O.positions.get(F.id);
|
|
3234
|
+
if (!U) return null;
|
|
3235
|
+
const te = `calc(${U.width}% - 2px)`, P = `max(${De}px, ${te})`;
|
|
3218
3236
|
return w ? /* @__PURE__ */ e(
|
|
3219
3237
|
"div",
|
|
3220
3238
|
{
|
|
3221
3239
|
className: "absolute pointer-events-auto p-0.5",
|
|
3222
3240
|
style: {
|
|
3223
|
-
top: `${
|
|
3224
|
-
left: `${
|
|
3225
|
-
width:
|
|
3226
|
-
minWidth: `${
|
|
3241
|
+
top: `${U.top}px`,
|
|
3242
|
+
left: `${U.left}%`,
|
|
3243
|
+
width: P,
|
|
3244
|
+
minWidth: `${De}px`
|
|
3227
3245
|
},
|
|
3228
|
-
children: w({ event:
|
|
3246
|
+
children: w({ event: F, position: U })
|
|
3229
3247
|
},
|
|
3230
|
-
|
|
3248
|
+
F.id
|
|
3231
3249
|
) : /* @__PURE__ */ e(
|
|
3232
|
-
|
|
3250
|
+
dt,
|
|
3233
3251
|
{
|
|
3234
|
-
event:
|
|
3252
|
+
event: F,
|
|
3235
3253
|
position: {
|
|
3236
|
-
top:
|
|
3237
|
-
left:
|
|
3238
|
-
width:
|
|
3239
|
-
minWidth:
|
|
3254
|
+
top: U.top,
|
|
3255
|
+
left: U.left,
|
|
3256
|
+
width: U.width,
|
|
3257
|
+
minWidth: De
|
|
3240
3258
|
},
|
|
3241
3259
|
hourHeight: ue,
|
|
3242
3260
|
badgeVariant: s,
|
|
3243
3261
|
onClick: x,
|
|
3244
|
-
disablePopover: !!x && !
|
|
3245
|
-
renderPopover:
|
|
3246
|
-
className:
|
|
3262
|
+
disablePopover: !!x && !h,
|
|
3263
|
+
renderPopover: h,
|
|
3264
|
+
className: c(
|
|
3247
3265
|
"pointer-events-auto",
|
|
3248
3266
|
u?.eventCard
|
|
3249
3267
|
)
|
|
3250
3268
|
},
|
|
3251
|
-
|
|
3269
|
+
F.id
|
|
3252
3270
|
);
|
|
3253
3271
|
}),
|
|
3254
|
-
p ===
|
|
3272
|
+
p === E && B >= 0 && /* @__PURE__ */ r(
|
|
3255
3273
|
"div",
|
|
3256
3274
|
{
|
|
3257
|
-
className:
|
|
3275
|
+
className: c(
|
|
3258
3276
|
"absolute left-0 right-0 z-20 flex items-center pointer-events-none",
|
|
3259
3277
|
u?.currentTimeIndicator
|
|
3260
3278
|
),
|
|
3261
|
-
style: { top:
|
|
3279
|
+
style: { top: B },
|
|
3262
3280
|
children: [
|
|
3263
3281
|
/* @__PURE__ */ e("div", { className: "h-2 w-2 -ml-1 rounded-full bg-red-500" }),
|
|
3264
3282
|
/* @__PURE__ */ e("div", { className: "flex-1 h-0.5 bg-red-500" })
|
|
@@ -3267,7 +3285,7 @@ function Wn({
|
|
|
3267
3285
|
)
|
|
3268
3286
|
]
|
|
3269
3287
|
},
|
|
3270
|
-
|
|
3288
|
+
d.toDateString()
|
|
3271
3289
|
);
|
|
3272
3290
|
}) }) })
|
|
3273
3291
|
] })
|
|
@@ -3277,35 +3295,35 @@ function Wn({
|
|
|
3277
3295
|
] });
|
|
3278
3296
|
}
|
|
3279
3297
|
export {
|
|
3280
|
-
|
|
3298
|
+
Mn as A,
|
|
3281
3299
|
me as B,
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3300
|
+
Sn as C,
|
|
3301
|
+
qt as D,
|
|
3302
|
+
dt as E,
|
|
3303
|
+
Wn as M,
|
|
3304
|
+
oe as P,
|
|
3305
|
+
ht as T,
|
|
3306
|
+
Ln as W,
|
|
3307
|
+
on as a,
|
|
3308
|
+
cn as b,
|
|
3309
|
+
Tn as c,
|
|
3310
|
+
Me as d,
|
|
3311
|
+
ln as e,
|
|
3312
|
+
Cn as f,
|
|
3313
|
+
kn as g,
|
|
3296
3314
|
Q as h,
|
|
3297
|
-
|
|
3298
|
-
|
|
3315
|
+
ae as i,
|
|
3316
|
+
Xt as j,
|
|
3299
3317
|
ie as k,
|
|
3300
|
-
|
|
3301
|
-
|
|
3318
|
+
re as l,
|
|
3319
|
+
Dn as m,
|
|
3302
3320
|
se as n,
|
|
3303
|
-
|
|
3321
|
+
Dt as o,
|
|
3304
3322
|
de as p,
|
|
3305
3323
|
Ke as q,
|
|
3306
3324
|
Xe as r,
|
|
3307
3325
|
_e as s,
|
|
3308
|
-
|
|
3309
|
-
|
|
3326
|
+
Ie as t,
|
|
3327
|
+
Ft as u
|
|
3310
3328
|
};
|
|
3311
|
-
//# sourceMappingURL=week-view-
|
|
3329
|
+
//# sourceMappingURL=week-view-aRPB2cjn.js.map
|