@innosolutions/inno-calendar 1.0.34 → 1.0.37
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-BwL7DItQ.js → agenda-widget-BKIaXFpN.js} +1186 -1128
- package/dist/agenda-widget-BKIaXFpN.js.map +1 -0
- package/dist/agenda-widget-BtTvMs9i.cjs +2 -0
- package/dist/agenda-widget-BtTvMs9i.cjs.map +1 -0
- package/dist/components/event/event-card.d.ts +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 +8 -2
- package/dist/components/inno-calendar.d.ts.map +1 -1
- package/dist/components/views/day-view.d.ts.map +1 -1
- package/dist/components/views/timeline-view.d.ts.map +1 -1
- package/dist/components/views/week-view.d.ts.map +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/types.d.ts +32 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/utils/grid-utils.d.ts.map +1 -1
- package/dist/core/utils/position-utils.d.ts +5 -1
- package/dist/core/utils/position-utils.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +3 -3
- package/dist/presets/index.cjs +1 -1
- package/dist/presets/index.mjs +1 -1
- package/dist/{tailwind-calendar-CE6o8RLM.cjs → tailwind-calendar-3IAm_TdP.cjs} +2 -2
- package/dist/{tailwind-calendar-CE6o8RLM.cjs.map → tailwind-calendar-3IAm_TdP.cjs.map} +1 -1
- package/dist/{tailwind-calendar-BxW1RSkc.js → tailwind-calendar-B3HuJrjX.js} +2 -2
- package/dist/{tailwind-calendar-BxW1RSkc.js.map → tailwind-calendar-B3HuJrjX.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.mjs +315 -303
- package/dist/utils.mjs.map +1 -1
- package/dist/{week-view-jpcXSE6k.js → week-view-1EUqFIRS.js} +554 -528
- package/dist/week-view-1EUqFIRS.js.map +1 -0
- package/dist/week-view-DXilsY50.cjs +11 -0
- package/dist/week-view-DXilsY50.cjs.map +1 -0
- package/package.json +1 -1
- package/dist/agenda-widget-B8blZmlr.cjs +0 -2
- package/dist/agenda-widget-B8blZmlr.cjs.map +0 -1
- package/dist/agenda-widget-BwL7DItQ.js.map +0 -1
- package/dist/week-view-DT8XnNbp.cjs +0 -11
- package/dist/week-view-DT8XnNbp.cjs.map +0 -1
- package/dist/week-view-jpcXSE6k.js.map +0 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
2
|
import * as Y from "react";
|
|
3
|
-
import { useState as oe, useCallback as
|
|
3
|
+
import { useState as oe, useCallback as M, forwardRef as ze, createElement as De, useMemo as V, useRef as se, useEffect as it, useLayoutEffect as qe } from "react";
|
|
4
4
|
import { c as l, a as st } from "./index-DtaLkIY8.js";
|
|
5
|
-
import * as
|
|
6
|
-
import { getEventsCountInView as lt, getRangeText as dt, groupEventsByDate as ct, isToday as te, isSameDay as
|
|
7
|
-
import { a as
|
|
5
|
+
import * as H from "@radix-ui/react-dropdown-menu";
|
|
6
|
+
import { getEventsCountInView as lt, getRangeText as dt, groupEventsByDate as ct, isToday as te, isSameDay as Ae, getEventsForDay as Le, separateEventsByDuration as Ke, calculateOverlappingPositions as Ye, getVisibleHoursArray as Xe, isWorkingHour as Je, formatHourLabel as we, generateMonthGrid as ut, getWeekDays as mt, startOfWeek as ht } from "./utils.mjs";
|
|
7
|
+
import { a as We, b as _e } from "./slot-selection-context-D2eu2o-7.js";
|
|
8
8
|
import * as ue from "@radix-ui/react-popover";
|
|
9
9
|
import * as pe from "@radix-ui/react-tooltip";
|
|
10
|
-
const
|
|
10
|
+
const re = ue.Root, ne = ue.Trigger, ar = ue.Anchor, Q = Y.forwardRef(({ className: t, align: r = "center", sideOffset: o = 4, ...a }, d) => /* @__PURE__ */ e(ue.Portal, { children: /* @__PURE__ */ e(
|
|
11
11
|
ue.Content,
|
|
12
12
|
{
|
|
13
13
|
ref: d,
|
|
14
|
-
align:
|
|
14
|
+
align: r,
|
|
15
15
|
sideOffset: o,
|
|
16
16
|
className: l(
|
|
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",
|
|
@@ -21,11 +21,11 @@ const ne = ue.Root, re = ue.Trigger, an = ue.Anchor, Q = Y.forwardRef(({ classNa
|
|
|
21
21
|
}
|
|
22
22
|
) }));
|
|
23
23
|
Q.displayName = ue.Content.displayName;
|
|
24
|
-
const
|
|
24
|
+
const ir = pe.Provider, le = pe.Root, de = pe.Trigger, ee = Y.forwardRef(({ className: t, sideOffset: r = 4, ...o }, a) => /* @__PURE__ */ e(
|
|
25
25
|
pe.Content,
|
|
26
26
|
{
|
|
27
27
|
ref: a,
|
|
28
|
-
sideOffset:
|
|
28
|
+
sideOffset: r,
|
|
29
29
|
className: l(
|
|
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
|
|
@@ -41,70 +41,80 @@ function fe(t) {
|
|
|
41
41
|
text: "text-blue-700 dark:text-blue-300",
|
|
42
42
|
dot: "bg-blue-500",
|
|
43
43
|
dotFill: "fill-blue-600 dark:fill-blue-500",
|
|
44
|
-
border: "border-blue-400 dark:border-blue-600"
|
|
44
|
+
border: "border-blue-400 dark:border-blue-600",
|
|
45
|
+
accentBorder: "border-l-blue-500 dark:border-l-blue-400"
|
|
45
46
|
},
|
|
46
47
|
green: {
|
|
47
48
|
bg: "bg-green-50 dark:bg-green-950/30",
|
|
48
49
|
text: "text-green-700 dark:text-green-300",
|
|
49
50
|
dot: "bg-green-500",
|
|
50
51
|
dotFill: "fill-green-600 dark:fill-green-500",
|
|
51
|
-
border: "border-green-400 dark:border-green-600"
|
|
52
|
+
border: "border-green-400 dark:border-green-600",
|
|
53
|
+
accentBorder: "border-l-green-500 dark:border-l-green-400"
|
|
52
54
|
},
|
|
53
55
|
red: {
|
|
54
56
|
bg: "bg-red-50 dark:bg-red-950/30",
|
|
55
57
|
text: "text-red-700 dark:text-red-300",
|
|
56
58
|
dot: "bg-red-500",
|
|
57
59
|
dotFill: "fill-red-600 dark:fill-red-500",
|
|
58
|
-
border: "border-red-400 dark:border-red-600"
|
|
60
|
+
border: "border-red-400 dark:border-red-600",
|
|
61
|
+
accentBorder: "border-l-red-500 dark:border-l-red-400"
|
|
59
62
|
},
|
|
60
63
|
yellow: {
|
|
61
64
|
bg: "bg-yellow-50 dark:bg-yellow-950/30",
|
|
62
65
|
text: "text-yellow-700 dark:text-yellow-300",
|
|
63
66
|
dot: "bg-yellow-500",
|
|
64
67
|
dotFill: "fill-yellow-600 dark:fill-yellow-500",
|
|
65
|
-
border: "border-yellow-400 dark:border-yellow-600"
|
|
68
|
+
border: "border-yellow-400 dark:border-yellow-600",
|
|
69
|
+
accentBorder: "border-l-yellow-500 dark:border-l-yellow-400"
|
|
66
70
|
},
|
|
67
71
|
purple: {
|
|
68
72
|
bg: "bg-purple-50 dark:bg-purple-950/30",
|
|
69
73
|
text: "text-purple-700 dark:text-purple-300",
|
|
70
74
|
dot: "bg-purple-500",
|
|
71
75
|
dotFill: "fill-purple-600 dark:fill-purple-500",
|
|
72
|
-
border: "border-purple-400 dark:border-purple-600"
|
|
76
|
+
border: "border-purple-400 dark:border-purple-600",
|
|
77
|
+
accentBorder: "border-l-purple-500 dark:border-l-purple-400"
|
|
73
78
|
},
|
|
74
79
|
orange: {
|
|
75
80
|
bg: "bg-orange-50 dark:bg-orange-950/30",
|
|
76
81
|
text: "text-orange-700 dark:text-orange-300",
|
|
77
82
|
dot: "bg-orange-500",
|
|
78
83
|
dotFill: "fill-orange-600 dark:fill-orange-500",
|
|
79
|
-
border: "border-orange-400 dark:border-orange-600"
|
|
84
|
+
border: "border-orange-400 dark:border-orange-600",
|
|
85
|
+
accentBorder: "border-l-orange-500 dark:border-l-orange-400"
|
|
80
86
|
},
|
|
81
87
|
pink: {
|
|
82
88
|
bg: "bg-pink-50 dark:bg-pink-950/30",
|
|
83
89
|
text: "text-pink-700 dark:text-pink-300",
|
|
84
90
|
dot: "bg-pink-500",
|
|
85
91
|
dotFill: "fill-pink-600 dark:fill-pink-500",
|
|
86
|
-
border: "border-pink-400 dark:border-pink-600"
|
|
92
|
+
border: "border-pink-400 dark:border-pink-600",
|
|
93
|
+
accentBorder: "border-l-pink-500 dark:border-l-pink-400"
|
|
87
94
|
},
|
|
88
95
|
teal: {
|
|
89
96
|
bg: "bg-teal-50 dark:bg-teal-950/30",
|
|
90
97
|
text: "text-teal-700 dark:text-teal-300",
|
|
91
98
|
dot: "bg-teal-500",
|
|
92
99
|
dotFill: "fill-teal-600 dark:fill-teal-500",
|
|
93
|
-
border: "border-teal-400 dark:border-teal-600"
|
|
100
|
+
border: "border-teal-400 dark:border-teal-600",
|
|
101
|
+
accentBorder: "border-l-teal-500 dark:border-l-teal-400"
|
|
94
102
|
},
|
|
95
103
|
gray: {
|
|
96
104
|
bg: "bg-gray-50 dark:bg-gray-950/30",
|
|
97
105
|
text: "text-gray-700 dark:text-gray-300",
|
|
98
106
|
dot: "bg-gray-500",
|
|
99
107
|
dotFill: "fill-gray-600 dark:fill-gray-500",
|
|
100
|
-
border: "border-gray-400 dark:border-gray-600"
|
|
108
|
+
border: "border-gray-400 dark:border-gray-600",
|
|
109
|
+
accentBorder: "border-l-gray-500 dark:border-l-gray-400"
|
|
101
110
|
},
|
|
102
111
|
indigo: {
|
|
103
112
|
bg: "bg-indigo-50 dark:bg-indigo-950/30",
|
|
104
113
|
text: "text-indigo-700 dark:text-indigo-300",
|
|
105
114
|
dot: "bg-indigo-500",
|
|
106
115
|
dotFill: "fill-indigo-600 dark:fill-indigo-500",
|
|
107
|
-
border: "border-indigo-400 dark:border-indigo-600"
|
|
116
|
+
border: "border-indigo-400 dark:border-indigo-600",
|
|
117
|
+
accentBorder: "border-l-indigo-500 dark:border-l-indigo-400"
|
|
108
118
|
}
|
|
109
119
|
}[t ?? "blue"];
|
|
110
120
|
}
|
|
@@ -115,16 +125,16 @@ function ve(t) {
|
|
|
115
125
|
hour12: !1
|
|
116
126
|
});
|
|
117
127
|
}
|
|
118
|
-
function Z(t,
|
|
119
|
-
return `${ve(t)} - ${ve(
|
|
128
|
+
function Z(t, r) {
|
|
129
|
+
return `${ve(t)} - ${ve(r)}`;
|
|
120
130
|
}
|
|
121
|
-
function
|
|
122
|
-
const
|
|
123
|
-
return
|
|
131
|
+
function Ee(t) {
|
|
132
|
+
const r = new Date(t);
|
|
133
|
+
return r.setHours(0, 0, 0, 0), r;
|
|
124
134
|
}
|
|
125
135
|
function Ce({
|
|
126
136
|
event: t,
|
|
127
|
-
variant:
|
|
137
|
+
variant: r = "full",
|
|
128
138
|
badgeVariant: o = "colored",
|
|
129
139
|
onClick: a,
|
|
130
140
|
className: d,
|
|
@@ -134,21 +144,21 @@ function Ce({
|
|
|
134
144
|
style: z,
|
|
135
145
|
disablePopover: p = !1,
|
|
136
146
|
renderPopover: y,
|
|
137
|
-
enableDrag:
|
|
147
|
+
enableDrag: L = !1
|
|
138
148
|
}) {
|
|
139
|
-
const i = fe(t.color), [v, h] = oe(!1), [w,
|
|
149
|
+
const i = fe(t.color), [v, h] = oe(!1), [w, E] = oe(!1), W = We(), D = t.endDate < Ee(/* @__PURE__ */ new Date()), x = t.isCanceled ?? !1, O = L && W && !x && !D, P = t.data, j = P?.meetingTookPlace ?? t.meetingTookPlace ?? !1, B = x ? /* @__PURE__ */ e(ft, { className: "h-3 w-3 text-zinc-800 dark:text-zinc-200" }) : j ? /* @__PURE__ */ e(pt, { className: l("h-3 w-3", i.text) }) : null, F = t.scheduleTypeName || P?.scheduleTypeName || P?.typeName, u = P?.productName, k = P?.nrParticipant, I = P?.siteName, m = P?.siteCity, _ = [I, m].filter(Boolean).join(", "), $ = M(() => {
|
|
140
150
|
w || (p && a ? a(t) : p || h(!0));
|
|
141
|
-
}, [w, p, a, t]), N =
|
|
151
|
+
}, [w, p, a, t]), N = M(() => {
|
|
142
152
|
h(!1);
|
|
143
|
-
}, []), G =
|
|
153
|
+
}, []), G = M(
|
|
144
154
|
(f) => {
|
|
145
|
-
|
|
155
|
+
O && (f.dataTransfer.effectAllowed = "move", f.dataTransfer.setData("text/plain", t.id), E(!0), W?.startDrag?.(t));
|
|
146
156
|
},
|
|
147
|
-
[
|
|
148
|
-
), C =
|
|
149
|
-
|
|
150
|
-
}, [
|
|
151
|
-
if (
|
|
157
|
+
[O, t, W]
|
|
158
|
+
), C = M(() => {
|
|
159
|
+
E(!1), W?.isDragging && W.endDrag?.();
|
|
160
|
+
}, [W]);
|
|
161
|
+
if (r === "dot") {
|
|
152
162
|
const f = /* @__PURE__ */ e(
|
|
153
163
|
"button",
|
|
154
164
|
{
|
|
@@ -164,27 +174,27 @@ function Ce({
|
|
|
164
174
|
"aria-label": t.title
|
|
165
175
|
}
|
|
166
176
|
);
|
|
167
|
-
return p ? /* @__PURE__ */
|
|
177
|
+
return p ? /* @__PURE__ */ n(le, { children: [
|
|
168
178
|
/* @__PURE__ */ e(de, { asChild: !0, children: f }),
|
|
169
|
-
/* @__PURE__ */ e(ee, { children: /* @__PURE__ */
|
|
179
|
+
/* @__PURE__ */ e(ee, { children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
170
180
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
171
181
|
/* @__PURE__ */ e("div", { className: "text-xs opacity-80", children: Z(t.startDate, t.endDate) })
|
|
172
182
|
] }) })
|
|
173
|
-
] }) : /* @__PURE__ */
|
|
174
|
-
/* @__PURE__ */ e(
|
|
183
|
+
] }) : /* @__PURE__ */ n(re, { open: v, onOpenChange: h, children: [
|
|
184
|
+
/* @__PURE__ */ e(ne, { asChild: !0, children: /* @__PURE__ */ n(le, { children: [
|
|
175
185
|
/* @__PURE__ */ e(de, { asChild: !0, children: f }),
|
|
176
186
|
/* @__PURE__ */ e(ee, { children: /* @__PURE__ */ e("div", { className: "font-medium", children: t.title }) })
|
|
177
187
|
] }) }),
|
|
178
188
|
/* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: N }) : /* @__PURE__ */ e(he, { event: t, onClose: N }) })
|
|
179
189
|
] });
|
|
180
190
|
}
|
|
181
|
-
if (
|
|
182
|
-
const f = /* @__PURE__ */
|
|
191
|
+
if (r === "compact") {
|
|
192
|
+
const f = /* @__PURE__ */ n(
|
|
183
193
|
"div",
|
|
184
194
|
{
|
|
185
195
|
role: "button",
|
|
186
196
|
tabIndex: 0,
|
|
187
|
-
draggable: !!
|
|
197
|
+
draggable: !!O,
|
|
188
198
|
onDragStart: G,
|
|
189
199
|
onDragEnd: C,
|
|
190
200
|
onClick: p ? $ : void 0,
|
|
@@ -193,7 +203,7 @@ function Ce({
|
|
|
193
203
|
},
|
|
194
204
|
className: l(
|
|
195
205
|
"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",
|
|
196
|
-
|
|
206
|
+
O ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
|
|
197
207
|
w && "opacity-50",
|
|
198
208
|
// Cancelled events get gray background with strikethrough
|
|
199
209
|
x || // Past events get neutral zinc styling
|
|
@@ -218,7 +228,7 @@ function Ce({
|
|
|
218
228
|
children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: i.dotFill })
|
|
219
229
|
}
|
|
220
230
|
),
|
|
221
|
-
/* @__PURE__ */ e("span", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */
|
|
231
|
+
/* @__PURE__ */ e("span", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ n("span", { className: "", children: [
|
|
222
232
|
/* @__PURE__ */ e(
|
|
223
233
|
"span",
|
|
224
234
|
{
|
|
@@ -227,7 +237,7 @@ function Ce({
|
|
|
227
237
|
maskImage: "linear-gradient(to right, transparent 0, black 8px, black calc(100% - 8px), transparent 100%)",
|
|
228
238
|
WebkitMaskImage: "linear-gradient(to right, transparent 0, black 8px, black calc(100% - 8px), transparent 100%)"
|
|
229
239
|
},
|
|
230
|
-
children: /* @__PURE__ */
|
|
240
|
+
children: /* @__PURE__ */ n("span", { className: "inline-flex event-marquee", children: [
|
|
231
241
|
/* @__PURE__ */ e("span", { className: "shrink-0 px-1", children: t.title }),
|
|
232
242
|
/* @__PURE__ */ e("span", { className: "shrink-0 px-1", children: "•" }),
|
|
233
243
|
/* @__PURE__ */ e("span", { "aria-hidden": "true", className: "shrink-0 px-1", children: t.title }),
|
|
@@ -246,50 +256,51 @@ function Ce({
|
|
|
246
256
|
}
|
|
247
257
|
)
|
|
248
258
|
] }) }),
|
|
249
|
-
/* @__PURE__ */ e("div", { className: "flex gap-0.5", children:
|
|
259
|
+
/* @__PURE__ */ e("div", { className: "flex gap-0.5", children: B })
|
|
250
260
|
]
|
|
251
261
|
}
|
|
252
262
|
);
|
|
253
|
-
return p ? /* @__PURE__ */
|
|
263
|
+
return p ? /* @__PURE__ */ n(le, { children: [
|
|
254
264
|
/* @__PURE__ */ e(de, { asChild: !0, children: f }),
|
|
255
|
-
/* @__PURE__ */ e(ee, { children: /* @__PURE__ */
|
|
265
|
+
/* @__PURE__ */ e(ee, { children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
256
266
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
257
267
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: Z(t.startDate, t.endDate) })
|
|
258
268
|
] }) })
|
|
259
|
-
] }) : /* @__PURE__ */
|
|
260
|
-
/* @__PURE__ */ e(
|
|
269
|
+
] }) : /* @__PURE__ */ n(re, { open: v, onOpenChange: h, children: [
|
|
270
|
+
/* @__PURE__ */ e(ne, { asChild: !0, children: f }),
|
|
261
271
|
/* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: N }) : /* @__PURE__ */ e(he, { event: t, onClose: N }) })
|
|
262
272
|
] });
|
|
263
273
|
}
|
|
264
|
-
const s = /* @__PURE__ */
|
|
274
|
+
const s = /* @__PURE__ */ n(
|
|
265
275
|
"button",
|
|
266
276
|
{
|
|
267
277
|
type: "button",
|
|
268
278
|
onClick: $,
|
|
269
279
|
className: l(
|
|
270
|
-
"group relative flex w-full flex-col gap-1 rounded-md border px-2 py-1.5 text-left transition-all
|
|
280
|
+
"group relative flex w-full flex-col gap-1 rounded-md border-l-[3px] px-2 py-1.5 text-left transition-all",
|
|
281
|
+
"shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
|
|
271
282
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
272
283
|
// Cancelled events get gray background with strikethrough
|
|
273
284
|
x || // Past events get neutral zinc styling with strikethrough
|
|
274
|
-
D ? "bg-zinc-100 dark:bg-zinc-800 border-zinc-
|
|
285
|
+
D ? "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" : [
|
|
275
286
|
o === "colored" && [
|
|
276
287
|
i.bg,
|
|
277
|
-
i.
|
|
288
|
+
i.accentBorder,
|
|
278
289
|
i.text
|
|
279
290
|
],
|
|
280
291
|
o === "mixed" && [
|
|
281
292
|
i.bg,
|
|
282
|
-
i.
|
|
293
|
+
i.accentBorder,
|
|
283
294
|
i.text
|
|
284
295
|
],
|
|
285
|
-
o === "dot" && "bg-muted/50 border-border"
|
|
296
|
+
o === "dot" && "bg-muted/50 border-l-neutral-400 dark:border-l-neutral-600"
|
|
286
297
|
],
|
|
287
298
|
d
|
|
288
299
|
),
|
|
289
300
|
style: z,
|
|
290
301
|
children: [
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
/* @__PURE__ */
|
|
302
|
+
/* @__PURE__ */ n("div", { className: "flex items-start justify-between gap-1", children: [
|
|
303
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 min-w-0", children: [
|
|
293
304
|
["dot", "mixed"].includes(o) && !D && !x && /* @__PURE__ */ e(
|
|
294
305
|
"svg",
|
|
295
306
|
{
|
|
@@ -302,7 +313,7 @@ function Ce({
|
|
|
302
313
|
children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: i.dotFill })
|
|
303
314
|
}
|
|
304
315
|
),
|
|
305
|
-
/* @__PURE__ */
|
|
316
|
+
/* @__PURE__ */ n(
|
|
306
317
|
"span",
|
|
307
318
|
{
|
|
308
319
|
className: l(
|
|
@@ -312,55 +323,55 @@ function Ce({
|
|
|
312
323
|
),
|
|
313
324
|
children: [
|
|
314
325
|
t.title,
|
|
315
|
-
|
|
326
|
+
F && /* @__PURE__ */ n("span", { className: "font-normal opacity-75", children: [
|
|
316
327
|
" ",
|
|
317
328
|
"- ",
|
|
318
|
-
|
|
329
|
+
F
|
|
319
330
|
] })
|
|
320
331
|
]
|
|
321
332
|
}
|
|
322
333
|
)
|
|
323
334
|
] }),
|
|
324
|
-
|
|
335
|
+
B
|
|
325
336
|
] }),
|
|
326
337
|
u && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground truncate", children: u }),
|
|
327
|
-
k != null && /* @__PURE__ */
|
|
338
|
+
k != null && /* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
328
339
|
/* @__PURE__ */ e(Se, { className: "h-3 w-3 shrink-0" }),
|
|
329
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ n("span", { children: [
|
|
330
341
|
k,
|
|
331
342
|
" participant",
|
|
332
343
|
k !== 1 ? "s" : ""
|
|
333
344
|
] })
|
|
334
345
|
] }),
|
|
335
|
-
g && /* @__PURE__ */
|
|
336
|
-
/* @__PURE__ */ e(
|
|
346
|
+
g && /* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
347
|
+
/* @__PURE__ */ e(Be, { className: "h-3 w-3 shrink-0" }),
|
|
337
348
|
/* @__PURE__ */ e("span", { children: Z(t.startDate, t.endDate) })
|
|
338
349
|
] }),
|
|
339
|
-
|
|
350
|
+
_ && /* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
340
351
|
/* @__PURE__ */ e(Ze, { className: "h-3 w-3 shrink-0" }),
|
|
341
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
352
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: _ })
|
|
342
353
|
] }),
|
|
343
354
|
c && t.description && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground line-clamp-2", children: t.description }),
|
|
344
|
-
b && t.participants && t.participants.length > 0 && /* @__PURE__ */
|
|
355
|
+
b && t.participants && t.participants.length > 0 && /* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-xs text-muted-foreground", children: [
|
|
345
356
|
/* @__PURE__ */ e(Se, { className: "h-3 w-3 shrink-0" }),
|
|
346
357
|
/* @__PURE__ */ e("span", { className: "truncate", children: t.participants.map((f) => f.name).join(", ") })
|
|
347
358
|
] })
|
|
348
359
|
]
|
|
349
360
|
}
|
|
350
361
|
);
|
|
351
|
-
return p ? /* @__PURE__ */
|
|
362
|
+
return p ? /* @__PURE__ */ n(le, { children: [
|
|
352
363
|
/* @__PURE__ */ e(de, { asChild: !0, children: s }),
|
|
353
|
-
/* @__PURE__ */ e(ee, { children: /* @__PURE__ */
|
|
364
|
+
/* @__PURE__ */ e(ee, { children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
354
365
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
355
366
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: Z(t.startDate, t.endDate) })
|
|
356
367
|
] }) })
|
|
357
|
-
] }) : /* @__PURE__ */
|
|
358
|
-
/* @__PURE__ */ e(
|
|
368
|
+
] }) : /* @__PURE__ */ n(re, { open: v, onOpenChange: h, children: [
|
|
369
|
+
/* @__PURE__ */ e(ne, { asChild: !0, children: s }),
|
|
359
370
|
/* @__PURE__ */ e(Q, { className: "w-80", children: y ? y({ event: t, onClose: N }) : /* @__PURE__ */ e(he, { event: t, onClose: N }) })
|
|
360
371
|
] });
|
|
361
372
|
}
|
|
362
|
-
function
|
|
363
|
-
return /* @__PURE__ */
|
|
373
|
+
function Be({ className: t }) {
|
|
374
|
+
return /* @__PURE__ */ n(
|
|
364
375
|
"svg",
|
|
365
376
|
{
|
|
366
377
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -395,7 +406,7 @@ function pt({ className: t }) {
|
|
|
395
406
|
);
|
|
396
407
|
}
|
|
397
408
|
function ft({ className: t }) {
|
|
398
|
-
return /* @__PURE__ */
|
|
409
|
+
return /* @__PURE__ */ n(
|
|
399
410
|
"svg",
|
|
400
411
|
{
|
|
401
412
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -414,7 +425,7 @@ function ft({ className: t }) {
|
|
|
414
425
|
);
|
|
415
426
|
}
|
|
416
427
|
function Se({ className: t }) {
|
|
417
|
-
return /* @__PURE__ */
|
|
428
|
+
return /* @__PURE__ */ n(
|
|
418
429
|
"svg",
|
|
419
430
|
{
|
|
420
431
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -435,7 +446,7 @@ function Se({ className: t }) {
|
|
|
435
446
|
);
|
|
436
447
|
}
|
|
437
448
|
function Ze({ className: t }) {
|
|
438
|
-
return /* @__PURE__ */
|
|
449
|
+
return /* @__PURE__ */ n(
|
|
439
450
|
"svg",
|
|
440
451
|
{
|
|
441
452
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -455,13 +466,13 @@ function Ze({ className: t }) {
|
|
|
455
466
|
}
|
|
456
467
|
function he({
|
|
457
468
|
event: t,
|
|
458
|
-
onClose:
|
|
469
|
+
onClose: r
|
|
459
470
|
}) {
|
|
460
471
|
const o = fe(t.color), a = t.isCanceled ?? !1;
|
|
461
|
-
return /* @__PURE__ */
|
|
462
|
-
/* @__PURE__ */
|
|
472
|
+
return /* @__PURE__ */ n("div", { className: "space-y-3", children: [
|
|
473
|
+
/* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
|
|
463
474
|
/* @__PURE__ */ e("div", { className: l("size-4 rounded shrink-0 mt-0.5", o.dot) }),
|
|
464
|
-
/* @__PURE__ */
|
|
475
|
+
/* @__PURE__ */ n("div", { className: "flex-1 min-w-0", children: [
|
|
465
476
|
/* @__PURE__ */ e(
|
|
466
477
|
"h3",
|
|
467
478
|
{
|
|
@@ -472,14 +483,14 @@ function he({
|
|
|
472
483
|
children: t.title
|
|
473
484
|
}
|
|
474
485
|
),
|
|
475
|
-
/* @__PURE__ */
|
|
476
|
-
/* @__PURE__ */ e(
|
|
486
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1 text-sm text-muted-foreground mt-1", children: [
|
|
487
|
+
/* @__PURE__ */ e(Be, { className: "h-4 w-4 shrink-0" }),
|
|
477
488
|
/* @__PURE__ */ e("span", { className: "tabular-nums", children: Z(t.startDate, t.endDate) })
|
|
478
489
|
] })
|
|
479
490
|
] })
|
|
480
491
|
] }),
|
|
481
492
|
t.description && /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: t.description }),
|
|
482
|
-
/* @__PURE__ */
|
|
493
|
+
/* @__PURE__ */ n("div", { className: "flex flex-wrap gap-1.5", children: [
|
|
483
494
|
t.isAllDay && /* @__PURE__ */ e("span", { className: "text-xs bg-muted px-2 py-0.5 rounded-full font-medium", children: "All day" }),
|
|
484
495
|
t.isRecurring && /* @__PURE__ */ e("span", { className: "text-xs bg-muted px-2 py-0.5 rounded-full font-medium", children: "Recurring" }),
|
|
485
496
|
a && /* @__PURE__ */ e("span", { className: "text-xs bg-red-100 dark:bg-red-950/30 text-red-700 dark:text-red-300 px-2 py-0.5 rounded-full font-medium", children: "Canceled" })
|
|
@@ -488,7 +499,7 @@ function he({
|
|
|
488
499
|
"button",
|
|
489
500
|
{
|
|
490
501
|
type: "button",
|
|
491
|
-
onClick:
|
|
502
|
+
onClick: r,
|
|
492
503
|
className: "text-xs text-muted-foreground hover:text-foreground px-3 py-1.5 rounded-md hover:bg-muted transition-colors",
|
|
493
504
|
children: "Close"
|
|
494
505
|
}
|
|
@@ -497,7 +508,7 @@ function he({
|
|
|
497
508
|
}
|
|
498
509
|
function Qe({
|
|
499
510
|
event: t,
|
|
500
|
-
position:
|
|
511
|
+
position: r,
|
|
501
512
|
hourHeight: o = 96,
|
|
502
513
|
badgeVariant: a = "colored",
|
|
503
514
|
onClick: d,
|
|
@@ -506,30 +517,30 @@ function Qe({
|
|
|
506
517
|
renderPopover: b,
|
|
507
518
|
enableDrag: z = !0
|
|
508
519
|
}) {
|
|
509
|
-
const p = fe(t.color), [y,
|
|
510
|
-
i || (c && d ? d(t) : c ||
|
|
511
|
-
}, [i, c, d, t]), G =
|
|
512
|
-
|
|
513
|
-
}, []), C =
|
|
514
|
-
(
|
|
520
|
+
const p = fe(t.color), [y, L] = oe(!1), [i, v] = oe(!1), h = We(), w = (t.endDate.getTime() - t.startDate.getTime()) / (1e3 * 60), E = w / 60 * o - 8, W = t.endDate < Ee(/* @__PURE__ */ new Date()), D = t.isCanceled ?? !1, x = z && h && !D && !W, O = w < 35, P = w > 25, j = w >= 45, B = t.data, F = t.scheduleTypeName || B?.scheduleTypeName || B?.typeName, u = B?.productName, k = B?.nrParticipant, I = B?.siteName, m = B?.siteCity, _ = [I, m].filter(Boolean).join(", "), $ = a === "dot", N = M(() => {
|
|
521
|
+
i || (c && d ? d(t) : c || L(!0));
|
|
522
|
+
}, [i, c, d, t]), G = M(() => {
|
|
523
|
+
L(!1);
|
|
524
|
+
}, []), C = M(
|
|
525
|
+
(T) => {
|
|
515
526
|
if (!x) return;
|
|
516
|
-
|
|
517
|
-
const q =
|
|
518
|
-
|
|
527
|
+
T.dataTransfer.effectAllowed = "move", T.dataTransfer.setData("text/plain", t.id);
|
|
528
|
+
const q = T.currentTarget, R = q.getBoundingClientRect();
|
|
529
|
+
T.dataTransfer.setDragImage(
|
|
519
530
|
q,
|
|
520
|
-
|
|
521
|
-
|
|
531
|
+
T.clientX - R.left,
|
|
532
|
+
T.clientY - R.top
|
|
522
533
|
), v(!0), h?.startDrag?.(t);
|
|
523
534
|
},
|
|
524
535
|
[x, t, h]
|
|
525
|
-
), s =
|
|
536
|
+
), s = M(() => {
|
|
526
537
|
v(!1), h?.isDragging && h.endDrag?.();
|
|
527
|
-
}, [h]), f =
|
|
528
|
-
(
|
|
529
|
-
(
|
|
538
|
+
}, [h]), f = M(
|
|
539
|
+
(T) => {
|
|
540
|
+
(T.key === "Enter" || T.key === " ") && (T.preventDefault(), N());
|
|
530
541
|
},
|
|
531
542
|
[N]
|
|
532
|
-
), S = /* @__PURE__ */
|
|
543
|
+
), S = /* @__PURE__ */ n(
|
|
533
544
|
"div",
|
|
534
545
|
{
|
|
535
546
|
role: "button",
|
|
@@ -540,27 +551,32 @@ function Qe({
|
|
|
540
551
|
onKeyDown: f,
|
|
541
552
|
onClick: i ? void 0 : N,
|
|
542
553
|
className: l(
|
|
543
|
-
"group flex w-full select-none flex-col gap-0.5 overflow-hidden rounded-md border px-2 py-1.5 text-xs text-left",
|
|
554
|
+
"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",
|
|
555
|
+
"shadow-[0_1px_3px_rgba(0,0,0,0.08)] hover:shadow-[0_2px_6px_rgba(0,0,0,0.12)]",
|
|
544
556
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
545
|
-
"transition-
|
|
557
|
+
"transition-all",
|
|
546
558
|
x ? "cursor-grab active:cursor-grabbing" : "cursor-pointer",
|
|
547
559
|
i && "opacity-50",
|
|
548
560
|
// Cancelled events get gray background with strikethrough
|
|
549
561
|
D || // Past events get neutral zinc styling with strikethrough
|
|
550
|
-
|
|
562
|
+
W ? "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" : [
|
|
551
563
|
// Colored/mixed variants
|
|
552
|
-
!$ && [
|
|
564
|
+
!$ && [
|
|
565
|
+
p.bg,
|
|
566
|
+
p.accentBorder,
|
|
567
|
+
p.text
|
|
568
|
+
],
|
|
553
569
|
// Dot variant - neutral background
|
|
554
|
-
$ && "bg-neutral-50 dark:bg-neutral-900 border-neutral-
|
|
570
|
+
$ && "bg-neutral-50 dark:bg-neutral-900 border-l-neutral-400 dark:border-l-neutral-600"
|
|
555
571
|
],
|
|
556
572
|
// Short events center content
|
|
557
|
-
|
|
573
|
+
O && "py-0 justify-center",
|
|
558
574
|
g
|
|
559
575
|
),
|
|
560
|
-
style: { height: `${Math.max(
|
|
576
|
+
style: { height: `${Math.max(E, 20)}px` },
|
|
561
577
|
children: [
|
|
562
|
-
/* @__PURE__ */
|
|
563
|
-
["mixed", "dot"].includes(a) && !
|
|
578
|
+
/* @__PURE__ */ n("div", { className: "flex items-start gap-1.5 min-w-0", children: [
|
|
579
|
+
["mixed", "dot"].includes(a) && !W && !D && /* @__PURE__ */ e(
|
|
564
580
|
"svg",
|
|
565
581
|
{
|
|
566
582
|
width: "8",
|
|
@@ -572,25 +588,25 @@ function Qe({
|
|
|
572
588
|
children: /* @__PURE__ */ e("circle", { cx: "4", cy: "4", r: "4", className: p.dotFill })
|
|
573
589
|
}
|
|
574
590
|
),
|
|
575
|
-
/* @__PURE__ */ e("div", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */
|
|
591
|
+
/* @__PURE__ */ e("div", { className: "flex-1 min-w-0 overflow-hidden", children: /* @__PURE__ */ n(
|
|
576
592
|
"p",
|
|
577
593
|
{
|
|
578
594
|
className: l(
|
|
579
595
|
"font-semibold truncate leading-tight",
|
|
580
|
-
!
|
|
596
|
+
!W && !D && $ && "text-foreground"
|
|
581
597
|
),
|
|
582
598
|
children: [
|
|
583
599
|
t.title,
|
|
584
|
-
|
|
600
|
+
F && /* @__PURE__ */ n("span", { className: "font-normal opacity-75", children: [
|
|
585
601
|
" ",
|
|
586
602
|
"- ",
|
|
587
|
-
|
|
603
|
+
F
|
|
588
604
|
] })
|
|
589
605
|
]
|
|
590
606
|
}
|
|
591
607
|
) })
|
|
592
608
|
] }),
|
|
593
|
-
|
|
609
|
+
j && u && /* @__PURE__ */ e(
|
|
594
610
|
"p",
|
|
595
611
|
{
|
|
596
612
|
className: l(
|
|
@@ -600,7 +616,7 @@ function Qe({
|
|
|
600
616
|
children: u
|
|
601
617
|
}
|
|
602
618
|
),
|
|
603
|
-
|
|
619
|
+
j && k != null && /* @__PURE__ */ n(
|
|
604
620
|
"div",
|
|
605
621
|
{
|
|
606
622
|
className: l(
|
|
@@ -609,7 +625,7 @@ function Qe({
|
|
|
609
625
|
),
|
|
610
626
|
children: [
|
|
611
627
|
/* @__PURE__ */ e(Se, { className: "h-3 w-3 shrink-0" }),
|
|
612
|
-
/* @__PURE__ */
|
|
628
|
+
/* @__PURE__ */ n("span", { children: [
|
|
613
629
|
k,
|
|
614
630
|
" participant",
|
|
615
631
|
k !== 1 ? "s" : ""
|
|
@@ -617,7 +633,7 @@ function Qe({
|
|
|
617
633
|
]
|
|
618
634
|
}
|
|
619
635
|
),
|
|
620
|
-
|
|
636
|
+
P && /* @__PURE__ */ n(
|
|
621
637
|
"div",
|
|
622
638
|
{
|
|
623
639
|
className: l(
|
|
@@ -625,8 +641,8 @@ function Qe({
|
|
|
625
641
|
$ ? "text-muted-foreground" : "opacity-90"
|
|
626
642
|
),
|
|
627
643
|
children: [
|
|
628
|
-
/* @__PURE__ */ e(
|
|
629
|
-
/* @__PURE__ */
|
|
644
|
+
/* @__PURE__ */ e(Be, { className: "h-3 w-3 shrink-0" }),
|
|
645
|
+
/* @__PURE__ */ n("span", { children: [
|
|
630
646
|
ve(t.startDate),
|
|
631
647
|
" - ",
|
|
632
648
|
ve(t.endDate)
|
|
@@ -634,7 +650,7 @@ function Qe({
|
|
|
634
650
|
]
|
|
635
651
|
}
|
|
636
652
|
),
|
|
637
|
-
|
|
653
|
+
j && _ && /* @__PURE__ */ n(
|
|
638
654
|
"div",
|
|
639
655
|
{
|
|
640
656
|
className: l(
|
|
@@ -643,43 +659,43 @@ function Qe({
|
|
|
643
659
|
),
|
|
644
660
|
children: [
|
|
645
661
|
/* @__PURE__ */ e(Ze, { className: "h-3 w-3 shrink-0" }),
|
|
646
|
-
/* @__PURE__ */ e("span", { className: "truncate", children:
|
|
662
|
+
/* @__PURE__ */ e("span", { className: "truncate", children: _ })
|
|
647
663
|
]
|
|
648
664
|
}
|
|
649
665
|
)
|
|
650
666
|
]
|
|
651
667
|
}
|
|
652
|
-
),
|
|
653
|
-
/* @__PURE__ */
|
|
668
|
+
), A = /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
669
|
+
/* @__PURE__ */ n("div", { className: "font-medium", children: [
|
|
654
670
|
t.title,
|
|
655
|
-
|
|
671
|
+
F && /* @__PURE__ */ n("span", { className: "font-normal opacity-75", children: [
|
|
656
672
|
" ",
|
|
657
673
|
"- ",
|
|
658
|
-
|
|
674
|
+
F
|
|
659
675
|
] })
|
|
660
676
|
] }),
|
|
661
677
|
u && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: u }),
|
|
662
|
-
k != null && /* @__PURE__ */
|
|
678
|
+
k != null && /* @__PURE__ */ n("div", { className: "text-xs text-muted-foreground", children: [
|
|
663
679
|
k,
|
|
664
680
|
" participant",
|
|
665
681
|
k !== 1 ? "s" : ""
|
|
666
682
|
] }),
|
|
667
683
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: Z(t.startDate, t.endDate) }),
|
|
668
|
-
|
|
684
|
+
_ && /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: _ })
|
|
669
685
|
] }) });
|
|
670
686
|
return c ? /* @__PURE__ */ e(
|
|
671
687
|
"div",
|
|
672
688
|
{
|
|
673
689
|
className: "absolute p-0.5",
|
|
674
690
|
style: {
|
|
675
|
-
top: `${
|
|
676
|
-
left: `${
|
|
677
|
-
width:
|
|
678
|
-
minWidth:
|
|
691
|
+
top: `${r.top}px`,
|
|
692
|
+
left: `${r.left}%`,
|
|
693
|
+
width: r.minWidth ? `max(${r.minWidth}px, ${r.width}%)` : `${r.width}%`,
|
|
694
|
+
minWidth: r.minWidth ? `${r.minWidth}px` : void 0
|
|
679
695
|
},
|
|
680
|
-
children: /* @__PURE__ */
|
|
696
|
+
children: /* @__PURE__ */ n(le, { children: [
|
|
681
697
|
/* @__PURE__ */ e(de, { asChild: !0, children: S }),
|
|
682
|
-
|
|
698
|
+
A
|
|
683
699
|
] })
|
|
684
700
|
}
|
|
685
701
|
) : /* @__PURE__ */ e(
|
|
@@ -687,21 +703,21 @@ function Qe({
|
|
|
687
703
|
{
|
|
688
704
|
className: "absolute p-0.5",
|
|
689
705
|
style: {
|
|
690
|
-
top: `${
|
|
691
|
-
left: `${
|
|
692
|
-
width:
|
|
693
|
-
minWidth:
|
|
706
|
+
top: `${r.top}px`,
|
|
707
|
+
left: `${r.left}%`,
|
|
708
|
+
width: r.minWidth ? `max(${r.minWidth}px, ${r.width}%)` : `${r.width}%`,
|
|
709
|
+
minWidth: r.minWidth ? `${r.minWidth}px` : void 0
|
|
694
710
|
},
|
|
695
|
-
children: /* @__PURE__ */
|
|
696
|
-
/* @__PURE__ */ e(
|
|
711
|
+
children: /* @__PURE__ */ n(re, { open: y, onOpenChange: L, children: [
|
|
712
|
+
/* @__PURE__ */ e(ne, { asChild: !0, children: S }),
|
|
697
713
|
/* @__PURE__ */ e(Q, { className: "w-80", children: b ? b({ event: t, onClose: G }) : /* @__PURE__ */ e(he, { event: t, onClose: G }) })
|
|
698
714
|
] })
|
|
699
715
|
}
|
|
700
716
|
);
|
|
701
717
|
}
|
|
702
|
-
function
|
|
718
|
+
function sr({
|
|
703
719
|
event: t,
|
|
704
|
-
spanDays:
|
|
720
|
+
spanDays: r,
|
|
705
721
|
isStart: o,
|
|
706
722
|
isEnd: a,
|
|
707
723
|
onClick: d,
|
|
@@ -709,9 +725,9 @@ function ln({
|
|
|
709
725
|
disablePopover: c = !1,
|
|
710
726
|
renderPopover: b
|
|
711
727
|
}) {
|
|
712
|
-
const z = fe(t.color), [p, y] = oe(!1),
|
|
728
|
+
const z = fe(t.color), [p, y] = oe(!1), L = t.endDate < Ee(/* @__PURE__ */ new Date()), i = t.isCanceled ?? !1, v = M(() => {
|
|
713
729
|
c && d ? d(t) : c || y(!0);
|
|
714
|
-
}, [c, d, t]), h =
|
|
730
|
+
}, [c, d, t]), h = M(() => {
|
|
715
731
|
y(!1);
|
|
716
732
|
}, []), w = /* @__PURE__ */ e(
|
|
717
733
|
"button",
|
|
@@ -722,25 +738,25 @@ function ln({
|
|
|
722
738
|
"flex h-5 items-center px-1.5 text-xs font-medium transition-opacity hover:opacity-80",
|
|
723
739
|
// Cancelled events get gray background with strikethrough
|
|
724
740
|
i || // Past events get neutral zinc styling with strikethrough
|
|
725
|
-
|
|
741
|
+
L ? "bg-zinc-200 dark:bg-zinc-700 text-zinc-500 dark:text-zinc-400 line-through" : [z.dot, "text-white"],
|
|
726
742
|
o && "rounded-l",
|
|
727
743
|
a && "rounded-r",
|
|
728
744
|
!o && "border-l-0",
|
|
729
745
|
!a && "border-r-0",
|
|
730
746
|
g
|
|
731
747
|
),
|
|
732
|
-
style: { width: `${
|
|
748
|
+
style: { width: `${r * 100}%` },
|
|
733
749
|
children: o && /* @__PURE__ */ e("span", { className: "truncate", children: t.title })
|
|
734
750
|
}
|
|
735
|
-
),
|
|
751
|
+
), E = /* @__PURE__ */ e(ee, { children: /* @__PURE__ */ n("div", { className: "flex flex-col gap-0.5", children: [
|
|
736
752
|
/* @__PURE__ */ e("div", { className: "font-medium", children: t.title }),
|
|
737
753
|
/* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground tabular-nums", children: Z(t.startDate, t.endDate) })
|
|
738
754
|
] }) });
|
|
739
|
-
return c ? /* @__PURE__ */
|
|
755
|
+
return c ? /* @__PURE__ */ n(le, { children: [
|
|
740
756
|
/* @__PURE__ */ e(de, { asChild: !0, children: w }),
|
|
741
|
-
|
|
742
|
-
] }) : /* @__PURE__ */
|
|
743
|
-
/* @__PURE__ */ e(
|
|
757
|
+
E
|
|
758
|
+
] }) : /* @__PURE__ */ n(re, { open: p, onOpenChange: y, children: [
|
|
759
|
+
/* @__PURE__ */ e(ne, { asChild: !0, children: w }),
|
|
744
760
|
/* @__PURE__ */ e(Q, { className: "w-80", children: b ? b({ event: t, onClose: h }) : /* @__PURE__ */ e(he, { event: t, onClose: h }) })
|
|
745
761
|
] });
|
|
746
762
|
}
|
|
@@ -757,35 +773,35 @@ if (typeof window < "u" && !document.getElementById("inno-calendar-event-marquee
|
|
|
757
773
|
}
|
|
758
774
|
`, document.head.appendChild(t);
|
|
759
775
|
}
|
|
760
|
-
const
|
|
776
|
+
const Pe = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, je = st, et = (t, r) => (o) => {
|
|
761
777
|
var a;
|
|
762
|
-
if (
|
|
763
|
-
const { variants: d, defaultVariants: g } =
|
|
764
|
-
const y = o?.[p],
|
|
778
|
+
if (r?.variants == null) return je(t, o?.class, o?.className);
|
|
779
|
+
const { variants: d, defaultVariants: g } = r, c = Object.keys(d).map((p) => {
|
|
780
|
+
const y = o?.[p], L = g?.[p];
|
|
765
781
|
if (y === null) return null;
|
|
766
|
-
const i =
|
|
782
|
+
const i = Pe(y) || Pe(L);
|
|
767
783
|
return d[p][i];
|
|
768
784
|
}), b = o && Object.entries(o).reduce((p, y) => {
|
|
769
|
-
let [
|
|
770
|
-
return i === void 0 || (p[
|
|
771
|
-
}, {}), z =
|
|
772
|
-
let { class:
|
|
785
|
+
let [L, i] = y;
|
|
786
|
+
return i === void 0 || (p[L] = i), p;
|
|
787
|
+
}, {}), z = r == null || (a = r.compoundVariants) === null || a === void 0 ? void 0 : a.reduce((p, y) => {
|
|
788
|
+
let { class: L, className: i, ...v } = y;
|
|
773
789
|
return Object.entries(v).every((h) => {
|
|
774
|
-
let [w,
|
|
775
|
-
return Array.isArray(
|
|
790
|
+
let [w, E] = h;
|
|
791
|
+
return Array.isArray(E) ? E.includes({
|
|
776
792
|
...g,
|
|
777
793
|
...b
|
|
778
794
|
}[w]) : {
|
|
779
795
|
...g,
|
|
780
796
|
...b
|
|
781
|
-
}[w] ===
|
|
797
|
+
}[w] === E;
|
|
782
798
|
}) ? [
|
|
783
799
|
...p,
|
|
784
|
-
|
|
800
|
+
L,
|
|
785
801
|
i
|
|
786
802
|
] : p;
|
|
787
803
|
}, []);
|
|
788
|
-
return
|
|
804
|
+
return je(t, c, z, o?.class, o?.className);
|
|
789
805
|
}, gt = et(
|
|
790
806
|
"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",
|
|
791
807
|
{
|
|
@@ -811,15 +827,15 @@ const je = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Be = st, e
|
|
|
811
827
|
}
|
|
812
828
|
}
|
|
813
829
|
), ce = ze(
|
|
814
|
-
({ className: t, variant:
|
|
830
|
+
({ className: t, variant: r, size: o, loading: a, disabled: d, children: g, ...c }, b) => /* @__PURE__ */ n(
|
|
815
831
|
"button",
|
|
816
832
|
{
|
|
817
|
-
className: l(gt({ variant:
|
|
833
|
+
className: l(gt({ variant: r, size: o, className: t })),
|
|
818
834
|
ref: b,
|
|
819
835
|
disabled: d || a,
|
|
820
836
|
...c,
|
|
821
837
|
children: [
|
|
822
|
-
a && /* @__PURE__ */
|
|
838
|
+
a && /* @__PURE__ */ n(
|
|
823
839
|
"svg",
|
|
824
840
|
{
|
|
825
841
|
className: "animate-spin -ml-1 mr-2 size-4",
|
|
@@ -855,15 +871,15 @@ const je = (t) => typeof t == "boolean" ? `${t}` : t === 0 ? "0" : t, Be = st, e
|
|
|
855
871
|
)
|
|
856
872
|
);
|
|
857
873
|
ce.displayName = "Button";
|
|
858
|
-
const tt = (...t) => t.filter((
|
|
874
|
+
const tt = (...t) => t.filter((r, o, a) => !!r && r.trim() !== "" && a.indexOf(r) === o).join(" ").trim();
|
|
859
875
|
const xt = (t) => t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
860
876
|
const bt = (t) => t.replace(
|
|
861
877
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
862
|
-
(
|
|
878
|
+
(r, o, a) => a ? a.toUpperCase() : o.toLowerCase()
|
|
863
879
|
);
|
|
864
880
|
const Re = (t) => {
|
|
865
|
-
const
|
|
866
|
-
return
|
|
881
|
+
const r = bt(t);
|
|
882
|
+
return r.charAt(0).toUpperCase() + r.slice(1);
|
|
867
883
|
};
|
|
868
884
|
var yt = {
|
|
869
885
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -877,15 +893,15 @@ var yt = {
|
|
|
877
893
|
strokeLinejoin: "round"
|
|
878
894
|
};
|
|
879
895
|
const wt = (t) => {
|
|
880
|
-
for (const
|
|
881
|
-
if (
|
|
896
|
+
for (const r in t)
|
|
897
|
+
if (r.startsWith("aria-") || r === "role" || r === "title")
|
|
882
898
|
return !0;
|
|
883
899
|
return !1;
|
|
884
900
|
};
|
|
885
901
|
const vt = ze(
|
|
886
902
|
({
|
|
887
903
|
color: t = "currentColor",
|
|
888
|
-
size:
|
|
904
|
+
size: r = 24,
|
|
889
905
|
strokeWidth: o = 2,
|
|
890
906
|
absoluteStrokeWidth: a,
|
|
891
907
|
className: d = "",
|
|
@@ -897,10 +913,10 @@ const vt = ze(
|
|
|
897
913
|
{
|
|
898
914
|
ref: z,
|
|
899
915
|
...yt,
|
|
900
|
-
width:
|
|
901
|
-
height:
|
|
916
|
+
width: r,
|
|
917
|
+
height: r,
|
|
902
918
|
stroke: t,
|
|
903
|
-
strokeWidth: a ? Number(o) * 24 / Number(
|
|
919
|
+
strokeWidth: a ? Number(o) * 24 / Number(r) : o,
|
|
904
920
|
className: tt("lucide", d),
|
|
905
921
|
...!g && !wt(b) && { "aria-hidden": "true" },
|
|
906
922
|
...b
|
|
@@ -911,11 +927,11 @@ const vt = ze(
|
|
|
911
927
|
]
|
|
912
928
|
)
|
|
913
929
|
);
|
|
914
|
-
const
|
|
930
|
+
const $e = (t, r) => {
|
|
915
931
|
const o = ze(
|
|
916
932
|
({ className: a, ...d }, g) => De(vt, {
|
|
917
933
|
ref: g,
|
|
918
|
-
iconNode:
|
|
934
|
+
iconNode: r,
|
|
919
935
|
className: tt(
|
|
920
936
|
`lucide-${xt(Re(t))}`,
|
|
921
937
|
`lucide-${t}`,
|
|
@@ -926,15 +942,15 @@ const Ie = (t, n) => {
|
|
|
926
942
|
);
|
|
927
943
|
return o.displayName = Re(t), o;
|
|
928
944
|
};
|
|
929
|
-
const Nt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], kt =
|
|
930
|
-
const Dt = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Ct =
|
|
931
|
-
const St = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Mt =
|
|
932
|
-
|
|
945
|
+
const Nt = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], kt = $e("check", Nt);
|
|
946
|
+
const Dt = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]], Ct = $e("chevron-right", Dt);
|
|
947
|
+
const St = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Mt = $e("circle", St), He = H.Root, Oe = H.Trigger, Tt = Y.forwardRef(({ className: t, inset: r, children: o, ...a }, d) => /* @__PURE__ */ n(
|
|
948
|
+
H.SubTrigger,
|
|
933
949
|
{
|
|
934
950
|
ref: d,
|
|
935
951
|
className: l(
|
|
936
952
|
"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",
|
|
937
|
-
|
|
953
|
+
r && "pl-8",
|
|
938
954
|
t
|
|
939
955
|
),
|
|
940
956
|
...a,
|
|
@@ -944,24 +960,24 @@ const St = [["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }]], Mt = Ie
|
|
|
944
960
|
]
|
|
945
961
|
}
|
|
946
962
|
));
|
|
947
|
-
Tt.displayName =
|
|
948
|
-
const zt = Y.forwardRef(({ className: t, ...
|
|
949
|
-
|
|
963
|
+
Tt.displayName = H.SubTrigger.displayName;
|
|
964
|
+
const zt = Y.forwardRef(({ className: t, ...r }, o) => /* @__PURE__ */ e(
|
|
965
|
+
H.SubContent,
|
|
950
966
|
{
|
|
951
967
|
ref: o,
|
|
952
968
|
className: l(
|
|
953
969
|
"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",
|
|
954
970
|
t
|
|
955
971
|
),
|
|
956
|
-
...
|
|
972
|
+
...r
|
|
957
973
|
}
|
|
958
974
|
));
|
|
959
|
-
zt.displayName =
|
|
960
|
-
const Me = Y.forwardRef(({ className: t, sideOffset:
|
|
961
|
-
|
|
975
|
+
zt.displayName = H.SubContent.displayName;
|
|
976
|
+
const Me = Y.forwardRef(({ className: t, sideOffset: r = 4, ...o }, a) => /* @__PURE__ */ e(H.Portal, { children: /* @__PURE__ */ e(
|
|
977
|
+
H.Content,
|
|
962
978
|
{
|
|
963
979
|
ref: a,
|
|
964
|
-
sideOffset:
|
|
980
|
+
sideOffset: r,
|
|
965
981
|
className: l(
|
|
966
982
|
"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",
|
|
967
983
|
t
|
|
@@ -969,22 +985,22 @@ const Me = Y.forwardRef(({ className: t, sideOffset: n = 4, ...o }, a) => /* @__
|
|
|
969
985
|
...o
|
|
970
986
|
}
|
|
971
987
|
) }));
|
|
972
|
-
Me.displayName =
|
|
973
|
-
const Te = Y.forwardRef(({ className: t, inset:
|
|
974
|
-
|
|
988
|
+
Me.displayName = H.Content.displayName;
|
|
989
|
+
const Te = Y.forwardRef(({ className: t, inset: r, ...o }, a) => /* @__PURE__ */ e(
|
|
990
|
+
H.Item,
|
|
975
991
|
{
|
|
976
992
|
ref: a,
|
|
977
993
|
className: l(
|
|
978
994
|
"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",
|
|
979
|
-
|
|
995
|
+
r && "pl-8",
|
|
980
996
|
t
|
|
981
997
|
),
|
|
982
998
|
...o
|
|
983
999
|
}
|
|
984
1000
|
));
|
|
985
|
-
Te.displayName =
|
|
986
|
-
const
|
|
987
|
-
|
|
1001
|
+
Te.displayName = H.Item.displayName;
|
|
1002
|
+
const Lt = Y.forwardRef(({ className: t, children: r, checked: o = !1, ...a }, d) => /* @__PURE__ */ n(
|
|
1003
|
+
H.CheckboxItem,
|
|
988
1004
|
{
|
|
989
1005
|
ref: d,
|
|
990
1006
|
className: l(
|
|
@@ -994,14 +1010,14 @@ const Wt = Y.forwardRef(({ className: t, children: n, checked: o = !1, ...a }, d
|
|
|
994
1010
|
checked: o,
|
|
995
1011
|
...a,
|
|
996
1012
|
children: [
|
|
997
|
-
/* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(
|
|
998
|
-
|
|
1013
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(H.ItemIndicator, { children: /* @__PURE__ */ e(kt, { className: "h-4 w-4" }) }) }),
|
|
1014
|
+
r
|
|
999
1015
|
]
|
|
1000
1016
|
}
|
|
1001
1017
|
));
|
|
1002
|
-
|
|
1003
|
-
const
|
|
1004
|
-
|
|
1018
|
+
Lt.displayName = H.CheckboxItem.displayName;
|
|
1019
|
+
const Wt = Y.forwardRef(({ className: t, children: r, ...o }, a) => /* @__PURE__ */ n(
|
|
1020
|
+
H.RadioItem,
|
|
1005
1021
|
{
|
|
1006
1022
|
ref: a,
|
|
1007
1023
|
className: l(
|
|
@@ -1010,31 +1026,31 @@ const Lt = Y.forwardRef(({ className: t, children: n, ...o }, a) => /* @__PURE__
|
|
|
1010
1026
|
),
|
|
1011
1027
|
...o,
|
|
1012
1028
|
children: [
|
|
1013
|
-
/* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(
|
|
1014
|
-
|
|
1029
|
+
/* @__PURE__ */ e("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center", children: /* @__PURE__ */ e(H.ItemIndicator, { children: /* @__PURE__ */ e(Mt, { className: "h-2 w-2 fill-current" }) }) }),
|
|
1030
|
+
r
|
|
1015
1031
|
]
|
|
1016
1032
|
}
|
|
1017
1033
|
));
|
|
1018
|
-
|
|
1019
|
-
const
|
|
1020
|
-
|
|
1034
|
+
Wt.displayName = H.RadioItem.displayName;
|
|
1035
|
+
const _t = Y.forwardRef(({ className: t, inset: r, ...o }, a) => /* @__PURE__ */ e(
|
|
1036
|
+
H.Label,
|
|
1021
1037
|
{
|
|
1022
1038
|
ref: a,
|
|
1023
|
-
className: l("px-2 py-1.5 text-sm font-semibold",
|
|
1039
|
+
className: l("px-2 py-1.5 text-sm font-semibold", r && "pl-8", t),
|
|
1024
1040
|
...o
|
|
1025
1041
|
}
|
|
1026
1042
|
));
|
|
1027
|
-
|
|
1028
|
-
const
|
|
1029
|
-
|
|
1043
|
+
_t.displayName = H.Label.displayName;
|
|
1044
|
+
const Et = Y.forwardRef(({ className: t, ...r }, o) => /* @__PURE__ */ e(
|
|
1045
|
+
H.Separator,
|
|
1030
1046
|
{
|
|
1031
1047
|
ref: o,
|
|
1032
1048
|
className: l("-mx-1 my-1 h-px bg-muted", t),
|
|
1033
|
-
...
|
|
1049
|
+
...r
|
|
1034
1050
|
}
|
|
1035
1051
|
));
|
|
1036
|
-
|
|
1037
|
-
const
|
|
1052
|
+
Et.displayName = H.Separator.displayName;
|
|
1053
|
+
const Bt = et(
|
|
1038
1054
|
"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",
|
|
1039
1055
|
{
|
|
1040
1056
|
variants: {
|
|
@@ -1048,10 +1064,10 @@ const $t = et(
|
|
|
1048
1064
|
defaultVariants: { variant: "default" }
|
|
1049
1065
|
}
|
|
1050
1066
|
);
|
|
1051
|
-
function
|
|
1052
|
-
return /* @__PURE__ */ e("div", { className: l(
|
|
1067
|
+
function $t({ className: t, variant: r, ...o }) {
|
|
1068
|
+
return /* @__PURE__ */ e("div", { className: l(Bt({ variant: r }), t), ...o });
|
|
1053
1069
|
}
|
|
1054
|
-
function
|
|
1070
|
+
function It({ className: t }) {
|
|
1055
1071
|
return /* @__PURE__ */ e(
|
|
1056
1072
|
"svg",
|
|
1057
1073
|
{
|
|
@@ -1069,7 +1085,7 @@ function At({ className: t }) {
|
|
|
1069
1085
|
}
|
|
1070
1086
|
);
|
|
1071
1087
|
}
|
|
1072
|
-
function
|
|
1088
|
+
function At({ className: t }) {
|
|
1073
1089
|
return /* @__PURE__ */ e(
|
|
1074
1090
|
"svg",
|
|
1075
1091
|
{
|
|
@@ -1087,7 +1103,7 @@ function Pt({ className: t }) {
|
|
|
1087
1103
|
}
|
|
1088
1104
|
);
|
|
1089
1105
|
}
|
|
1090
|
-
const
|
|
1106
|
+
const Pt = [
|
|
1091
1107
|
"January",
|
|
1092
1108
|
"February",
|
|
1093
1109
|
"March",
|
|
@@ -1101,9 +1117,9 @@ const jt = [
|
|
|
1101
1117
|
"November",
|
|
1102
1118
|
"December"
|
|
1103
1119
|
];
|
|
1104
|
-
function
|
|
1120
|
+
function jt({
|
|
1105
1121
|
date: t,
|
|
1106
|
-
view:
|
|
1122
|
+
view: r,
|
|
1107
1123
|
events: o = [],
|
|
1108
1124
|
onNavigatePrev: a,
|
|
1109
1125
|
onNavigateNext: d,
|
|
@@ -1111,17 +1127,17 @@ function Bt({
|
|
|
1111
1127
|
showEventCount: c = !0,
|
|
1112
1128
|
className: b
|
|
1113
1129
|
}) {
|
|
1114
|
-
const z =
|
|
1115
|
-
return /* @__PURE__ */
|
|
1116
|
-
/* @__PURE__ */
|
|
1117
|
-
/* @__PURE__ */
|
|
1130
|
+
const z = Pt[t.getMonth()], p = t.getFullYear(), y = c ? lt(o, t, r, g) : 0, L = dt(t, r);
|
|
1131
|
+
return /* @__PURE__ */ n("div", { className: l("min-w-0 flex-1", b), children: [
|
|
1132
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 sm:gap-2 flex-wrap", children: [
|
|
1133
|
+
/* @__PURE__ */ n("span", { className: "text-base sm:text-lg font-semibold truncate", children: [
|
|
1118
1134
|
z,
|
|
1119
1135
|
" ",
|
|
1120
1136
|
p
|
|
1121
1137
|
] }),
|
|
1122
|
-
c && /* @__PURE__ */ e(
|
|
1138
|
+
c && /* @__PURE__ */ e($t, { variant: "outline", className: "px-1 sm:px-1.5 text-[10px] sm:text-xs shrink-0", children: y })
|
|
1123
1139
|
] }),
|
|
1124
|
-
/* @__PURE__ */
|
|
1140
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 sm:gap-2", children: [
|
|
1125
1141
|
/* @__PURE__ */ e(
|
|
1126
1142
|
ce,
|
|
1127
1143
|
{
|
|
@@ -1129,10 +1145,10 @@ function Bt({
|
|
|
1129
1145
|
size: "icon",
|
|
1130
1146
|
className: "size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",
|
|
1131
1147
|
onClick: a,
|
|
1132
|
-
children: /* @__PURE__ */ e(
|
|
1148
|
+
children: /* @__PURE__ */ e(It, {})
|
|
1133
1149
|
}
|
|
1134
1150
|
),
|
|
1135
|
-
/* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children:
|
|
1151
|
+
/* @__PURE__ */ e("p", { className: "text-xs sm:text-sm text-muted-foreground truncate", children: L }),
|
|
1136
1152
|
/* @__PURE__ */ e(
|
|
1137
1153
|
ce,
|
|
1138
1154
|
{
|
|
@@ -1140,7 +1156,7 @@ function Bt({
|
|
|
1140
1156
|
size: "icon",
|
|
1141
1157
|
className: "size-5 sm:size-6 [&_svg]:size-3 sm:[&_svg]:size-4",
|
|
1142
1158
|
onClick: d,
|
|
1143
|
-
children: /* @__PURE__ */ e(
|
|
1159
|
+
children: /* @__PURE__ */ e(At, {})
|
|
1144
1160
|
}
|
|
1145
1161
|
)
|
|
1146
1162
|
] })
|
|
@@ -1160,9 +1176,9 @@ const Rt = [
|
|
|
1160
1176
|
"NOV",
|
|
1161
1177
|
"DEC"
|
|
1162
1178
|
];
|
|
1163
|
-
function Ht({ onClick: t, className:
|
|
1179
|
+
function Ht({ onClick: t, className: r }) {
|
|
1164
1180
|
const o = /* @__PURE__ */ new Date();
|
|
1165
|
-
return /* @__PURE__ */
|
|
1181
|
+
return /* @__PURE__ */ n(
|
|
1166
1182
|
"button",
|
|
1167
1183
|
{
|
|
1168
1184
|
type: "button",
|
|
@@ -1170,7 +1186,7 @@ function Ht({ onClick: t, className: n }) {
|
|
|
1170
1186
|
"flex size-11 sm:size-14 flex-col items-start overflow-hidden rounded-lg border shrink-0",
|
|
1171
1187
|
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
1172
1188
|
"hover:bg-accent/50 transition-colors",
|
|
1173
|
-
|
|
1189
|
+
r
|
|
1174
1190
|
),
|
|
1175
1191
|
onClick: t,
|
|
1176
1192
|
children: [
|
|
@@ -1181,7 +1197,7 @@ function Ht({ onClick: t, className: n }) {
|
|
|
1181
1197
|
);
|
|
1182
1198
|
}
|
|
1183
1199
|
function Ot({ className: t }) {
|
|
1184
|
-
return /* @__PURE__ */
|
|
1200
|
+
return /* @__PURE__ */ n(
|
|
1185
1201
|
"svg",
|
|
1186
1202
|
{
|
|
1187
1203
|
className: t,
|
|
@@ -1210,7 +1226,7 @@ function Ot({ className: t }) {
|
|
|
1210
1226
|
);
|
|
1211
1227
|
}
|
|
1212
1228
|
function ye({ className: t }) {
|
|
1213
|
-
return /* @__PURE__ */
|
|
1229
|
+
return /* @__PURE__ */ n(
|
|
1214
1230
|
"svg",
|
|
1215
1231
|
{
|
|
1216
1232
|
className: t,
|
|
@@ -1251,7 +1267,7 @@ function Fe({ className: t }) {
|
|
|
1251
1267
|
);
|
|
1252
1268
|
}
|
|
1253
1269
|
function Ft({ className: t }) {
|
|
1254
|
-
return /* @__PURE__ */
|
|
1270
|
+
return /* @__PURE__ */ n(
|
|
1255
1271
|
"svg",
|
|
1256
1272
|
{
|
|
1257
1273
|
className: t,
|
|
@@ -1272,7 +1288,7 @@ function Ft({ className: t }) {
|
|
|
1272
1288
|
);
|
|
1273
1289
|
}
|
|
1274
1290
|
function Ve({ className: t }) {
|
|
1275
|
-
return /* @__PURE__ */
|
|
1291
|
+
return /* @__PURE__ */ n(
|
|
1276
1292
|
"svg",
|
|
1277
1293
|
{
|
|
1278
1294
|
className: t,
|
|
@@ -1293,7 +1309,7 @@ function Ve({ className: t }) {
|
|
|
1293
1309
|
);
|
|
1294
1310
|
}
|
|
1295
1311
|
function Vt({ className: t }) {
|
|
1296
|
-
return /* @__PURE__ */
|
|
1312
|
+
return /* @__PURE__ */ n(
|
|
1297
1313
|
"svg",
|
|
1298
1314
|
{
|
|
1299
1315
|
className: t,
|
|
@@ -1318,7 +1334,7 @@ function Vt({ className: t }) {
|
|
|
1318
1334
|
);
|
|
1319
1335
|
}
|
|
1320
1336
|
function Gt({ className: t }) {
|
|
1321
|
-
return /* @__PURE__ */
|
|
1337
|
+
return /* @__PURE__ */ n(
|
|
1322
1338
|
"svg",
|
|
1323
1339
|
{
|
|
1324
1340
|
className: t,
|
|
@@ -1339,7 +1355,7 @@ function Gt({ className: t }) {
|
|
|
1339
1355
|
);
|
|
1340
1356
|
}
|
|
1341
1357
|
function Ut({ className: t }) {
|
|
1342
|
-
return /* @__PURE__ */
|
|
1358
|
+
return /* @__PURE__ */ n(
|
|
1343
1359
|
"svg",
|
|
1344
1360
|
{
|
|
1345
1361
|
className: t,
|
|
@@ -1361,7 +1377,7 @@ function Ut({ className: t }) {
|
|
|
1361
1377
|
);
|
|
1362
1378
|
}
|
|
1363
1379
|
function qt({ className: t }) {
|
|
1364
|
-
return /* @__PURE__ */
|
|
1380
|
+
return /* @__PURE__ */ n(
|
|
1365
1381
|
"svg",
|
|
1366
1382
|
{
|
|
1367
1383
|
className: t,
|
|
@@ -1395,9 +1411,9 @@ const Kt = [
|
|
|
1395
1411
|
{ value: "timeline-3day", label: "3 Days", icon: ye },
|
|
1396
1412
|
{ value: "timeline-week", label: "7 Days", icon: ye }
|
|
1397
1413
|
];
|
|
1398
|
-
function
|
|
1414
|
+
function lr({
|
|
1399
1415
|
currentDate: t,
|
|
1400
|
-
view:
|
|
1416
|
+
view: r,
|
|
1401
1417
|
events: o = [],
|
|
1402
1418
|
onNavigateToday: a,
|
|
1403
1419
|
onNavigatePrev: d,
|
|
@@ -1407,16 +1423,16 @@ function dn({
|
|
|
1407
1423
|
onAddEvent: z,
|
|
1408
1424
|
availableViews: p = ["day", "week", "month", "agenda"],
|
|
1409
1425
|
showTimelineViews: y = !1,
|
|
1410
|
-
timelineViews:
|
|
1426
|
+
timelineViews: L,
|
|
1411
1427
|
settingsContent: i,
|
|
1412
1428
|
showSettings: v = !1,
|
|
1413
1429
|
filterContent: h,
|
|
1414
1430
|
actions: w,
|
|
1415
|
-
className:
|
|
1416
|
-
weekStartsOn:
|
|
1431
|
+
className: E,
|
|
1432
|
+
weekStartsOn: W = 1,
|
|
1417
1433
|
labels: D = {}
|
|
1418
1434
|
}) {
|
|
1419
|
-
const x =
|
|
1435
|
+
const x = V(
|
|
1420
1436
|
() => ({
|
|
1421
1437
|
today: "Today",
|
|
1422
1438
|
addEvent: "Add Event",
|
|
@@ -1425,31 +1441,31 @@ function dn({
|
|
|
1425
1441
|
...D
|
|
1426
1442
|
}),
|
|
1427
1443
|
[D]
|
|
1428
|
-
),
|
|
1444
|
+
), O = () => {
|
|
1429
1445
|
a?.(), c?.("today");
|
|
1430
|
-
},
|
|
1446
|
+
}, P = () => {
|
|
1431
1447
|
d?.(), c?.("prev");
|
|
1432
|
-
},
|
|
1448
|
+
}, j = () => {
|
|
1433
1449
|
g?.(), c?.("next");
|
|
1434
|
-
},
|
|
1435
|
-
|
|
1436
|
-
),
|
|
1450
|
+
}, B = ["day", "week", "month", "year", "agenda"].includes(
|
|
1451
|
+
r
|
|
1452
|
+
), F = r.startsWith("timeline-") || r.startsWith("resource-"), u = Kt.filter(
|
|
1437
1453
|
(m) => p.includes(m.value)
|
|
1438
|
-
), k =
|
|
1439
|
-
return /* @__PURE__ */
|
|
1440
|
-
/* @__PURE__ */
|
|
1441
|
-
/* @__PURE__ */
|
|
1442
|
-
/* @__PURE__ */
|
|
1443
|
-
/* @__PURE__ */ e(Ht, { onClick:
|
|
1454
|
+
), k = B ? u.find((m) => m.value === r) : null, I = F ? Ge.find((m) => m.value === r) : null;
|
|
1455
|
+
return /* @__PURE__ */ n("div", { className: l("flex flex-col w-full gap-3 mb-2", E), children: [
|
|
1456
|
+
/* @__PURE__ */ n("div", { className: "flex lg:flex-row flex-col w-full justify-between gap-3", children: [
|
|
1457
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between gap-2", children: [
|
|
1458
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-2 sm:gap-3 min-w-0", children: [
|
|
1459
|
+
/* @__PURE__ */ e(Ht, { onClick: O }),
|
|
1444
1460
|
/* @__PURE__ */ e(
|
|
1445
|
-
|
|
1461
|
+
jt,
|
|
1446
1462
|
{
|
|
1447
1463
|
date: t,
|
|
1448
|
-
view:
|
|
1464
|
+
view: r,
|
|
1449
1465
|
events: o,
|
|
1450
|
-
onNavigatePrev:
|
|
1451
|
-
onNavigateNext:
|
|
1452
|
-
weekStartsOn:
|
|
1466
|
+
onNavigatePrev: P,
|
|
1467
|
+
onNavigateNext: j,
|
|
1468
|
+
weekStartsOn: W
|
|
1453
1469
|
}
|
|
1454
1470
|
)
|
|
1455
1471
|
] }),
|
|
@@ -1463,15 +1479,15 @@ function dn({
|
|
|
1463
1479
|
}
|
|
1464
1480
|
)
|
|
1465
1481
|
] }),
|
|
1466
|
-
/* @__PURE__ */
|
|
1467
|
-
b && u.length > 0 && /* @__PURE__ */
|
|
1468
|
-
/* @__PURE__ */
|
|
1482
|
+
/* @__PURE__ */ n("div", { className: "flex items-center gap-1.5 sm:gap-2 overflow-x-auto pb-1 -mb-1 scrollbar-none", children: [
|
|
1483
|
+
b && u.length > 0 && /* @__PURE__ */ n(He, { children: [
|
|
1484
|
+
/* @__PURE__ */ n(
|
|
1469
1485
|
Oe,
|
|
1470
1486
|
{
|
|
1471
1487
|
className: l(
|
|
1472
1488
|
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
|
|
1473
1489
|
"h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
|
|
1474
|
-
|
|
1490
|
+
B ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-background hover:bg-accent hover:text-accent-foreground"
|
|
1475
1491
|
),
|
|
1476
1492
|
children: [
|
|
1477
1493
|
/* @__PURE__ */ e(Ot, { className: "size-4" }),
|
|
@@ -1481,17 +1497,17 @@ function dn({
|
|
|
1481
1497
|
}
|
|
1482
1498
|
),
|
|
1483
1499
|
/* @__PURE__ */ e(Me, { align: "start", className: "min-w-[120px]", children: u.map((m) => {
|
|
1484
|
-
const
|
|
1485
|
-
return /* @__PURE__ */
|
|
1500
|
+
const _ = m.icon;
|
|
1501
|
+
return /* @__PURE__ */ n(
|
|
1486
1502
|
Te,
|
|
1487
1503
|
{
|
|
1488
1504
|
onClick: () => b(m.value),
|
|
1489
1505
|
className: l(
|
|
1490
1506
|
"gap-2",
|
|
1491
|
-
|
|
1507
|
+
r === m.value && "bg-accent"
|
|
1492
1508
|
),
|
|
1493
1509
|
children: [
|
|
1494
|
-
/* @__PURE__ */ e(
|
|
1510
|
+
/* @__PURE__ */ e(_, { className: "size-4" }),
|
|
1495
1511
|
/* @__PURE__ */ e("span", { children: m.label })
|
|
1496
1512
|
]
|
|
1497
1513
|
},
|
|
@@ -1499,34 +1515,34 @@ function dn({
|
|
|
1499
1515
|
);
|
|
1500
1516
|
}) })
|
|
1501
1517
|
] }),
|
|
1502
|
-
y && b && /* @__PURE__ */
|
|
1503
|
-
/* @__PURE__ */
|
|
1518
|
+
y && b && /* @__PURE__ */ n(He, { children: [
|
|
1519
|
+
/* @__PURE__ */ n(
|
|
1504
1520
|
Oe,
|
|
1505
1521
|
{
|
|
1506
1522
|
className: l(
|
|
1507
1523
|
"inline-flex items-center justify-center rounded-md text-sm font-medium transition-colors",
|
|
1508
1524
|
"h-10 px-2 sm:px-3 gap-1 sm:gap-1.5 shrink-0",
|
|
1509
|
-
|
|
1525
|
+
F ? "bg-primary text-primary-foreground hover:bg-primary/90" : "border border-input bg-white hover:bg-zinc-50 hover:text-accent-foreground"
|
|
1510
1526
|
),
|
|
1511
1527
|
children: [
|
|
1512
1528
|
/* @__PURE__ */ e(ye, { className: "size-4" }),
|
|
1513
|
-
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children:
|
|
1529
|
+
/* @__PURE__ */ e("span", { className: "text-xs sm:text-sm font-medium", children: I?.label ?? x.resourceView }),
|
|
1514
1530
|
/* @__PURE__ */ e(Fe, { className: "size-3 opacity-60" })
|
|
1515
1531
|
]
|
|
1516
1532
|
}
|
|
1517
1533
|
),
|
|
1518
1534
|
/* @__PURE__ */ e(Me, { align: "start", className: "min-w-[120px]", children: Ge.map((m) => {
|
|
1519
|
-
const
|
|
1520
|
-
return /* @__PURE__ */
|
|
1535
|
+
const _ = m.icon;
|
|
1536
|
+
return /* @__PURE__ */ n(
|
|
1521
1537
|
Te,
|
|
1522
1538
|
{
|
|
1523
1539
|
onClick: () => b(m.value),
|
|
1524
1540
|
className: l(
|
|
1525
1541
|
"gap-2",
|
|
1526
|
-
|
|
1542
|
+
r === m.value && "bg-accent"
|
|
1527
1543
|
),
|
|
1528
1544
|
children: [
|
|
1529
|
-
/* @__PURE__ */ e(
|
|
1545
|
+
/* @__PURE__ */ e(_, { className: "size-4" }),
|
|
1530
1546
|
/* @__PURE__ */ e("span", { children: m.label })
|
|
1531
1547
|
]
|
|
1532
1548
|
},
|
|
@@ -1534,8 +1550,8 @@ function dn({
|
|
|
1534
1550
|
);
|
|
1535
1551
|
}) })
|
|
1536
1552
|
] }),
|
|
1537
|
-
v && i && /* @__PURE__ */
|
|
1538
|
-
/* @__PURE__ */ e(
|
|
1553
|
+
v && i && /* @__PURE__ */ n(re, { children: [
|
|
1554
|
+
/* @__PURE__ */ e(ne, { asChild: !0, children: /* @__PURE__ */ e(
|
|
1539
1555
|
ce,
|
|
1540
1556
|
{
|
|
1541
1557
|
variant: "outline",
|
|
@@ -1555,7 +1571,7 @@ function dn({
|
|
|
1555
1571
|
)
|
|
1556
1572
|
] }),
|
|
1557
1573
|
w,
|
|
1558
|
-
z && /* @__PURE__ */
|
|
1574
|
+
z && /* @__PURE__ */ n(
|
|
1559
1575
|
ce,
|
|
1560
1576
|
{
|
|
1561
1577
|
className: "hidden lg:flex shrink-0 max-h-10",
|
|
@@ -1571,9 +1587,9 @@ function dn({
|
|
|
1571
1587
|
h && /* @__PURE__ */ e("div", { className: "flex items-center gap-2 pb-1 -mb-1 scrollbar-none", children: h })
|
|
1572
1588
|
] });
|
|
1573
1589
|
}
|
|
1574
|
-
function
|
|
1590
|
+
function dr({
|
|
1575
1591
|
events: t,
|
|
1576
|
-
date:
|
|
1592
|
+
date: r,
|
|
1577
1593
|
daysAhead: o = 60,
|
|
1578
1594
|
badgeVariant: a = "colored",
|
|
1579
1595
|
onEventClick: d,
|
|
@@ -1583,12 +1599,12 @@ function cn({
|
|
|
1583
1599
|
slots: z,
|
|
1584
1600
|
classNames: p
|
|
1585
1601
|
}) {
|
|
1586
|
-
const y =
|
|
1587
|
-
const i = new Date(
|
|
1602
|
+
const y = V(() => {
|
|
1603
|
+
const i = new Date(r);
|
|
1588
1604
|
i.setHours(0, 0, 0, 0);
|
|
1589
1605
|
const v = new Date(i);
|
|
1590
1606
|
return v.setDate(v.getDate() + o), t.filter((h) => h.endDate >= i && h.startDate <= v);
|
|
1591
|
-
}, [t, o,
|
|
1607
|
+
}, [t, o, r]), L = V(() => {
|
|
1592
1608
|
const i = ct(y), v = [];
|
|
1593
1609
|
for (const [h, w] of i)
|
|
1594
1610
|
v.push({
|
|
@@ -1598,21 +1614,21 @@ function cn({
|
|
|
1598
1614
|
});
|
|
1599
1615
|
return v.sort((h, w) => h.date.getTime() - w.date.getTime()), v;
|
|
1600
1616
|
}, [y]);
|
|
1601
|
-
return
|
|
1617
|
+
return L.length === 0 ? /* @__PURE__ */ e("div", { className: l("flex flex-col items-center justify-center h-full py-12", g), children: /* @__PURE__ */ n("div", { className: "text-center", children: [
|
|
1602
1618
|
/* @__PURE__ */ e("p", { className: "text-muted-foreground", children: "No events found" }),
|
|
1603
1619
|
/* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground/70", children: "No events scheduled for this period" })
|
|
1604
|
-
] }) }) : /* @__PURE__ */
|
|
1605
|
-
/* @__PURE__ */ e("div", { className: "sticky top-0 z-10 bg-background border-b px-4 py-3", children: /* @__PURE__ */
|
|
1620
|
+
] }) }) : /* @__PURE__ */ n("div", { className: l("flex flex-col h-full overflow-auto", p?.agendaList, g), children: [
|
|
1621
|
+
/* @__PURE__ */ e("div", { className: "sticky top-0 z-10 bg-background border-b px-4 py-3", children: /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
|
|
1606
1622
|
/* @__PURE__ */ e("h2", { className: "text-lg font-medium", children: "Schedule" }),
|
|
1607
|
-
/* @__PURE__ */
|
|
1623
|
+
/* @__PURE__ */ n("span", { className: "text-sm text-muted-foreground", children: [
|
|
1608
1624
|
y.length,
|
|
1609
1625
|
" event",
|
|
1610
1626
|
y.length !== 1 ? "s" : ""
|
|
1611
1627
|
] })
|
|
1612
1628
|
] }) }),
|
|
1613
|
-
/* @__PURE__ */ e("div", { className: "flex-1", children:
|
|
1614
|
-
const w = te(i),
|
|
1615
|
-
return /* @__PURE__ */
|
|
1629
|
+
/* @__PURE__ */ e("div", { className: "flex-1", children: L.map(({ date: i, dateKey: v, events: h }) => {
|
|
1630
|
+
const w = te(i), E = i.toLocaleDateString([], { weekday: "short" }), W = i.getDate(), D = i.toLocaleDateString([], { month: "short" });
|
|
1631
|
+
return /* @__PURE__ */ n("div", { className: l("", p?.agendaDayGroup), children: [
|
|
1616
1632
|
/* @__PURE__ */ e(
|
|
1617
1633
|
"div",
|
|
1618
1634
|
{
|
|
@@ -1620,8 +1636,8 @@ function cn({
|
|
|
1620
1636
|
"sticky top-[52px] z-10 bg-background px-4 py-3 border-b",
|
|
1621
1637
|
p?.agendaDayHeader
|
|
1622
1638
|
),
|
|
1623
|
-
children: /* @__PURE__ */
|
|
1624
|
-
/* @__PURE__ */
|
|
1639
|
+
children: /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
|
|
1640
|
+
/* @__PURE__ */ n("div", { className: "flex flex-col items-center min-w-[40px]", children: [
|
|
1625
1641
|
/* @__PURE__ */ e(
|
|
1626
1642
|
"span",
|
|
1627
1643
|
{
|
|
@@ -1629,7 +1645,7 @@ function cn({
|
|
|
1629
1645
|
"text-[11px] font-medium uppercase tracking-wide",
|
|
1630
1646
|
w ? "text-primary" : "text-muted-foreground"
|
|
1631
1647
|
),
|
|
1632
|
-
children:
|
|
1648
|
+
children: E
|
|
1633
1649
|
}
|
|
1634
1650
|
),
|
|
1635
1651
|
/* @__PURE__ */ e(
|
|
@@ -1640,11 +1656,11 @@ function cn({
|
|
|
1640
1656
|
"size-10 text-xl font-normal",
|
|
1641
1657
|
w ? "bg-primary text-primary-foreground" : "text-foreground"
|
|
1642
1658
|
),
|
|
1643
|
-
children:
|
|
1659
|
+
children: W
|
|
1644
1660
|
}
|
|
1645
1661
|
)
|
|
1646
1662
|
] }),
|
|
1647
|
-
/* @__PURE__ */
|
|
1663
|
+
/* @__PURE__ */ n("span", { className: "text-sm text-muted-foreground", children: [
|
|
1648
1664
|
D,
|
|
1649
1665
|
" ",
|
|
1650
1666
|
i.getFullYear()
|
|
@@ -1674,17 +1690,17 @@ function cn({
|
|
|
1674
1690
|
}) })
|
|
1675
1691
|
] });
|
|
1676
1692
|
}
|
|
1677
|
-
function
|
|
1693
|
+
function rt({
|
|
1678
1694
|
events: t,
|
|
1679
|
-
date:
|
|
1695
|
+
date: r,
|
|
1680
1696
|
onEventClick: o,
|
|
1681
1697
|
className: a
|
|
1682
1698
|
}) {
|
|
1683
|
-
return t.length === 0 ? null : /* @__PURE__ */
|
|
1699
|
+
return t.length === 0 ? null : /* @__PURE__ */ n("div", { className: l("border-b bg-muted/20 px-2 py-1.5 space-y-1", "sm:px-4 sm:py-2", a), children: [
|
|
1684
1700
|
/* @__PURE__ */ e("span", { className: "text-[10px] font-medium text-muted-foreground sm:text-xs", children: "All day / Multi-day" }),
|
|
1685
1701
|
/* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: t.map((d) => {
|
|
1686
|
-
const g = fe(d.color), c =
|
|
1687
|
-
return /* @__PURE__ */
|
|
1702
|
+
const g = fe(d.color), c = Ae(d.startDate, r), b = Ae(d.endDate, r);
|
|
1703
|
+
return /* @__PURE__ */ n(
|
|
1688
1704
|
"button",
|
|
1689
1705
|
{
|
|
1690
1706
|
type: "button",
|
|
@@ -1708,9 +1724,9 @@ function nt({
|
|
|
1708
1724
|
] });
|
|
1709
1725
|
}
|
|
1710
1726
|
const Yt = 5;
|
|
1711
|
-
function
|
|
1727
|
+
function nt({
|
|
1712
1728
|
slot: t,
|
|
1713
|
-
onSelectionStart:
|
|
1729
|
+
onSelectionStart: r,
|
|
1714
1730
|
onSelectionMove: o,
|
|
1715
1731
|
onSelectionEnd: a,
|
|
1716
1732
|
isSelected: d = !1,
|
|
@@ -1720,39 +1736,39 @@ function rt({
|
|
|
1720
1736
|
children: z,
|
|
1721
1737
|
className: p,
|
|
1722
1738
|
height: y,
|
|
1723
|
-
style:
|
|
1739
|
+
style: L,
|
|
1724
1740
|
dataAttributes: i
|
|
1725
1741
|
}) {
|
|
1726
|
-
const v = se(null), h = se(!1), w = se(!1),
|
|
1742
|
+
const v = se(null), h = se(!1), w = se(!1), E = se(null), [W, D] = oe(!1), x = We(), O = M(
|
|
1727
1743
|
(m) => {
|
|
1728
|
-
c || m.button !== 0 && m.pointerType === "mouse" || (m.preventDefault(), v.current = { x: m.clientX, y: m.clientY }, h.current = !1, w.current = !0,
|
|
1744
|
+
c || m.button !== 0 && m.pointerType === "mouse" || (m.preventDefault(), v.current = { x: m.clientX, y: m.clientY }, h.current = !1, w.current = !0, r?.(t));
|
|
1729
1745
|
},
|
|
1730
|
-
[c, t,
|
|
1731
|
-
),
|
|
1746
|
+
[c, t, r]
|
|
1747
|
+
), P = M(
|
|
1732
1748
|
(m) => {
|
|
1733
1749
|
if (!(v.current && w.current && !c)) return;
|
|
1734
|
-
const
|
|
1735
|
-
Math.sqrt(
|
|
1750
|
+
const _ = m.clientX - v.current.x, $ = m.clientY - v.current.y;
|
|
1751
|
+
Math.sqrt(_ * _ + $ * $) >= Yt && (h.current = !0);
|
|
1736
1752
|
},
|
|
1737
1753
|
[c]
|
|
1738
|
-
),
|
|
1754
|
+
), j = M(
|
|
1739
1755
|
(m) => {
|
|
1740
1756
|
c || (m.buttons > 0 || g) && o?.(t);
|
|
1741
1757
|
},
|
|
1742
1758
|
[c, g, t, o]
|
|
1743
|
-
),
|
|
1759
|
+
), B = M(() => {
|
|
1744
1760
|
c || (a?.(), v.current = null, h.current = !1, w.current = !1);
|
|
1745
|
-
}, [c, a]),
|
|
1761
|
+
}, [c, a]), F = M(
|
|
1746
1762
|
(m) => {
|
|
1747
1763
|
if (!x?.isDragging || c) return;
|
|
1748
1764
|
m.preventDefault(), m.dataTransfer.dropEffect = "move", D(!0);
|
|
1749
|
-
const
|
|
1765
|
+
const _ = /* @__PURE__ */ new Date(), $ = t.hour ?? _.getHours(), N = t.minute ?? (_.getMinutes() >= 30 ? 30 : 0);
|
|
1750
1766
|
x.updateDragPreview?.(t.date, $, N);
|
|
1751
1767
|
},
|
|
1752
1768
|
[x, c, t]
|
|
1753
|
-
), u =
|
|
1769
|
+
), u = M(() => {
|
|
1754
1770
|
D(!1);
|
|
1755
|
-
}, []), k =
|
|
1771
|
+
}, []), k = M(
|
|
1756
1772
|
(m) => {
|
|
1757
1773
|
m.preventDefault(), D(!1), !(!x?.isDragging || c) && x.endDrag?.();
|
|
1758
1774
|
},
|
|
@@ -1766,27 +1782,27 @@ function rt({
|
|
|
1766
1782
|
window.removeEventListener("pointerup", m), window.removeEventListener("pointercancel", m);
|
|
1767
1783
|
};
|
|
1768
1784
|
}, []);
|
|
1769
|
-
const
|
|
1785
|
+
const I = M(
|
|
1770
1786
|
(m) => {
|
|
1771
|
-
c || (m.key === "Enter" || m.key === " ") && (m.preventDefault(),
|
|
1787
|
+
c || (m.key === "Enter" || m.key === " ") && (m.preventDefault(), r?.(t), a?.());
|
|
1772
1788
|
},
|
|
1773
|
-
[c, t,
|
|
1789
|
+
[c, t, r, a]
|
|
1774
1790
|
);
|
|
1775
1791
|
return /* @__PURE__ */ e(
|
|
1776
1792
|
"button",
|
|
1777
1793
|
{
|
|
1778
|
-
ref:
|
|
1794
|
+
ref: E,
|
|
1779
1795
|
type: "button",
|
|
1780
1796
|
"aria-label": b,
|
|
1781
1797
|
"aria-disabled": c,
|
|
1782
1798
|
"aria-pressed": d,
|
|
1783
1799
|
disabled: c,
|
|
1784
|
-
onPointerDown:
|
|
1785
|
-
onPointerMove:
|
|
1786
|
-
onPointerUp:
|
|
1787
|
-
onPointerEnter:
|
|
1788
|
-
onKeyDown:
|
|
1789
|
-
onDragOver:
|
|
1800
|
+
onPointerDown: O,
|
|
1801
|
+
onPointerMove: P,
|
|
1802
|
+
onPointerUp: B,
|
|
1803
|
+
onPointerEnter: j,
|
|
1804
|
+
onKeyDown: I,
|
|
1805
|
+
onDragOver: F,
|
|
1790
1806
|
onDragLeave: u,
|
|
1791
1807
|
onDrop: k,
|
|
1792
1808
|
className: l(
|
|
@@ -1797,12 +1813,12 @@ function rt({
|
|
|
1797
1813
|
// Selection state — blue tint matching the primary color
|
|
1798
1814
|
d && "bg-blue-100/70",
|
|
1799
1815
|
// Drag over state - visual feedback when event is dragged over
|
|
1800
|
-
|
|
1816
|
+
W && "bg-primary/20 ring-2 ring-primary ring-inset",
|
|
1801
1817
|
// Disabled state
|
|
1802
1818
|
c && "cursor-not-allowed opacity-50",
|
|
1803
1819
|
p
|
|
1804
1820
|
),
|
|
1805
|
-
style: { height: y, ...
|
|
1821
|
+
style: { height: y, ...L },
|
|
1806
1822
|
...i,
|
|
1807
1823
|
children: z
|
|
1808
1824
|
}
|
|
@@ -1810,23 +1826,23 @@ function rt({
|
|
|
1810
1826
|
}
|
|
1811
1827
|
function ot({
|
|
1812
1828
|
slot: t,
|
|
1813
|
-
date:
|
|
1829
|
+
date: r,
|
|
1814
1830
|
hour: o,
|
|
1815
1831
|
minute: a,
|
|
1816
1832
|
ariaLabel: d,
|
|
1817
1833
|
...g
|
|
1818
1834
|
}) {
|
|
1819
|
-
const c = t ?? { date:
|
|
1820
|
-
return /* @__PURE__ */ e(
|
|
1835
|
+
const c = t ?? { date: r, hour: o ?? 0, minute: a ?? 0 }, b = d ?? `Add event at ${(c.hour ?? 0).toString().padStart(2, "0")}:${(c.minute ?? 0).toString().padStart(2, "0")} on ${c.date.toLocaleDateString()}`;
|
|
1836
|
+
return /* @__PURE__ */ e(nt, { slot: c, ariaLabel: b, ...g });
|
|
1821
1837
|
}
|
|
1822
|
-
function Xt({ slot: t, date:
|
|
1823
|
-
const d = t ?? { date:
|
|
1824
|
-
return /* @__PURE__ */ e(
|
|
1838
|
+
function Xt({ slot: t, date: r, ariaLabel: o, ...a }) {
|
|
1839
|
+
const d = t ?? { date: r }, g = o ?? `Select ${d.date.toLocaleDateString()}`;
|
|
1840
|
+
return /* @__PURE__ */ e(nt, { slot: d, ariaLabel: g, ...a });
|
|
1825
1841
|
}
|
|
1826
1842
|
const me = 96, Ne = 72, ke = 80;
|
|
1827
|
-
function
|
|
1843
|
+
function cr({
|
|
1828
1844
|
events: t,
|
|
1829
|
-
date:
|
|
1845
|
+
date: r,
|
|
1830
1846
|
visibleHours: o = { startHour: 0, endHour: 24 },
|
|
1831
1847
|
workingHours: a,
|
|
1832
1848
|
slotDuration: d = 30,
|
|
@@ -1836,60 +1852,65 @@ function un({
|
|
|
1836
1852
|
className: z,
|
|
1837
1853
|
renderEvent: p,
|
|
1838
1854
|
renderPopover: y,
|
|
1839
|
-
slots:
|
|
1855
|
+
slots: L,
|
|
1840
1856
|
classNames: i
|
|
1841
1857
|
}) {
|
|
1842
|
-
const v = 60 / d, h = 100 / v, w =
|
|
1858
|
+
const v = 60 / d, h = 100 / v, w = V(() => {
|
|
1843
1859
|
const C = [];
|
|
1844
1860
|
for (let s = 0; s < v; s++)
|
|
1845
1861
|
C.push(s * d);
|
|
1846
1862
|
return C;
|
|
1847
|
-
}, [v, d]),
|
|
1848
|
-
const C = Ye(
|
|
1863
|
+
}, [v, d]), E = V(() => Le(t, r), [t, r]), { singleDay: W, multiDay: D } = V(() => Ke(E), [E]), x = V(() => {
|
|
1864
|
+
const C = Ye(W, r, o, me), s = /* @__PURE__ */ new Map();
|
|
1849
1865
|
for (const f of C)
|
|
1850
1866
|
s.set(f.event.id, f.position);
|
|
1851
1867
|
return s;
|
|
1852
|
-
}, [
|
|
1853
|
-
if (!
|
|
1854
|
-
const C =
|
|
1868
|
+
}, [W, r, o]), O = V(() => Xe(o), [o]), P = /* @__PURE__ */ new Date(), j = te(r), B = V(() => {
|
|
1869
|
+
if (!j) return 0;
|
|
1870
|
+
const C = P.getHours() + P.getMinutes() / 60;
|
|
1855
1871
|
return C < o.startHour || C > o.endHour ? -1 : (C - o.startHour) * me;
|
|
1856
|
-
}, [
|
|
1872
|
+
}, [j, o, P]), F = se(null);
|
|
1857
1873
|
qe(() => {
|
|
1858
|
-
const C =
|
|
1874
|
+
const C = F.current;
|
|
1859
1875
|
if (!C) return;
|
|
1860
1876
|
const s = () => {
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1877
|
+
let f;
|
|
1878
|
+
if (j) {
|
|
1879
|
+
const A = (/* @__PURE__ */ new Date()).getHours();
|
|
1880
|
+
f = Math.max(A - 1, o.startHour);
|
|
1881
|
+
} else {
|
|
1882
|
+
const A = r.getDay(), T = a?.[A];
|
|
1883
|
+
T?.enabled && T.from > 0 ? f = Math.max(T.from - 1, o.startHour) : f = Math.max(7, o.startHour);
|
|
1884
|
+
}
|
|
1885
|
+
const S = (f - o.startHour) * me;
|
|
1865
1886
|
C.scrollTo({
|
|
1866
|
-
top:
|
|
1887
|
+
top: S,
|
|
1867
1888
|
behavior: "instant"
|
|
1868
1889
|
});
|
|
1869
1890
|
};
|
|
1870
1891
|
requestAnimationFrame(() => {
|
|
1871
1892
|
requestAnimationFrame(s);
|
|
1872
1893
|
});
|
|
1873
|
-
}, [
|
|
1874
|
-
const u =
|
|
1894
|
+
}, [r, a, o, j]);
|
|
1895
|
+
const u = _e(), k = M(
|
|
1875
1896
|
(C) => {
|
|
1876
1897
|
u?.startSelection(C);
|
|
1877
1898
|
},
|
|
1878
1899
|
[u]
|
|
1879
|
-
),
|
|
1900
|
+
), I = M(
|
|
1880
1901
|
(C) => {
|
|
1881
1902
|
u?.updateSelection(C);
|
|
1882
1903
|
},
|
|
1883
1904
|
[u]
|
|
1884
|
-
), m =
|
|
1905
|
+
), m = M(() => {
|
|
1885
1906
|
u?.endSelection();
|
|
1886
|
-
}, [u]),
|
|
1907
|
+
}, [u]), _ = M(
|
|
1887
1908
|
(C) => {
|
|
1888
1909
|
c?.(C);
|
|
1889
1910
|
},
|
|
1890
1911
|
[c]
|
|
1891
|
-
), $ =
|
|
1892
|
-
return /* @__PURE__ */
|
|
1912
|
+
), $ = r.toLocaleDateString([], { weekday: "short" }), N = r.getDate(), G = te(r);
|
|
1913
|
+
return /* @__PURE__ */ n("div", { className: l("flex flex-col h-full", z), children: [
|
|
1893
1914
|
/* @__PURE__ */ e(
|
|
1894
1915
|
"div",
|
|
1895
1916
|
{
|
|
@@ -1898,7 +1919,7 @@ function un({
|
|
|
1898
1919
|
i?.columnHeader,
|
|
1899
1920
|
G && i?.columnHeaderToday
|
|
1900
1921
|
),
|
|
1901
|
-
children: /* @__PURE__ */
|
|
1922
|
+
children: /* @__PURE__ */ n("div", { className: "flex flex-col items-center", children: [
|
|
1902
1923
|
/* @__PURE__ */ e(
|
|
1903
1924
|
"span",
|
|
1904
1925
|
{
|
|
@@ -1924,23 +1945,23 @@ function un({
|
|
|
1924
1945
|
}
|
|
1925
1946
|
),
|
|
1926
1947
|
D.length > 0 && /* @__PURE__ */ e(
|
|
1927
|
-
|
|
1948
|
+
rt,
|
|
1928
1949
|
{
|
|
1929
1950
|
events: D,
|
|
1930
|
-
date:
|
|
1931
|
-
onEventClick:
|
|
1951
|
+
date: r,
|
|
1952
|
+
onEventClick: _,
|
|
1932
1953
|
...i?.multiDayBanner && { className: i.multiDayBanner }
|
|
1933
1954
|
}
|
|
1934
1955
|
),
|
|
1935
1956
|
/* @__PURE__ */ e(
|
|
1936
1957
|
"div",
|
|
1937
1958
|
{
|
|
1938
|
-
ref:
|
|
1959
|
+
ref: F,
|
|
1939
1960
|
className: l("flex-1 overflow-auto", i?.scrollContainer),
|
|
1940
|
-
children: /* @__PURE__ */
|
|
1941
|
-
|
|
1942
|
-
const S = !Je(
|
|
1943
|
-
return /* @__PURE__ */
|
|
1961
|
+
children: /* @__PURE__ */ n("div", { className: "relative min-h-full", children: [
|
|
1962
|
+
O.map((C, s) => {
|
|
1963
|
+
const S = !Je(r, C, a);
|
|
1964
|
+
return /* @__PURE__ */ n(
|
|
1944
1965
|
"div",
|
|
1945
1966
|
{
|
|
1946
1967
|
className: l(
|
|
@@ -1971,37 +1992,37 @@ function un({
|
|
|
1971
1992
|
) })
|
|
1972
1993
|
}
|
|
1973
1994
|
),
|
|
1974
|
-
/* @__PURE__ */
|
|
1975
|
-
|
|
1995
|
+
/* @__PURE__ */ n("div", { className: "relative flex-1", children: [
|
|
1996
|
+
j && !S && /* @__PURE__ */ e("div", { className: "absolute inset-0 bg-primary/5" }),
|
|
1976
1997
|
s !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
|
|
1977
|
-
w.slice(1).map((
|
|
1998
|
+
w.slice(1).map((A) => /* @__PURE__ */ e(
|
|
1978
1999
|
"div",
|
|
1979
2000
|
{
|
|
1980
2001
|
className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
|
|
1981
|
-
style: { top: `${
|
|
2002
|
+
style: { top: `${A / 60 * 100}%` }
|
|
1982
2003
|
},
|
|
1983
|
-
|
|
2004
|
+
A
|
|
1984
2005
|
)),
|
|
1985
|
-
w.map((
|
|
1986
|
-
const q = { date:
|
|
2006
|
+
w.map((A, T) => {
|
|
2007
|
+
const q = { date: r, hour: C, minute: A };
|
|
1987
2008
|
return /* @__PURE__ */ e(
|
|
1988
2009
|
ot,
|
|
1989
2010
|
{
|
|
1990
2011
|
slot: q,
|
|
1991
2012
|
onSelectionStart: k,
|
|
1992
|
-
onSelectionMove:
|
|
2013
|
+
onSelectionMove: I,
|
|
1993
2014
|
onSelectionEnd: m,
|
|
1994
2015
|
isSelected: u?.isSlotSelected(q) ?? !1,
|
|
1995
2016
|
isSelecting: u?.isSelecting ?? !1,
|
|
1996
2017
|
disabled: S,
|
|
1997
2018
|
className: "absolute inset-x-0",
|
|
1998
2019
|
style: {
|
|
1999
|
-
top: `${
|
|
2020
|
+
top: `${T * h}%`,
|
|
2000
2021
|
height: `${h}%`
|
|
2001
2022
|
},
|
|
2002
|
-
ariaLabel: `Add event at ${we(C)}:${String(
|
|
2023
|
+
ariaLabel: `Add event at ${we(C)}:${String(A).padStart(2, "0")}`
|
|
2003
2024
|
},
|
|
2004
|
-
|
|
2025
|
+
A
|
|
2005
2026
|
);
|
|
2006
2027
|
})
|
|
2007
2028
|
] })
|
|
@@ -2015,7 +2036,7 @@ function un({
|
|
|
2015
2036
|
{
|
|
2016
2037
|
className: "absolute top-0 bottom-0 right-0 pointer-events-none",
|
|
2017
2038
|
style: { left: Ne },
|
|
2018
|
-
children:
|
|
2039
|
+
children: W.map((C) => {
|
|
2019
2040
|
const s = x.get(C.id);
|
|
2020
2041
|
if (!s) return null;
|
|
2021
2042
|
const f = `calc(${s.width}% - 2px)`, S = `max(${ke}px, ${f})`;
|
|
@@ -2054,7 +2075,7 @@ function un({
|
|
|
2054
2075
|
})
|
|
2055
2076
|
}
|
|
2056
2077
|
),
|
|
2057
|
-
|
|
2078
|
+
j && B >= 0 && /* @__PURE__ */ n(
|
|
2058
2079
|
"div",
|
|
2059
2080
|
{
|
|
2060
2081
|
className: l(
|
|
@@ -2062,7 +2083,7 @@ function un({
|
|
|
2062
2083
|
i?.currentTimeIndicator
|
|
2063
2084
|
),
|
|
2064
2085
|
style: {
|
|
2065
|
-
top:
|
|
2086
|
+
top: B,
|
|
2066
2087
|
left: Ne
|
|
2067
2088
|
},
|
|
2068
2089
|
children: [
|
|
@@ -2093,9 +2114,9 @@ const Jt = [
|
|
|
2093
2114
|
{ full: "Friday", short: "Fri", tiny: "F" },
|
|
2094
2115
|
{ full: "Saturday", short: "Sat", tiny: "S" }
|
|
2095
2116
|
], ge = 3;
|
|
2096
|
-
function
|
|
2117
|
+
function ur({
|
|
2097
2118
|
events: t,
|
|
2098
|
-
date:
|
|
2119
|
+
date: r,
|
|
2099
2120
|
weekStartsOn: o = 1,
|
|
2100
2121
|
badgeVariant: a = "colored",
|
|
2101
2122
|
onEventClick: d,
|
|
@@ -2105,35 +2126,35 @@ function mn({
|
|
|
2105
2126
|
renderEvent: z,
|
|
2106
2127
|
renderPopover: p,
|
|
2107
2128
|
showMoreEventsInPopover: y = !1,
|
|
2108
|
-
slots:
|
|
2129
|
+
slots: L,
|
|
2109
2130
|
classNames: i
|
|
2110
2131
|
}) {
|
|
2111
|
-
const v =
|
|
2132
|
+
const v = L?.dayCellHeader, h = L?.dayCellFooter, [w, E] = oe(null), W = V(() => ut(r, o), [r, o]), D = V(() => {
|
|
2112
2133
|
const u = /* @__PURE__ */ new Map();
|
|
2113
|
-
for (const k of
|
|
2114
|
-
const
|
|
2115
|
-
m.sort((
|
|
2134
|
+
for (const k of W) {
|
|
2135
|
+
const I = k.date.toDateString(), m = Le(t, k.date);
|
|
2136
|
+
m.sort((_, $) => _.startDate.getTime() - $.startDate.getTime()), u.set(I, m);
|
|
2116
2137
|
}
|
|
2117
2138
|
return u;
|
|
2118
|
-
}, [
|
|
2139
|
+
}, [W, t]), x = _e(), O = M(
|
|
2119
2140
|
(u) => {
|
|
2120
2141
|
x?.startSelection(u);
|
|
2121
2142
|
},
|
|
2122
2143
|
[x]
|
|
2123
|
-
),
|
|
2144
|
+
), P = M(
|
|
2124
2145
|
(u) => {
|
|
2125
2146
|
x?.updateSelection(u);
|
|
2126
2147
|
},
|
|
2127
2148
|
[x]
|
|
2128
|
-
),
|
|
2149
|
+
), j = M(() => {
|
|
2129
2150
|
x?.endSelection();
|
|
2130
|
-
}, [x]),
|
|
2151
|
+
}, [x]), B = M(
|
|
2131
2152
|
(u) => {
|
|
2132
2153
|
c?.(u);
|
|
2133
2154
|
},
|
|
2134
2155
|
[c]
|
|
2135
|
-
),
|
|
2136
|
-
return /* @__PURE__ */ e("div", { className: l("flex flex-col h-full overflow-hidden", b), children: /* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-auto", children: /* @__PURE__ */
|
|
2156
|
+
), F = o === 0 ? Zt : Jt;
|
|
2157
|
+
return /* @__PURE__ */ e("div", { className: l("flex flex-col h-full overflow-hidden", b), children: /* @__PURE__ */ e("div", { className: "flex flex-col flex-1 overflow-auto", children: /* @__PURE__ */ n("div", { className: "flex flex-col flex-1 min-w-[560px] sm:min-w-0", children: [
|
|
2137
2158
|
/* @__PURE__ */ e(
|
|
2138
2159
|
"div",
|
|
2139
2160
|
{
|
|
@@ -2141,7 +2162,7 @@ function mn({
|
|
|
2141
2162
|
"grid grid-cols-7 border-b !sticky !top-0 bg-background z-10",
|
|
2142
2163
|
i?.weekdayHeader
|
|
2143
2164
|
),
|
|
2144
|
-
children:
|
|
2165
|
+
children: F.map((u, k) => /* @__PURE__ */ n(
|
|
2145
2166
|
"div",
|
|
2146
2167
|
{
|
|
2147
2168
|
className: l(
|
|
@@ -2159,28 +2180,28 @@ function mn({
|
|
|
2159
2180
|
))
|
|
2160
2181
|
}
|
|
2161
2182
|
),
|
|
2162
|
-
/* @__PURE__ */ e("div", { className: l("grid grid-cols-7 auto-rows-min", i?.monthGrid), children:
|
|
2163
|
-
const k = u.date.toDateString(),
|
|
2164
|
-
return /* @__PURE__ */
|
|
2183
|
+
/* @__PURE__ */ e("div", { className: l("grid grid-cols-7 auto-rows-min", i?.monthGrid), children: W.map((u) => {
|
|
2184
|
+
const k = u.date.toDateString(), I = D.get(k) || [], m = te(u.date), _ = u.date.getDay() === 0 || u.date.getDay() === 6, $ = I.length > ge;
|
|
2185
|
+
return /* @__PURE__ */ n(
|
|
2165
2186
|
Xt,
|
|
2166
2187
|
{
|
|
2167
2188
|
date: u.date,
|
|
2168
|
-
onSelectionStart:
|
|
2169
|
-
onSelectionMove:
|
|
2170
|
-
onSelectionEnd:
|
|
2189
|
+
onSelectionStart: O,
|
|
2190
|
+
onSelectionMove: P,
|
|
2191
|
+
onSelectionEnd: j,
|
|
2171
2192
|
isSelected: x?.isSlotSelected({ date: u.date }) ?? !1,
|
|
2172
2193
|
isSelecting: x?.isSelecting ?? !1,
|
|
2173
2194
|
className: l(
|
|
2174
2195
|
"relative flex flex-col border-r border-b text-left min-h-[80px] sm:min-h-[100px] overflow-hidden",
|
|
2175
2196
|
"[&:nth-child(7n)]:border-r-0",
|
|
2176
2197
|
!u.isCurrentMonth && "bg-muted/20",
|
|
2177
|
-
|
|
2198
|
+
_ && u.isCurrentMonth && "bg-muted/10",
|
|
2178
2199
|
i?.dayCell,
|
|
2179
2200
|
m && i?.dayCellToday,
|
|
2180
2201
|
!u.isCurrentMonth && i?.dayCellOutside,
|
|
2181
|
-
|
|
2202
|
+
_ && i?.dayCellWeekend
|
|
2182
2203
|
),
|
|
2183
|
-
ariaLabel: `${u.date.toLocaleDateString()} - ${
|
|
2204
|
+
ariaLabel: `${u.date.toLocaleDateString()} - ${I.length} events. Click to create event, double-click to view day.`,
|
|
2184
2205
|
children: [
|
|
2185
2206
|
/* @__PURE__ */ e(
|
|
2186
2207
|
"div",
|
|
@@ -2195,7 +2216,7 @@ function mn({
|
|
|
2195
2216
|
{
|
|
2196
2217
|
type: "button",
|
|
2197
2218
|
onClick: (N) => {
|
|
2198
|
-
N.stopPropagation(),
|
|
2219
|
+
N.stopPropagation(), B(u.date);
|
|
2199
2220
|
},
|
|
2200
2221
|
className: l(
|
|
2201
2222
|
"flex items-center justify-center rounded-full transition-colors",
|
|
@@ -2211,14 +2232,14 @@ function mn({
|
|
|
2211
2232
|
v,
|
|
2212
2233
|
{
|
|
2213
2234
|
date: u.date,
|
|
2214
|
-
events:
|
|
2235
|
+
events: I,
|
|
2215
2236
|
isToday: m,
|
|
2216
2237
|
isCurrentMonth: u.isCurrentMonth,
|
|
2217
|
-
isWeekend:
|
|
2238
|
+
isWeekend: _,
|
|
2218
2239
|
view: "month"
|
|
2219
2240
|
}
|
|
2220
2241
|
),
|
|
2221
|
-
/* @__PURE__ */
|
|
2242
|
+
/* @__PURE__ */ n(
|
|
2222
2243
|
"div",
|
|
2223
2244
|
{
|
|
2224
2245
|
className: l(
|
|
@@ -2226,7 +2247,7 @@ function mn({
|
|
|
2226
2247
|
i?.dayCellContent
|
|
2227
2248
|
),
|
|
2228
2249
|
children: [
|
|
2229
|
-
|
|
2250
|
+
I.slice(0, ge).map((N) => /* @__PURE__ */ e(
|
|
2230
2251
|
"div",
|
|
2231
2252
|
{
|
|
2232
2253
|
onPointerDown: (G) => {
|
|
@@ -2251,19 +2272,19 @@ function mn({
|
|
|
2251
2272
|
},
|
|
2252
2273
|
N.id
|
|
2253
2274
|
)),
|
|
2254
|
-
$ && (y ? /* @__PURE__ */
|
|
2255
|
-
|
|
2275
|
+
$ && (y ? /* @__PURE__ */ n(
|
|
2276
|
+
re,
|
|
2256
2277
|
{
|
|
2257
2278
|
open: w === k,
|
|
2258
|
-
onOpenChange: (N) =>
|
|
2279
|
+
onOpenChange: (N) => E(N ? k : null),
|
|
2259
2280
|
children: [
|
|
2260
|
-
/* @__PURE__ */ e(
|
|
2281
|
+
/* @__PURE__ */ e(ne, { asChild: !0, children: /* @__PURE__ */ n(
|
|
2261
2282
|
"button",
|
|
2262
2283
|
{
|
|
2263
2284
|
type: "button",
|
|
2264
2285
|
onPointerDown: (N) => N.stopPropagation(),
|
|
2265
2286
|
onClick: (N) => {
|
|
2266
|
-
N.stopPropagation(),
|
|
2287
|
+
N.stopPropagation(), E(k);
|
|
2267
2288
|
},
|
|
2268
2289
|
className: l(
|
|
2269
2290
|
"w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
|
|
@@ -2271,12 +2292,12 @@ function mn({
|
|
|
2271
2292
|
),
|
|
2272
2293
|
children: [
|
|
2273
2294
|
"+",
|
|
2274
|
-
|
|
2295
|
+
I.length - ge,
|
|
2275
2296
|
" more"
|
|
2276
2297
|
]
|
|
2277
2298
|
}
|
|
2278
2299
|
) }),
|
|
2279
|
-
/* @__PURE__ */
|
|
2300
|
+
/* @__PURE__ */ n(
|
|
2280
2301
|
Q,
|
|
2281
2302
|
{
|
|
2282
2303
|
align: "start",
|
|
@@ -2285,25 +2306,25 @@ function mn({
|
|
|
2285
2306
|
className: "w-72 max-h-80 overflow-y-auto p-2",
|
|
2286
2307
|
onPointerDown: (N) => N.stopPropagation(),
|
|
2287
2308
|
children: [
|
|
2288
|
-
/* @__PURE__ */
|
|
2309
|
+
/* @__PURE__ */ n("div", { className: "flex items-center justify-between mb-2 pb-2 border-b", children: [
|
|
2289
2310
|
/* @__PURE__ */ e("span", { className: "text-sm font-medium", children: u.date.toLocaleDateString(void 0, {
|
|
2290
2311
|
weekday: "short",
|
|
2291
2312
|
month: "short",
|
|
2292
2313
|
day: "numeric"
|
|
2293
2314
|
}) }),
|
|
2294
|
-
/* @__PURE__ */
|
|
2295
|
-
|
|
2315
|
+
/* @__PURE__ */ n("span", { className: "text-xs text-muted-foreground", children: [
|
|
2316
|
+
I.length,
|
|
2296
2317
|
" events"
|
|
2297
2318
|
] })
|
|
2298
2319
|
] }),
|
|
2299
|
-
/* @__PURE__ */ e("div", { className: "space-y-1.5", children:
|
|
2320
|
+
/* @__PURE__ */ e("div", { className: "space-y-1.5", children: I.map((N) => /* @__PURE__ */ e("div", { children: z ? z({ event: N, variant: "compact" }) : /* @__PURE__ */ e(
|
|
2300
2321
|
Ce,
|
|
2301
2322
|
{
|
|
2302
2323
|
event: N,
|
|
2303
2324
|
variant: "compact",
|
|
2304
2325
|
badgeVariant: a,
|
|
2305
2326
|
onClick: (G) => {
|
|
2306
|
-
|
|
2327
|
+
E(null), d?.(G);
|
|
2307
2328
|
},
|
|
2308
2329
|
disablePopover: !!d && !p,
|
|
2309
2330
|
renderPopover: p,
|
|
@@ -2315,11 +2336,11 @@ function mn({
|
|
|
2315
2336
|
)
|
|
2316
2337
|
]
|
|
2317
2338
|
}
|
|
2318
|
-
) : /* @__PURE__ */
|
|
2339
|
+
) : /* @__PURE__ */ n(
|
|
2319
2340
|
"div",
|
|
2320
2341
|
{
|
|
2321
2342
|
onPointerDown: (N) => {
|
|
2322
|
-
N.stopPropagation(),
|
|
2343
|
+
N.stopPropagation(), B(u.date);
|
|
2323
2344
|
},
|
|
2324
2345
|
className: l(
|
|
2325
2346
|
"w-full text-left text-xs text-muted-foreground hover:text-foreground hover:underline px-1.5 cursor-pointer",
|
|
@@ -2327,7 +2348,7 @@ function mn({
|
|
|
2327
2348
|
),
|
|
2328
2349
|
children: [
|
|
2329
2350
|
"+",
|
|
2330
|
-
|
|
2351
|
+
I.length - ge,
|
|
2331
2352
|
" more"
|
|
2332
2353
|
]
|
|
2333
2354
|
}
|
|
@@ -2339,10 +2360,10 @@ function mn({
|
|
|
2339
2360
|
h,
|
|
2340
2361
|
{
|
|
2341
2362
|
date: u.date,
|
|
2342
|
-
events:
|
|
2363
|
+
events: I,
|
|
2343
2364
|
isToday: m,
|
|
2344
2365
|
isCurrentMonth: u.isCurrentMonth,
|
|
2345
|
-
isWeekend:
|
|
2366
|
+
isWeekend: _,
|
|
2346
2367
|
view: "month"
|
|
2347
2368
|
}
|
|
2348
2369
|
)
|
|
@@ -2354,9 +2375,9 @@ function mn({
|
|
|
2354
2375
|
] }) }) });
|
|
2355
2376
|
}
|
|
2356
2377
|
const ie = 96, xe = 56, Ue = 72, X = 120, be = 100, Qt = 3;
|
|
2357
|
-
function
|
|
2378
|
+
function mr({
|
|
2358
2379
|
events: t,
|
|
2359
|
-
date:
|
|
2380
|
+
date: r,
|
|
2360
2381
|
weekStartsOn: o = 1,
|
|
2361
2382
|
visibleHours: a = { startHour: 0, endHour: 24 },
|
|
2362
2383
|
workingHours: d,
|
|
@@ -2366,114 +2387,119 @@ function hn({
|
|
|
2366
2387
|
onSlotSelect: z,
|
|
2367
2388
|
onDayClick: p,
|
|
2368
2389
|
className: y,
|
|
2369
|
-
renderEvent:
|
|
2390
|
+
renderEvent: L,
|
|
2370
2391
|
renderPopover: i,
|
|
2371
2392
|
slots: v,
|
|
2372
2393
|
classNames: h
|
|
2373
2394
|
}) {
|
|
2374
|
-
const w = 60 / g,
|
|
2395
|
+
const w = 60 / g, E = 100 / w, W = V(() => {
|
|
2375
2396
|
const s = [];
|
|
2376
2397
|
for (let f = 0; f < w; f++)
|
|
2377
2398
|
s.push(f * g);
|
|
2378
2399
|
return s;
|
|
2379
|
-
}, [w, g]), D =
|
|
2380
|
-
() => mt(
|
|
2381
|
-
[
|
|
2382
|
-
), x =
|
|
2400
|
+
}, [w, g]), D = V(
|
|
2401
|
+
() => mt(r, o),
|
|
2402
|
+
[r, o]
|
|
2403
|
+
), x = V(
|
|
2383
2404
|
() => Xe(a),
|
|
2384
2405
|
[a]
|
|
2385
|
-
),
|
|
2406
|
+
), O = V(() => {
|
|
2386
2407
|
const s = /* @__PURE__ */ new Map();
|
|
2387
2408
|
for (const f of D) {
|
|
2388
|
-
const S = f.toDateString(),
|
|
2389
|
-
|
|
2409
|
+
const S = f.toDateString(), A = Le(t, f), { singleDay: T, multiDay: q } = Ke(A), R = Ye(
|
|
2410
|
+
T,
|
|
2390
2411
|
f,
|
|
2391
2412
|
a,
|
|
2392
2413
|
ie
|
|
2393
2414
|
), U = /* @__PURE__ */ new Map();
|
|
2394
2415
|
let ae = 1;
|
|
2395
|
-
for (const K of
|
|
2416
|
+
for (const K of R)
|
|
2396
2417
|
if (U.set(K.event.id, K.position), K.position.width > 0) {
|
|
2397
2418
|
const J = Math.round(100 / K.position.width);
|
|
2398
2419
|
ae = Math.max(ae, J);
|
|
2399
2420
|
}
|
|
2400
2421
|
s.set(S, {
|
|
2401
|
-
singleDay:
|
|
2422
|
+
singleDay: T,
|
|
2402
2423
|
multiDay: q,
|
|
2403
2424
|
positions: U,
|
|
2404
2425
|
maxOverlapping: ae
|
|
2405
2426
|
});
|
|
2406
2427
|
}
|
|
2407
2428
|
return s;
|
|
2408
|
-
}, [D, t, a]),
|
|
2429
|
+
}, [D, t, a]), P = V(() => {
|
|
2409
2430
|
const s = /* @__PURE__ */ new Map();
|
|
2410
|
-
for (const { multiDay: f } of
|
|
2431
|
+
for (const { multiDay: f } of O.values())
|
|
2411
2432
|
for (const S of f)
|
|
2412
2433
|
s.set(S.id, S);
|
|
2413
2434
|
return Array.from(s.values());
|
|
2414
|
-
}, [
|
|
2415
|
-
if (
|
|
2416
|
-
const s =
|
|
2435
|
+
}, [O]), j = /* @__PURE__ */ new Date(), B = D.findIndex((s) => te(s)), F = V(() => {
|
|
2436
|
+
if (B < 0) return -1;
|
|
2437
|
+
const s = j.getHours() + j.getMinutes() / 60;
|
|
2417
2438
|
return s < a.startHour || s > a.endHour ? -1 : (s - a.startHour) * ie;
|
|
2418
|
-
}, [
|
|
2439
|
+
}, [B, a, j]), u = se(null);
|
|
2419
2440
|
qe(() => {
|
|
2420
2441
|
const s = u.current;
|
|
2421
2442
|
if (!s) return;
|
|
2422
2443
|
const f = () => {
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2444
|
+
let S;
|
|
2445
|
+
if (B !== -1) {
|
|
2446
|
+
const T = (/* @__PURE__ */ new Date()).getHours();
|
|
2447
|
+
S = Math.max(T - 1, a.startHour);
|
|
2448
|
+
} else {
|
|
2449
|
+
const q = (/* @__PURE__ */ new Date()).getDay();
|
|
2450
|
+
let R = d?.[q];
|
|
2451
|
+
if (!R?.enabled || R.from === 0) {
|
|
2452
|
+
const U = d?.[1];
|
|
2453
|
+
U?.enabled && (R = U);
|
|
2454
|
+
}
|
|
2455
|
+
R?.enabled && R.from > 0 ? S = Math.max(
|
|
2456
|
+
R.from - 1,
|
|
2457
|
+
a.startHour
|
|
2458
|
+
) : S = Math.max(7, a.startHour);
|
|
2428
2459
|
}
|
|
2429
|
-
|
|
2430
|
-
M?.enabled && M.from > 0 ? q = Math.max(
|
|
2431
|
-
M.from - 1,
|
|
2432
|
-
a.startHour
|
|
2433
|
-
) : q = Math.max(7, a.startHour);
|
|
2434
|
-
const V = (q - a.startHour) * ie;
|
|
2460
|
+
const A = (S - a.startHour) * ie;
|
|
2435
2461
|
s.scrollTo({
|
|
2436
|
-
top:
|
|
2462
|
+
top: A,
|
|
2437
2463
|
behavior: "instant"
|
|
2438
2464
|
});
|
|
2439
2465
|
};
|
|
2440
2466
|
requestAnimationFrame(() => {
|
|
2441
2467
|
requestAnimationFrame(f);
|
|
2442
2468
|
});
|
|
2443
|
-
}, [
|
|
2444
|
-
const k =
|
|
2469
|
+
}, [r, d, a, B]);
|
|
2470
|
+
const k = _e(), I = M(
|
|
2445
2471
|
(s) => {
|
|
2446
2472
|
k?.startSelection(s);
|
|
2447
2473
|
},
|
|
2448
2474
|
[k]
|
|
2449
|
-
), m =
|
|
2475
|
+
), m = M(
|
|
2450
2476
|
(s) => {
|
|
2451
2477
|
k?.updateSelection(s);
|
|
2452
2478
|
},
|
|
2453
2479
|
[k]
|
|
2454
|
-
),
|
|
2480
|
+
), _ = M(() => {
|
|
2455
2481
|
k?.endSelection();
|
|
2456
|
-
}, [k]), $ =
|
|
2482
|
+
}, [k]), $ = M(
|
|
2457
2483
|
(s) => {
|
|
2458
2484
|
b?.(s);
|
|
2459
2485
|
},
|
|
2460
2486
|
[b]
|
|
2461
|
-
), N = xe + 7 * X, G =
|
|
2487
|
+
), N = xe + 7 * X, G = V(() => {
|
|
2462
2488
|
const s = [];
|
|
2463
2489
|
for (const f of D) {
|
|
2464
|
-
const S = f.toDateString(),
|
|
2465
|
-
|
|
2466
|
-
Math.max(X,
|
|
2490
|
+
const S = f.toDateString(), T = O.get(S)?.maxOverlapping ?? 1;
|
|
2491
|
+
T > Qt ? s.push(
|
|
2492
|
+
Math.max(X, T * be)
|
|
2467
2493
|
) : s.push(X);
|
|
2468
2494
|
}
|
|
2469
2495
|
return s;
|
|
2470
|
-
}, [D,
|
|
2471
|
-
return /* @__PURE__ */
|
|
2472
|
-
|
|
2473
|
-
|
|
2496
|
+
}, [D, O]), C = xe + G.reduce((s, f) => s + f, 0);
|
|
2497
|
+
return /* @__PURE__ */ n("div", { className: l("ic-week-view flex flex-col h-full", y), children: [
|
|
2498
|
+
P.length > 0 && /* @__PURE__ */ e(
|
|
2499
|
+
rt,
|
|
2474
2500
|
{
|
|
2475
|
-
events:
|
|
2476
|
-
date: ht(
|
|
2501
|
+
events: P,
|
|
2502
|
+
date: ht(r, o),
|
|
2477
2503
|
onEventClick: $,
|
|
2478
2504
|
...h?.multiDayBanner && {
|
|
2479
2505
|
className: h.multiDayBanner
|
|
@@ -2488,14 +2514,14 @@ function hn({
|
|
|
2488
2514
|
"ic-week-scroll-container flex-1",
|
|
2489
2515
|
h?.scrollContainer
|
|
2490
2516
|
),
|
|
2491
|
-
children: /* @__PURE__ */
|
|
2492
|
-
/* @__PURE__ */ e("div", { className: "ic-week-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */
|
|
2517
|
+
children: /* @__PURE__ */ n("div", { style: { minWidth: Math.max(N, C) }, children: [
|
|
2518
|
+
/* @__PURE__ */ e("div", { className: "ic-week-header sticky top-0 z-20 border-b bg-background", children: /* @__PURE__ */ n("div", { className: "flex", children: [
|
|
2493
2519
|
/* @__PURE__ */ e(
|
|
2494
2520
|
"div",
|
|
2495
2521
|
{
|
|
2496
2522
|
className: "flex-shrink-0 flex items-end justify-center pb-2 text-[10px] text-muted-foreground/70",
|
|
2497
2523
|
style: { width: xe, height: Ue },
|
|
2498
|
-
children: /* @__PURE__ */
|
|
2524
|
+
children: /* @__PURE__ */ n("span", { className: "hidden sm:inline", children: [
|
|
2499
2525
|
"GMT",
|
|
2500
2526
|
(() => {
|
|
2501
2527
|
const s = (/* @__PURE__ */ new Date()).getTimezoneOffset(), f = Math.abs(Math.floor(s / 60)), S = s <= 0 ? "+" : "-";
|
|
@@ -2505,8 +2531,8 @@ function hn({
|
|
|
2505
2531
|
}
|
|
2506
2532
|
),
|
|
2507
2533
|
D.map((s, f) => {
|
|
2508
|
-
const S = te(s),
|
|
2509
|
-
return /* @__PURE__ */
|
|
2534
|
+
const S = te(s), A = G[f] ?? X, T = A > X;
|
|
2535
|
+
return /* @__PURE__ */ n(
|
|
2510
2536
|
"div",
|
|
2511
2537
|
{
|
|
2512
2538
|
className: l(
|
|
@@ -2516,7 +2542,7 @@ function hn({
|
|
|
2516
2542
|
),
|
|
2517
2543
|
style: {
|
|
2518
2544
|
height: Ue,
|
|
2519
|
-
minWidth:
|
|
2545
|
+
minWidth: T ? A : X
|
|
2520
2546
|
},
|
|
2521
2547
|
children: [
|
|
2522
2548
|
/* @__PURE__ */ e(
|
|
@@ -2548,7 +2574,7 @@ function hn({
|
|
|
2548
2574
|
);
|
|
2549
2575
|
})
|
|
2550
2576
|
] }) }),
|
|
2551
|
-
/* @__PURE__ */
|
|
2577
|
+
/* @__PURE__ */ n("div", { className: "relative flex", children: [
|
|
2552
2578
|
/* @__PURE__ */ e(
|
|
2553
2579
|
"div",
|
|
2554
2580
|
{
|
|
@@ -2578,22 +2604,22 @@ function hn({
|
|
|
2578
2604
|
}
|
|
2579
2605
|
),
|
|
2580
2606
|
/* @__PURE__ */ e("div", { className: "ic-week-grid relative flex-1", children: /* @__PURE__ */ e("div", { className: "flex divide-x", children: D.map((s, f) => {
|
|
2581
|
-
const S = s.toDateString(),
|
|
2582
|
-
return /* @__PURE__ */
|
|
2607
|
+
const S = s.toDateString(), A = O.get(S), T = G[f] ?? X, q = T > X;
|
|
2608
|
+
return /* @__PURE__ */ n(
|
|
2583
2609
|
"div",
|
|
2584
2610
|
{
|
|
2585
2611
|
className: "ic-day-column relative flex-1",
|
|
2586
2612
|
style: {
|
|
2587
|
-
minWidth: q ?
|
|
2613
|
+
minWidth: q ? T : X
|
|
2588
2614
|
},
|
|
2589
2615
|
children: [
|
|
2590
|
-
x.map((
|
|
2616
|
+
x.map((R, U) => {
|
|
2591
2617
|
const K = !Je(
|
|
2592
2618
|
s,
|
|
2593
|
-
|
|
2619
|
+
R,
|
|
2594
2620
|
d
|
|
2595
2621
|
);
|
|
2596
|
-
return /* @__PURE__ */
|
|
2622
|
+
return /* @__PURE__ */ n(
|
|
2597
2623
|
"div",
|
|
2598
2624
|
{
|
|
2599
2625
|
className: l(
|
|
@@ -2606,7 +2632,7 @@ function hn({
|
|
|
2606
2632
|
style: { height: ie },
|
|
2607
2633
|
children: [
|
|
2608
2634
|
U !== 0 && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute inset-x-0 top-0 border-b border-border/50" }),
|
|
2609
|
-
|
|
2635
|
+
W.slice(1).map((J) => /* @__PURE__ */ e(
|
|
2610
2636
|
"div",
|
|
2611
2637
|
{
|
|
2612
2638
|
className: "pointer-events-none absolute inset-x-0 border-b border-dashed border-border/30",
|
|
@@ -2614,42 +2640,42 @@ function hn({
|
|
|
2614
2640
|
},
|
|
2615
2641
|
J
|
|
2616
2642
|
)),
|
|
2617
|
-
|
|
2618
|
-
const
|
|
2643
|
+
W.map((J, at) => {
|
|
2644
|
+
const Ie = {
|
|
2619
2645
|
date: s,
|
|
2620
|
-
hour:
|
|
2646
|
+
hour: R,
|
|
2621
2647
|
minute: J
|
|
2622
2648
|
};
|
|
2623
2649
|
return /* @__PURE__ */ e(
|
|
2624
2650
|
ot,
|
|
2625
2651
|
{
|
|
2626
|
-
slot:
|
|
2627
|
-
onSelectionStart:
|
|
2652
|
+
slot: Ie,
|
|
2653
|
+
onSelectionStart: I,
|
|
2628
2654
|
onSelectionMove: m,
|
|
2629
|
-
onSelectionEnd:
|
|
2630
|
-
isSelected: k?.isSlotSelected(
|
|
2655
|
+
onSelectionEnd: _,
|
|
2656
|
+
isSelected: k?.isSlotSelected(Ie) ?? !1,
|
|
2631
2657
|
isSelecting: k?.isSelecting ?? !1,
|
|
2632
2658
|
disabled: K,
|
|
2633
2659
|
className: "absolute inset-x-0",
|
|
2634
2660
|
style: {
|
|
2635
|
-
top: `${at *
|
|
2636
|
-
height: `${
|
|
2661
|
+
top: `${at * E}%`,
|
|
2662
|
+
height: `${E}%`
|
|
2637
2663
|
},
|
|
2638
|
-
ariaLabel: `Add event on ${s.toLocaleDateString()} at ${we(
|
|
2664
|
+
ariaLabel: `Add event on ${s.toLocaleDateString()} at ${we(R)}:${String(J).padStart(2, "0")}`
|
|
2639
2665
|
},
|
|
2640
2666
|
J
|
|
2641
2667
|
);
|
|
2642
2668
|
})
|
|
2643
2669
|
]
|
|
2644
2670
|
},
|
|
2645
|
-
|
|
2671
|
+
R
|
|
2646
2672
|
);
|
|
2647
2673
|
}),
|
|
2648
|
-
|
|
2649
|
-
const U =
|
|
2674
|
+
A?.singleDay.map((R) => {
|
|
2675
|
+
const U = A.positions.get(R.id);
|
|
2650
2676
|
if (!U) return null;
|
|
2651
2677
|
const ae = `calc(${U.width}% - 2px)`, K = `max(${be}px, ${ae})`;
|
|
2652
|
-
return
|
|
2678
|
+
return L ? /* @__PURE__ */ e(
|
|
2653
2679
|
"div",
|
|
2654
2680
|
{
|
|
2655
2681
|
className: "absolute pointer-events-auto p-0.5",
|
|
@@ -2659,13 +2685,13 @@ function hn({
|
|
|
2659
2685
|
width: K,
|
|
2660
2686
|
minWidth: `${be}px`
|
|
2661
2687
|
},
|
|
2662
|
-
children:
|
|
2688
|
+
children: L({ event: R, position: U })
|
|
2663
2689
|
},
|
|
2664
|
-
|
|
2690
|
+
R.id
|
|
2665
2691
|
) : /* @__PURE__ */ e(
|
|
2666
2692
|
Qe,
|
|
2667
2693
|
{
|
|
2668
|
-
event:
|
|
2694
|
+
event: R,
|
|
2669
2695
|
position: {
|
|
2670
2696
|
top: U.top,
|
|
2671
2697
|
left: U.left,
|
|
@@ -2682,17 +2708,17 @@ function hn({
|
|
|
2682
2708
|
h?.eventCard
|
|
2683
2709
|
)
|
|
2684
2710
|
},
|
|
2685
|
-
|
|
2711
|
+
R.id
|
|
2686
2712
|
);
|
|
2687
2713
|
}),
|
|
2688
|
-
f ===
|
|
2714
|
+
f === B && F >= 0 && /* @__PURE__ */ n(
|
|
2689
2715
|
"div",
|
|
2690
2716
|
{
|
|
2691
2717
|
className: l(
|
|
2692
2718
|
"absolute left-0 right-0 z-20 flex items-center pointer-events-none",
|
|
2693
2719
|
h?.currentTimeIndicator
|
|
2694
2720
|
),
|
|
2695
|
-
style: { top:
|
|
2721
|
+
style: { top: F },
|
|
2696
2722
|
children: [
|
|
2697
2723
|
/* @__PURE__ */ e("div", { className: "h-2 w-2 -ml-1 rounded-full bg-red-500" }),
|
|
2698
2724
|
/* @__PURE__ */ e("div", { className: "flex-1 h-0.5 bg-red-500" })
|
|
@@ -2711,27 +2737,27 @@ function hn({
|
|
|
2711
2737
|
] });
|
|
2712
2738
|
}
|
|
2713
2739
|
export {
|
|
2714
|
-
|
|
2740
|
+
dr as A,
|
|
2715
2741
|
ce as B,
|
|
2716
|
-
|
|
2717
|
-
|
|
2742
|
+
lr as C,
|
|
2743
|
+
jt as D,
|
|
2718
2744
|
Qe as E,
|
|
2719
|
-
|
|
2720
|
-
|
|
2745
|
+
ur as M,
|
|
2746
|
+
re as P,
|
|
2721
2747
|
ot as T,
|
|
2722
|
-
|
|
2748
|
+
mr as W,
|
|
2723
2749
|
Xt as a,
|
|
2724
|
-
|
|
2750
|
+
cr as b,
|
|
2725
2751
|
Ce as c,
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2752
|
+
rt as d,
|
|
2753
|
+
sr as e,
|
|
2754
|
+
ar as f,
|
|
2729
2755
|
Q as g,
|
|
2730
|
-
|
|
2756
|
+
ne as h,
|
|
2731
2757
|
Ht as i,
|
|
2732
2758
|
le as j,
|
|
2733
2759
|
ee as k,
|
|
2734
|
-
|
|
2760
|
+
ir as l,
|
|
2735
2761
|
de as m,
|
|
2736
2762
|
gt as n,
|
|
2737
2763
|
fe as o,
|
|
@@ -2739,6 +2765,6 @@ export {
|
|
|
2739
2765
|
Oe as q,
|
|
2740
2766
|
Me as r,
|
|
2741
2767
|
Te as s,
|
|
2742
|
-
|
|
2768
|
+
$t as t
|
|
2743
2769
|
};
|
|
2744
|
-
//# sourceMappingURL=week-view-
|
|
2770
|
+
//# sourceMappingURL=week-view-1EUqFIRS.js.map
|