@innosolutions/inno-calendar 1.0.61 → 1.0.62
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/AGENT.md +1783 -1783
- package/README.md +279 -279
- package/dist/{agenda-widget-DVj4CEZE.js → agenda-widget-Couk7jMB.js} +142 -142
- package/dist/agenda-widget-Couk7jMB.js.map +1 -0
- package/dist/agenda-widget-DZkEXTh-.cjs +2 -0
- package/dist/agenda-widget-DZkEXTh-.cjs.map +1 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/views/timeline-view.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +201 -201
- package/dist/position-utils-BQpbtF6N.cjs.map +1 -1
- package/dist/position-utils-DMVQFywD.js.map +1 -1
- package/dist/slot-selection-context-CRstOosL.js.map +1 -1
- package/dist/slot-selection-context-DBCZI2Dn.cjs.map +1 -1
- package/dist/week-view-C1Vu2ErD.cjs.map +1 -1
- package/dist/week-view-DY167Wok.js.map +1 -1
- package/package.json +138 -138
- package/dist/agenda-widget-D6E-NQK-.cjs +0 -2
- package/dist/agenda-widget-D6E-NQK-.cjs.map +0 -1
- package/dist/agenda-widget-DVj4CEZE.js.map +0 -1
|
@@ -50,10 +50,10 @@ function kr(t) {
|
|
|
50
50
|
onSlotSelect: P,
|
|
51
51
|
onFiltersChange: F,
|
|
52
52
|
className: T,
|
|
53
|
-
children:
|
|
53
|
+
children: C
|
|
54
54
|
} = t, j = it();
|
|
55
55
|
if (j)
|
|
56
|
-
return /* @__PURE__ */ e("div", { className: T, style: { position: "relative" }, children:
|
|
56
|
+
return /* @__PURE__ */ e("div", { className: T, style: { position: "relative" }, children: C ?? /* @__PURE__ */ e(Ye, { view: j.view, className: T }) });
|
|
57
57
|
const W = pt({
|
|
58
58
|
events: n,
|
|
59
59
|
resources: s,
|
|
@@ -69,7 +69,7 @@ function kr(t) {
|
|
|
69
69
|
onSlotSelect: P,
|
|
70
70
|
onFiltersChange: F
|
|
71
71
|
});
|
|
72
|
-
return /* @__PURE__ */ e(xt, { value: W, children: /* @__PURE__ */ e("div", { className: T, style: { position: "relative" }, children:
|
|
72
|
+
return /* @__PURE__ */ e(xt, { value: W, children: /* @__PURE__ */ e("div", { className: T, style: { position: "relative" }, children: C ?? /* @__PURE__ */ e(Ye, { view: W.view, className: T }) }) });
|
|
73
73
|
}
|
|
74
74
|
function $t({ className: t }) {
|
|
75
75
|
return /* @__PURE__ */ r(
|
|
@@ -556,17 +556,17 @@ function Ge({
|
|
|
556
556
|
isCurrentUserClient: P = !1,
|
|
557
557
|
currentUserAcceptStatus: F,
|
|
558
558
|
isAcceptLoading: T = !1,
|
|
559
|
-
isDeclineLoading:
|
|
559
|
+
isDeclineLoading: C = !1,
|
|
560
560
|
isConfirmLoading: j = !1,
|
|
561
561
|
isDeleteLoading: W = !1,
|
|
562
562
|
renderParticipant: _,
|
|
563
|
-
renderHeaderActions:
|
|
563
|
+
renderHeaderActions: M,
|
|
564
564
|
renderCancelReason: G,
|
|
565
565
|
renderDeleteConfirmation: H,
|
|
566
566
|
formatDate: L = Xt,
|
|
567
567
|
formatTimeRange: V = Qt
|
|
568
568
|
}) {
|
|
569
|
-
const [X, Q] = ie(!1), B = !(t.isCanceled || t.meetingTookPlace), d = t.isRecurring ?? !1, N = t.participantDetails, h = t.participantsNames || [],
|
|
569
|
+
const [X, Q] = ie(!1), B = !(t.isCanceled || t.meetingTookPlace), d = t.isRecurring ?? !1, N = t.participantDetails, h = t.participantsNames || [], D = N && N.length > 0, w = F === !0, R = F === !1, K = $ && !P && B, Z = D ? N.filter((E) => E.isConfirmed).length : t.isAccepted ? h.length : 0, Y = D ? N.length : h.length, J = t.scheduleTypeColor || t.hexColor || "#039BE5", ue = O(() => t.startDate ? L(t.startDate) : n.noDateProvided, [t.startDate, L, n.noDateProvided]), se = O(() => t.startDate && t.endDate ? V(t.startDate, t.endDate) : null, [t.startDate, t.endDate, V]), le = () => {
|
|
570
570
|
o(), i?.(t);
|
|
571
571
|
}, we = () => {
|
|
572
572
|
o(), f?.(t);
|
|
@@ -577,7 +577,7 @@ function Ge({
|
|
|
577
577
|
};
|
|
578
578
|
return s ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(Me, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ r(fe, { delayDuration: 300, children: [
|
|
579
579
|
/* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5 p-3", children: [
|
|
580
|
-
/* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children:
|
|
580
|
+
/* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: M ? M({ onClose: o }) : /* @__PURE__ */ r(be, { children: [
|
|
581
581
|
B && y && i && /* @__PURE__ */ e(He, { onClick: le, label: n.edit, children: /* @__PURE__ */ e($t, { className: "h-[18px] w-[18px]" }) }),
|
|
582
582
|
B && A && f && /* @__PURE__ */ e(He, { onClick: we, label: n.cancel, children: /* @__PURE__ */ e(Ot, { className: "h-[18px] w-[18px]" }) }),
|
|
583
583
|
b && a && /* @__PURE__ */ e(
|
|
@@ -648,7 +648,7 @@ function Ge({
|
|
|
648
648
|
/* @__PURE__ */ e(Ut, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
|
|
649
649
|
/* @__PURE__ */ e("span", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: t.address })
|
|
650
650
|
] }),
|
|
651
|
-
(
|
|
651
|
+
(D || h.length > 0) && /* @__PURE__ */ r("div", { className: "flex items-start gap-2 py-0", children: [
|
|
652
652
|
/* @__PURE__ */ e(Rt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
|
|
653
653
|
/* @__PURE__ */ r("div", { className: "flex-1", children: [
|
|
654
654
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-0", children: [
|
|
@@ -666,7 +666,7 @@ function Ge({
|
|
|
666
666
|
] })
|
|
667
667
|
] }),
|
|
668
668
|
/* @__PURE__ */ r("div", { className: "mt-2 space-y-2", children: [
|
|
669
|
-
|
|
669
|
+
D ? N.slice(0, 6).map(
|
|
670
670
|
(E, U) => _ ? _(E, U) : /* @__PURE__ */ e(
|
|
671
671
|
Ke,
|
|
672
672
|
{
|
|
@@ -710,7 +710,7 @@ function Ge({
|
|
|
710
710
|
] }),
|
|
711
711
|
/* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
|
|
712
712
|
/* @__PURE__ */ e(Vt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
|
|
713
|
-
/* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children:
|
|
713
|
+
/* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: D && N.find((E) => E.isOrganizer)?.name || h[0] || "Calendar" })
|
|
714
714
|
] })
|
|
715
715
|
] }),
|
|
716
716
|
K && m && c && /* @__PURE__ */ e("div", { className: "border-t border-zinc-100 dark:border-zinc-800 mt-3 py-3", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
|
|
@@ -799,8 +799,8 @@ function Ge({
|
|
|
799
799
|
onClick: () => {
|
|
800
800
|
R || c(t);
|
|
801
801
|
},
|
|
802
|
-
disabled:
|
|
803
|
-
children:
|
|
802
|
+
disabled: C,
|
|
803
|
+
children: C ? /* @__PURE__ */ e(Me, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(be, { children: [
|
|
804
804
|
R && /* @__PURE__ */ e(je, { className: "h-3.5 w-3.5" }),
|
|
805
805
|
n.notGoing
|
|
806
806
|
] })
|
|
@@ -859,11 +859,11 @@ function Nr({
|
|
|
859
859
|
canCancel: P = !0,
|
|
860
860
|
isCurrentUserParticipant: F,
|
|
861
861
|
isCurrentUserClient: T,
|
|
862
|
-
currentUserAcceptStatus:
|
|
862
|
+
currentUserAcceptStatus: C,
|
|
863
863
|
isAcceptLoading: j,
|
|
864
864
|
isDeclineLoading: W,
|
|
865
865
|
isConfirmLoading: _,
|
|
866
|
-
isDeleteLoading:
|
|
866
|
+
isDeleteLoading: M,
|
|
867
867
|
renderParticipant: G,
|
|
868
868
|
renderHeaderActions: H,
|
|
869
869
|
renderCancelReason: L,
|
|
@@ -873,13 +873,13 @@ function Nr({
|
|
|
873
873
|
className: B,
|
|
874
874
|
width: d = 360
|
|
875
875
|
}) {
|
|
876
|
-
const N = en("(min-width: 768px)"), h = { ...Kt, ...a },
|
|
876
|
+
const N = en("(min-width: 768px)"), h = { ...Kt, ...a }, D = O(() => {
|
|
877
877
|
o?.(!1);
|
|
878
878
|
}, [o]), w = {
|
|
879
879
|
event: t,
|
|
880
880
|
labels: h,
|
|
881
881
|
isLoading: i,
|
|
882
|
-
onClose:
|
|
882
|
+
onClose: D,
|
|
883
883
|
onEdit: f,
|
|
884
884
|
onDelete: m,
|
|
885
885
|
onCancel: c,
|
|
@@ -891,11 +891,11 @@ function Nr({
|
|
|
891
891
|
canCancel: P,
|
|
892
892
|
isCurrentUserParticipant: F,
|
|
893
893
|
isCurrentUserClient: T,
|
|
894
|
-
currentUserAcceptStatus:
|
|
894
|
+
currentUserAcceptStatus: C,
|
|
895
895
|
isAcceptLoading: j,
|
|
896
896
|
isDeclineLoading: W,
|
|
897
897
|
isConfirmLoading: _,
|
|
898
|
-
isDeleteLoading:
|
|
898
|
+
isDeleteLoading: M,
|
|
899
899
|
renderParticipant: G,
|
|
900
900
|
renderHeaderActions: H,
|
|
901
901
|
renderCancelReason: L,
|
|
@@ -1013,7 +1013,7 @@ function Le({
|
|
|
1013
1013
|
classNames: $,
|
|
1014
1014
|
enableDrag: P = !0
|
|
1015
1015
|
}) {
|
|
1016
|
-
const F = ae(null), T = Lt(), [
|
|
1016
|
+
const F = ae(null), T = Lt(), [C, j] = ie(null), W = ae(!1), [_, M] = ie(null), G = o ?? /* @__PURE__ */ new Date(), H = !0, L = c?.from ?? nn, V = c?.to ?? rn, X = V - L, Q = te(() => {
|
|
1017
1017
|
const l = new Date(G);
|
|
1018
1018
|
if (t === 1 || t === 3)
|
|
1019
1019
|
return l.setHours(0, 0, 0, 0), l;
|
|
@@ -1033,7 +1033,7 @@ function Le({
|
|
|
1033
1033
|
return String(u.user.id);
|
|
1034
1034
|
if (l.user?.id) return l.user.id;
|
|
1035
1035
|
if (l.participants?.[0]?.id) return l.participants[0].id;
|
|
1036
|
-
}),
|
|
1036
|
+
}), D = te(() => {
|
|
1037
1037
|
const l = /* @__PURE__ */ new Map();
|
|
1038
1038
|
for (const u of s)
|
|
1039
1039
|
l.set(u.id, {
|
|
@@ -1055,27 +1055,27 @@ function Le({
|
|
|
1055
1055
|
avatar: u.user.avatar ?? void 0,
|
|
1056
1056
|
email: u.user.email
|
|
1057
1057
|
});
|
|
1058
|
-
for (const
|
|
1059
|
-
|
|
1060
|
-
id:
|
|
1061
|
-
name:
|
|
1062
|
-
avatar:
|
|
1063
|
-
email:
|
|
1058
|
+
for (const S of u.participants || [])
|
|
1059
|
+
S.id && !l.has(S.id) && l.set(S.id, {
|
|
1060
|
+
id: S.id,
|
|
1061
|
+
name: S.name,
|
|
1062
|
+
avatar: S.avatar ?? void 0,
|
|
1063
|
+
email: S.email
|
|
1064
1064
|
});
|
|
1065
1065
|
}
|
|
1066
1066
|
return Array.from(l.values());
|
|
1067
1067
|
}, [s, n]), w = te(() => {
|
|
1068
1068
|
const l = [], u = /* @__PURE__ */ new Map();
|
|
1069
|
-
for (const
|
|
1070
|
-
u.set(
|
|
1069
|
+
for (const S of D)
|
|
1070
|
+
u.set(S.id, []);
|
|
1071
1071
|
u.set("unassigned", []);
|
|
1072
|
-
for (const
|
|
1073
|
-
const z = h(
|
|
1074
|
-
(u.get(z) ?? u.get("unassigned")).push(
|
|
1072
|
+
for (const S of n) {
|
|
1073
|
+
const z = h(S) ?? "unassigned";
|
|
1074
|
+
(u.get(z) ?? u.get("unassigned")).push(S);
|
|
1075
1075
|
}
|
|
1076
|
-
const x = (
|
|
1076
|
+
const x = (S) => {
|
|
1077
1077
|
const z = [];
|
|
1078
|
-
for (const I of
|
|
1078
|
+
for (const I of S) {
|
|
1079
1079
|
const ee = I.startDate.getHours() + I.startDate.getMinutes() / 60, ne = I.endDate.getHours() + I.endDate.getMinutes() / 60;
|
|
1080
1080
|
for (let q = 0; q < B.length; q++) {
|
|
1081
1081
|
const oe = B[q], ye = Pe(oe), ke = ut(oe);
|
|
@@ -1100,20 +1100,20 @@ function Le({
|
|
|
1100
1100
|
}
|
|
1101
1101
|
return z;
|
|
1102
1102
|
};
|
|
1103
|
-
for (const
|
|
1104
|
-
const z = u.get(
|
|
1103
|
+
for (const S of D) {
|
|
1104
|
+
const z = u.get(S.id) ?? [], I = x(z), ee = Ze(I), ne = ee.reduce(
|
|
1105
1105
|
(q, oe) => Math.max(q, oe.stackIndex + 1),
|
|
1106
1106
|
0
|
|
1107
1107
|
);
|
|
1108
1108
|
l.push({
|
|
1109
|
-
user:
|
|
1109
|
+
user: S,
|
|
1110
1110
|
events: ee,
|
|
1111
1111
|
maxStack: Math.max(ne, 1)
|
|
1112
1112
|
});
|
|
1113
1113
|
}
|
|
1114
1114
|
const k = u.get("unassigned") ?? [];
|
|
1115
1115
|
if (k.length > 0) {
|
|
1116
|
-
const
|
|
1116
|
+
const S = x(k), z = Ze(S), I = z.reduce(
|
|
1117
1117
|
(ee, ne) => Math.max(ee, ne.stackIndex + 1),
|
|
1118
1118
|
0
|
|
1119
1119
|
);
|
|
@@ -1128,9 +1128,9 @@ function Le({
|
|
|
1128
1128
|
maxStack: Math.max(I, 1)
|
|
1129
1129
|
});
|
|
1130
1130
|
}
|
|
1131
|
-
return l
|
|
1131
|
+
return l;
|
|
1132
1132
|
}, [
|
|
1133
|
-
|
|
1133
|
+
D,
|
|
1134
1134
|
n,
|
|
1135
1135
|
B,
|
|
1136
1136
|
H,
|
|
@@ -1150,10 +1150,10 @@ function Le({
|
|
|
1150
1150
|
}, [w]), K = te(() => {
|
|
1151
1151
|
const l = d.length, u = ze, x = [];
|
|
1152
1152
|
for (let k = 0; k < l; k++) {
|
|
1153
|
-
const
|
|
1154
|
-
|
|
1155
|
-
Xe + (
|
|
1156
|
-
) :
|
|
1153
|
+
const S = R.get(k) ?? 0;
|
|
1154
|
+
S > Qe ? x.push(
|
|
1155
|
+
Xe + (S - Qe) * 20
|
|
1156
|
+
) : S > 0 ? x.push(Math.max(u, Xe)) : x.push(u);
|
|
1157
1157
|
}
|
|
1158
1158
|
return x;
|
|
1159
1159
|
}, [
|
|
@@ -1175,11 +1175,11 @@ function Le({
|
|
|
1175
1175
|
if (!l) return;
|
|
1176
1176
|
const u = () => {
|
|
1177
1177
|
let x = -1;
|
|
1178
|
-
const
|
|
1178
|
+
const S = (/* @__PURE__ */ new Date()).getHours();
|
|
1179
1179
|
{
|
|
1180
1180
|
for (let z = 0; z < d.length; z++) {
|
|
1181
1181
|
const I = d[z];
|
|
1182
|
-
if (I && ce(I.date) && I.hour <=
|
|
1182
|
+
if (I && ce(I.date) && I.hour <= S && I.hour + 1 > S) {
|
|
1183
1183
|
x = z;
|
|
1184
1184
|
break;
|
|
1185
1185
|
}
|
|
@@ -1208,11 +1208,11 @@ function Le({
|
|
|
1208
1208
|
const ue = O(
|
|
1209
1209
|
(l, u) => {
|
|
1210
1210
|
const x = u.getBoundingClientRect(), k = l - x.left + u.scrollLeft;
|
|
1211
|
-
for (let
|
|
1212
|
-
const z = J[
|
|
1211
|
+
for (let S = 0; S < J.length - 1; S++) {
|
|
1212
|
+
const z = J[S], I = J[S + 1];
|
|
1213
1213
|
if (k >= z && k < I) {
|
|
1214
1214
|
const ee = (k - z) / (I - z), ne = Math.floor(ee * 60), q = Math.round(ne / 15) * 15;
|
|
1215
|
-
return { colIndex:
|
|
1215
|
+
return { colIndex: S, minute: Math.min(q, 45) };
|
|
1216
1216
|
}
|
|
1217
1217
|
}
|
|
1218
1218
|
return null;
|
|
@@ -1232,7 +1232,7 @@ function Le({
|
|
|
1232
1232
|
if (l.preventDefault(), l.dataTransfer.dropEffect = "move", !T?.isDragging || !T.dragState) return;
|
|
1233
1233
|
const x = l.currentTarget, k = ue(l.clientX, x);
|
|
1234
1234
|
if (!k) return;
|
|
1235
|
-
const { colIndex:
|
|
1235
|
+
const { colIndex: S, minute: z } = k, { date: I, hour: ee } = se(S, z);
|
|
1236
1236
|
T.updateDragPreview(I, ee, z, u);
|
|
1237
1237
|
const { originalStartDate: ne, originalEndDate: q } = T.dragState, oe = q.getTime() - ne.getTime(), ye = d.length;
|
|
1238
1238
|
let ke;
|
|
@@ -1240,27 +1240,27 @@ function Le({
|
|
|
1240
1240
|
const Ne = oe / 36e5;
|
|
1241
1241
|
ke = Math.max(1, Math.ceil(Ne));
|
|
1242
1242
|
}
|
|
1243
|
-
ke = Math.min(ke, ye -
|
|
1243
|
+
ke = Math.min(ke, ye - S), M({ resourceId: u, colIndex: S, spanCols: ke });
|
|
1244
1244
|
},
|
|
1245
1245
|
[T, ue, se, H, d.length, B.length]
|
|
1246
1246
|
), we = O(
|
|
1247
1247
|
(l) => {
|
|
1248
1248
|
const u = l.relatedTarget;
|
|
1249
|
-
l.currentTarget.contains(u) ||
|
|
1249
|
+
l.currentTarget.contains(u) || M(null);
|
|
1250
1250
|
},
|
|
1251
1251
|
[]
|
|
1252
1252
|
), he = O(
|
|
1253
1253
|
(l, u) => {
|
|
1254
|
-
l.preventDefault(),
|
|
1254
|
+
l.preventDefault(), M(null), T?.isDragging && T.endDrag();
|
|
1255
1255
|
},
|
|
1256
1256
|
[T]
|
|
1257
1257
|
), g = O(
|
|
1258
1258
|
(l, u) => {
|
|
1259
|
-
if (!
|
|
1260
|
-
const x = Math.min(
|
|
1259
|
+
if (!C || C.resourceId !== l) return !1;
|
|
1260
|
+
const x = Math.min(C.startCol, C.endCol), k = Math.max(C.startCol, C.endCol);
|
|
1261
1261
|
return u >= x && u <= k;
|
|
1262
1262
|
},
|
|
1263
|
-
[
|
|
1263
|
+
[C]
|
|
1264
1264
|
), E = O(
|
|
1265
1265
|
(l, u) => !_ || _.resourceId !== l ? !1 : u >= _.colIndex && u < _.colIndex + _.spanCols,
|
|
1266
1266
|
[_]
|
|
@@ -1271,7 +1271,7 @@ function Le({
|
|
|
1271
1271
|
[m, f]
|
|
1272
1272
|
), re = O(
|
|
1273
1273
|
(l, u, x) => {
|
|
1274
|
-
if (W.current && !(!
|
|
1274
|
+
if (W.current && !(!C || C.resourceId !== l)) {
|
|
1275
1275
|
if (x.buttons === 0) {
|
|
1276
1276
|
W.current = !1;
|
|
1277
1277
|
return;
|
|
@@ -1279,19 +1279,19 @@ function Le({
|
|
|
1279
1279
|
j((k) => k ? { ...k, endCol: u } : null);
|
|
1280
1280
|
}
|
|
1281
1281
|
},
|
|
1282
|
-
[
|
|
1282
|
+
[C]
|
|
1283
1283
|
), De = O(() => {
|
|
1284
|
-
if (!W.current || !
|
|
1284
|
+
if (!W.current || !C) return;
|
|
1285
1285
|
W.current = !1;
|
|
1286
|
-
const l = Math.min(
|
|
1286
|
+
const l = Math.min(C.startCol, C.endCol), u = Math.max(C.startCol, C.endCol), x = se(l), k = se(u), S = new Date(x.date), z = new Date(k.date);
|
|
1287
1287
|
k.hour !== void 0 && z.setHours(k.hour + 1, 0, 0, 0);
|
|
1288
1288
|
const I = {
|
|
1289
|
-
startDate:
|
|
1289
|
+
startDate: S,
|
|
1290
1290
|
endDate: z,
|
|
1291
|
-
resourceId:
|
|
1291
|
+
resourceId: C.resourceId
|
|
1292
1292
|
};
|
|
1293
|
-
l === u && f && f(x.date, x.hour,
|
|
1294
|
-
}, [
|
|
1293
|
+
l === u && f && f(x.date, x.hour, C.resourceId), m?.(I), j((ee) => ee ? { ...ee, isSelecting: !1 } : null), setTimeout(() => j(null), 150);
|
|
1294
|
+
}, [C, se, H, f, m]);
|
|
1295
1295
|
return de(() => {
|
|
1296
1296
|
const l = () => {
|
|
1297
1297
|
W.current && De();
|
|
@@ -1300,7 +1300,7 @@ function Le({
|
|
|
1300
1300
|
window.removeEventListener("pointerup", l), window.removeEventListener("pointercancel", l);
|
|
1301
1301
|
};
|
|
1302
1302
|
}, [De]), de(() => {
|
|
1303
|
-
T?.isDragging ||
|
|
1303
|
+
T?.isDragging || M(null);
|
|
1304
1304
|
}, [T?.isDragging]), /* @__PURE__ */ e("div", { className: p("flex h-full flex-col", v), children: /* @__PURE__ */ e("div", { className: "ic-timeline-scroll-container flex-1", ref: F, children: /* @__PURE__ */ r("div", { className: "relative", style: { minWidth: Y }, children: [
|
|
1305
1305
|
// Hour mode: Day headers + Hour sub-headers - sticky wrapper with flex child (sticky + flex breaks sticky)
|
|
1306
1306
|
/* @__PURE__ */ e("div", { className: "ic-timeline-header sticky top-0 z-20 border-b bg-background", children: t > 1 ? (
|
|
@@ -1316,7 +1316,7 @@ function Le({
|
|
|
1316
1316
|
),
|
|
1317
1317
|
/* @__PURE__ */ r("div", { className: "flex min-w-0 flex-col", children: [
|
|
1318
1318
|
/* @__PURE__ */ e("div", { className: "flex border-b", children: B.map((l, u) => {
|
|
1319
|
-
const x = ce(l), k = u * X,
|
|
1319
|
+
const x = ce(l), k = u * X, S = K.slice(k, k + X).reduce((z, I) => z + I, 0);
|
|
1320
1320
|
return /* @__PURE__ */ e(
|
|
1321
1321
|
"div",
|
|
1322
1322
|
{
|
|
@@ -1324,14 +1324,14 @@ function Le({
|
|
|
1324
1324
|
"flex shrink-0 items-center justify-center border-r py-1.5 font-medium",
|
|
1325
1325
|
x ? "bg-primary/10 text-primary" : "bg-muted/30"
|
|
1326
1326
|
),
|
|
1327
|
-
style: { width:
|
|
1327
|
+
style: { width: S },
|
|
1328
1328
|
children: /* @__PURE__ */ e("span", { className: "text-xs", children: ln(l) })
|
|
1329
1329
|
},
|
|
1330
1330
|
`day-${l.toISOString()}`
|
|
1331
1331
|
);
|
|
1332
1332
|
}) }),
|
|
1333
1333
|
/* @__PURE__ */ e("div", { className: "flex", children: d.map((l, u) => {
|
|
1334
|
-
const x = l.hour === L, k = ce(l.date),
|
|
1334
|
+
const x = l.hour === L, k = ce(l.date), S = K[u] ?? ze;
|
|
1335
1335
|
return /* @__PURE__ */ e(
|
|
1336
1336
|
"div",
|
|
1337
1337
|
{
|
|
@@ -1340,7 +1340,7 @@ function Le({
|
|
|
1340
1340
|
x && u > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
|
|
1341
1341
|
k && "bg-primary/5"
|
|
1342
1342
|
),
|
|
1343
|
-
style: { width:
|
|
1343
|
+
style: { width: S },
|
|
1344
1344
|
children: Fe(l.hour)
|
|
1345
1345
|
},
|
|
1346
1346
|
`hour-${l.dayIndex}-${l.hour}`
|
|
@@ -1360,7 +1360,7 @@ function Le({
|
|
|
1360
1360
|
}
|
|
1361
1361
|
),
|
|
1362
1362
|
d.map((l, u) => {
|
|
1363
|
-
const x = l.hour === L, k = ce(l.date),
|
|
1363
|
+
const x = l.hour === L, k = ce(l.date), S = K[u] ?? ze;
|
|
1364
1364
|
return /* @__PURE__ */ e(
|
|
1365
1365
|
"div",
|
|
1366
1366
|
{
|
|
@@ -1369,7 +1369,7 @@ function Le({
|
|
|
1369
1369
|
x && u > 0 ? "border-l-2 border-l-border" : "border-r border-r-border/50",
|
|
1370
1370
|
k && "bg-primary/5"
|
|
1371
1371
|
),
|
|
1372
|
-
style: { width:
|
|
1372
|
+
style: { width: S },
|
|
1373
1373
|
children: Fe(l.hour)
|
|
1374
1374
|
},
|
|
1375
1375
|
`hour-${l.dayIndex}-${l.hour}`
|
|
@@ -1426,7 +1426,7 @@ function Le({
|
|
|
1426
1426
|
children: [
|
|
1427
1427
|
// Hour mode cells — interactive buttons for slot selection
|
|
1428
1428
|
d.map((x, k) => {
|
|
1429
|
-
const
|
|
1429
|
+
const S = x.hour === L && k > 0, z = K[k] ?? ze, I = g(l.user.id, k), ee = E(l.user.id, k), ne = !!(m || f);
|
|
1430
1430
|
return /* @__PURE__ */ e(
|
|
1431
1431
|
"div",
|
|
1432
1432
|
{
|
|
@@ -1453,10 +1453,10 @@ function Le({
|
|
|
1453
1453
|
className: p(
|
|
1454
1454
|
"shrink-0 select-none touch-none transition-colors",
|
|
1455
1455
|
ne && "cursor-pointer",
|
|
1456
|
-
|
|
1456
|
+
S ? "border-l-2 border-l-border" : "border-r border-r-border/50",
|
|
1457
1457
|
ce(x.date) && "bg-primary/5",
|
|
1458
1458
|
// Hover — subtle feedback (only when not selecting or dragging)
|
|
1459
|
-
ne && !
|
|
1459
|
+
ne && !C?.isSelecting && !T?.isDragging && "hover:bg-blue-50/60",
|
|
1460
1460
|
// Slot selection highlight
|
|
1461
1461
|
I && "bg-blue-100/70",
|
|
1462
1462
|
// Drop target highlight
|
|
@@ -1468,7 +1468,7 @@ function Le({
|
|
|
1468
1468
|
);
|
|
1469
1469
|
}),
|
|
1470
1470
|
l.events.map((x) => {
|
|
1471
|
-
const k = (J[x.startCol] ?? 0) + 2,
|
|
1471
|
+
const k = (J[x.startCol] ?? 0) + 2, S = J[x.startCol + x.spanCols] ?? J[J.length - 1] ?? 0, z = J[x.startCol] ?? 0, I = S - z - 4, ee = qe + x.stackIndex * (We + Je), ne = t === 1 ? "timeline-day" : t === 3 ? "timeline-3day" : "timeline-week", q = A?.eventCard;
|
|
1472
1472
|
return /* @__PURE__ */ e(
|
|
1473
1473
|
"div",
|
|
1474
1474
|
{
|
|
@@ -1730,34 +1730,34 @@ function Cn({
|
|
|
1730
1730
|
canDown: !1,
|
|
1731
1731
|
canLeft: !1,
|
|
1732
1732
|
canRight: !1
|
|
1733
|
-
}), [a, f] = ie({ x: 0, y: 0 }), [m, c] = ie(!1), v = o.canUp || o.canDown || o.canLeft || o.canRight, y = ae(null), b = ae(null), A = ae(null), $ = ae(!1), P = ae({ x: 0, y: 0 }), F = ae({ x: 0, y: 0 }), T = ae(0),
|
|
1733
|
+
}), [a, f] = ie({ x: 0, y: 0 }), [m, c] = ie(!1), v = o.canUp || o.canDown || o.canLeft || o.canRight, y = ae(null), b = ae(null), A = ae(null), $ = ae(!1), P = ae({ x: 0, y: 0 }), F = ae({ x: 0, y: 0 }), T = ae(0), C = ae(null), j = O(() => {
|
|
1734
1734
|
const h = t.current;
|
|
1735
1735
|
if (!h) return;
|
|
1736
|
-
const
|
|
1736
|
+
const D = 4;
|
|
1737
1737
|
i({
|
|
1738
|
-
canUp: h.scrollTop >
|
|
1739
|
-
canDown: h.scrollTop + h.clientHeight < h.scrollHeight -
|
|
1740
|
-
canLeft: h.scrollLeft >
|
|
1741
|
-
canRight: h.scrollLeft + h.clientWidth < h.scrollWidth -
|
|
1738
|
+
canUp: h.scrollTop > D,
|
|
1739
|
+
canDown: h.scrollTop + h.clientHeight < h.scrollHeight - D,
|
|
1740
|
+
canLeft: h.scrollLeft > D,
|
|
1741
|
+
canRight: h.scrollLeft + h.clientWidth < h.scrollWidth - D
|
|
1742
1742
|
});
|
|
1743
1743
|
}, [t]);
|
|
1744
1744
|
de(() => {
|
|
1745
1745
|
const h = t.current;
|
|
1746
1746
|
if (!h) return;
|
|
1747
1747
|
j(), h.addEventListener("scroll", j, { passive: !0 });
|
|
1748
|
-
const
|
|
1749
|
-
|
|
1748
|
+
const D = new ResizeObserver(j);
|
|
1749
|
+
D.observe(h);
|
|
1750
1750
|
const w = new MutationObserver(j);
|
|
1751
1751
|
return w.observe(h, { childList: !0, subtree: !0 }), () => {
|
|
1752
|
-
h.removeEventListener("scroll", j),
|
|
1752
|
+
h.removeEventListener("scroll", j), D.disconnect(), w.disconnect();
|
|
1753
1753
|
};
|
|
1754
1754
|
}, [t, j]);
|
|
1755
1755
|
const W = O(
|
|
1756
|
-
(h,
|
|
1757
|
-
t.current?.scrollBy({ left: h, top:
|
|
1756
|
+
(h, D) => {
|
|
1757
|
+
t.current?.scrollBy({ left: h, top: D, behavior: "smooth" });
|
|
1758
1758
|
},
|
|
1759
1759
|
[t]
|
|
1760
|
-
), _ = O(() => W(0, -Ie), [W]),
|
|
1760
|
+
), _ = O(() => W(0, -Ie), [W]), M = O(() => W(0, Ie), [W]), G = O(() => W(-Ie, 0), [W]), H = O(() => W(Ie, 0), [W]), L = O(() => {
|
|
1761
1761
|
y.current && (clearTimeout(y.current), y.current = null), b.current && (clearInterval(b.current), b.current = null);
|
|
1762
1762
|
}, []), V = O((h) => {
|
|
1763
1763
|
h(), y.current = setTimeout(() => {
|
|
@@ -1767,7 +1767,7 @@ function Cn({
|
|
|
1767
1767
|
de(() => L, [L]), de(() => {
|
|
1768
1768
|
const h = t.current;
|
|
1769
1769
|
if (!h) return;
|
|
1770
|
-
const
|
|
1770
|
+
const D = (w) => {
|
|
1771
1771
|
if (w.ctrlKey || w.metaKey || w.altKey) return;
|
|
1772
1772
|
const R = w.target.tagName;
|
|
1773
1773
|
if (!(R === "INPUT" || R === "TEXTAREA" || w.target.isContentEditable))
|
|
@@ -1776,7 +1776,7 @@ function Cn({
|
|
|
1776
1776
|
w.preventDefault(), _();
|
|
1777
1777
|
break;
|
|
1778
1778
|
case "ArrowDown":
|
|
1779
|
-
w.preventDefault(),
|
|
1779
|
+
w.preventDefault(), M();
|
|
1780
1780
|
break;
|
|
1781
1781
|
case "ArrowLeft":
|
|
1782
1782
|
w.preventDefault(), G();
|
|
@@ -1786,12 +1786,12 @@ function Cn({
|
|
|
1786
1786
|
break;
|
|
1787
1787
|
}
|
|
1788
1788
|
};
|
|
1789
|
-
return h.addEventListener("keydown",
|
|
1790
|
-
}, [t, _,
|
|
1789
|
+
return h.addEventListener("keydown", D), () => h.removeEventListener("keydown", D);
|
|
1790
|
+
}, [t, _, M, G, H]), de(() => {
|
|
1791
1791
|
if (!v) return;
|
|
1792
|
-
const h =
|
|
1792
|
+
const h = C.current;
|
|
1793
1793
|
if (!h) return;
|
|
1794
|
-
let
|
|
1794
|
+
let D = 0;
|
|
1795
1795
|
const w = () => {
|
|
1796
1796
|
const Y = h.offsetParent;
|
|
1797
1797
|
if (!Y) return;
|
|
@@ -1803,7 +1803,7 @@ function Cn({
|
|
|
1803
1803
|
const le = Math.min(J.bottom, ue) - J.top, we = h.offsetHeight, he = le - we - 12, g = 12, E = Y.clientHeight - we - 12, U = Math.max(g, Math.min(he, E));
|
|
1804
1804
|
h.style.top = `${U}px`, h.style.bottom = "auto";
|
|
1805
1805
|
}, R = () => {
|
|
1806
|
-
cancelAnimationFrame(
|
|
1806
|
+
cancelAnimationFrame(D), D = requestAnimationFrame(w);
|
|
1807
1807
|
}, K = [window];
|
|
1808
1808
|
let Z = h.parentElement;
|
|
1809
1809
|
for (; Z; ) {
|
|
@@ -1813,7 +1813,7 @@ function Cn({
|
|
|
1813
1813
|
for (const Y of K)
|
|
1814
1814
|
Y.addEventListener("scroll", R, { passive: !0 });
|
|
1815
1815
|
return window.addEventListener("resize", R, { passive: !0 }), w(), () => {
|
|
1816
|
-
cancelAnimationFrame(
|
|
1816
|
+
cancelAnimationFrame(D);
|
|
1817
1817
|
for (const Y of K)
|
|
1818
1818
|
Y.removeEventListener("scroll", R);
|
|
1819
1819
|
window.removeEventListener("resize", R);
|
|
@@ -1824,7 +1824,7 @@ function Cn({
|
|
|
1824
1824
|
}, []), Q = O(
|
|
1825
1825
|
(h) => {
|
|
1826
1826
|
h.preventDefault(), $.current = !0, c(!0), P.current = { x: h.clientX, y: h.clientY }, F.current = { x: 0, y: 0 }, h.target.setPointerCapture(h.pointerId);
|
|
1827
|
-
const
|
|
1827
|
+
const D = () => {
|
|
1828
1828
|
if (!$.current) return;
|
|
1829
1829
|
const w = t.current;
|
|
1830
1830
|
if (w) {
|
|
@@ -1834,22 +1834,22 @@ function Cn({
|
|
|
1834
1834
|
w.scrollLeft += R / Z * J, w.scrollTop += K / Z * J;
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
|
-
T.current = requestAnimationFrame(
|
|
1837
|
+
T.current = requestAnimationFrame(D);
|
|
1838
1838
|
};
|
|
1839
|
-
T.current = requestAnimationFrame(
|
|
1839
|
+
T.current = requestAnimationFrame(D);
|
|
1840
1840
|
},
|
|
1841
1841
|
[t]
|
|
1842
1842
|
), B = O((h) => {
|
|
1843
1843
|
if (!$.current) return;
|
|
1844
|
-
const
|
|
1845
|
-
F.current = { x:
|
|
1846
|
-
const R = Math.sqrt(
|
|
1844
|
+
const D = h.clientX - P.current.x, w = h.clientY - P.current.y;
|
|
1845
|
+
F.current = { x: D, y: w };
|
|
1846
|
+
const R = Math.sqrt(D * D + w * w);
|
|
1847
1847
|
if (R < tt)
|
|
1848
1848
|
f({ x: 0, y: 0 });
|
|
1849
1849
|
else {
|
|
1850
1850
|
const Z = Math.min(R, $e) / $e * vn;
|
|
1851
1851
|
f({
|
|
1852
|
-
x:
|
|
1852
|
+
x: D / R * Z,
|
|
1853
1853
|
y: w / R * Z
|
|
1854
1854
|
});
|
|
1855
1855
|
}
|
|
@@ -1860,7 +1860,7 @@ function Cn({
|
|
|
1860
1860
|
h.preventDefault(), _();
|
|
1861
1861
|
break;
|
|
1862
1862
|
case "ArrowDown":
|
|
1863
|
-
h.preventDefault(),
|
|
1863
|
+
h.preventDefault(), M();
|
|
1864
1864
|
break;
|
|
1865
1865
|
case "ArrowLeft":
|
|
1866
1866
|
h.preventDefault(), G();
|
|
@@ -1870,7 +1870,7 @@ function Cn({
|
|
|
1870
1870
|
break;
|
|
1871
1871
|
}
|
|
1872
1872
|
},
|
|
1873
|
-
[_,
|
|
1873
|
+
[_, M, G, H]
|
|
1874
1874
|
);
|
|
1875
1875
|
if (!v) return null;
|
|
1876
1876
|
const N = n ? n.toLocaleDateString(void 0, {
|
|
@@ -1881,7 +1881,7 @@ function Cn({
|
|
|
1881
1881
|
return /* @__PURE__ */ r(
|
|
1882
1882
|
"div",
|
|
1883
1883
|
{
|
|
1884
|
-
ref:
|
|
1884
|
+
ref: C,
|
|
1885
1885
|
className: `inno-scroll-nav-wrapper ${s ?? ""}`,
|
|
1886
1886
|
role: "toolbar",
|
|
1887
1887
|
"aria-label": "Scroll navigation",
|
|
@@ -1961,7 +1961,7 @@ function Cn({
|
|
|
1961
1961
|
className: `inno-scroll-nav-btn inno-scroll-nav-down ${o.canDown ? "" : "inno-scroll-nav-btn-disabled"}`,
|
|
1962
1962
|
"aria-label": "Scroll down",
|
|
1963
1963
|
disabled: !o.canDown,
|
|
1964
|
-
onPointerDown: () => V(
|
|
1964
|
+
onPointerDown: () => V(M),
|
|
1965
1965
|
onPointerUp: L,
|
|
1966
1966
|
onPointerLeave: L,
|
|
1967
1967
|
tabIndex: o.canDown ? 0 : -1,
|
|
@@ -2000,12 +2000,12 @@ function Mn({
|
|
|
2000
2000
|
headerActions: P,
|
|
2001
2001
|
renderPopover: F,
|
|
2002
2002
|
calendarRef: T,
|
|
2003
|
-
headerConfig:
|
|
2003
|
+
headerConfig: C,
|
|
2004
2004
|
eventDetailMode: j,
|
|
2005
2005
|
renderEventDetail: W
|
|
2006
2006
|
}) {
|
|
2007
2007
|
const _ = m ?? (c ? "popover" : "expand"), {
|
|
2008
|
-
view:
|
|
2008
|
+
view: M,
|
|
2009
2009
|
setView: G,
|
|
2010
2010
|
selectedDate: H,
|
|
2011
2011
|
setSelectedDate: L,
|
|
@@ -2016,7 +2016,7 @@ function Mn({
|
|
|
2016
2016
|
workingHours: d,
|
|
2017
2017
|
badgeVariant: N,
|
|
2018
2018
|
showWorkingHoursOnly: h,
|
|
2019
|
-
clearFocusEventId:
|
|
2019
|
+
clearFocusEventId: D
|
|
2020
2020
|
} = zt(), w = te(() => {
|
|
2021
2021
|
if (!h || !d)
|
|
2022
2022
|
return {
|
|
@@ -2038,7 +2038,7 @@ function Mn({
|
|
|
2038
2038
|
() => ({
|
|
2039
2039
|
scrollToToday: () => {
|
|
2040
2040
|
const g = /* @__PURE__ */ new Date();
|
|
2041
|
-
L(g,
|
|
2041
|
+
L(g, M), requestAnimationFrame(() => {
|
|
2042
2042
|
requestAnimationFrame(() => {
|
|
2043
2043
|
const E = K.current?.querySelector(
|
|
2044
2044
|
".ic-timeline-scroll-container, [class*='overflow-auto']"
|
|
@@ -2076,8 +2076,8 @@ function Mn({
|
|
|
2076
2076
|
},
|
|
2077
2077
|
getViewRect: () => K.current?.getBoundingClientRect() ?? null,
|
|
2078
2078
|
focusEvent: (g) => {
|
|
2079
|
-
|
|
2080
|
-
|
|
2079
|
+
D(), requestAnimationFrame(() => {
|
|
2080
|
+
D();
|
|
2081
2081
|
});
|
|
2082
2082
|
const E = K.current?.querySelector(
|
|
2083
2083
|
`[data-event-id="${g}"]`
|
|
@@ -2087,13 +2087,13 @@ function Mn({
|
|
|
2087
2087
|
}),
|
|
2088
2088
|
[
|
|
2089
2089
|
L,
|
|
2090
|
-
|
|
2090
|
+
M,
|
|
2091
2091
|
w,
|
|
2092
2092
|
d,
|
|
2093
|
-
|
|
2093
|
+
D
|
|
2094
2094
|
]
|
|
2095
2095
|
);
|
|
2096
|
-
const Z = te(() => Dn(
|
|
2096
|
+
const Z = te(() => Dn(M), [M]), Y = O(
|
|
2097
2097
|
(g) => {
|
|
2098
2098
|
if (s) {
|
|
2099
2099
|
s(g);
|
|
@@ -2127,7 +2127,7 @@ function Mn({
|
|
|
2127
2127
|
[n]
|
|
2128
2128
|
), we = () => {
|
|
2129
2129
|
const g = X, E = se, U = F;
|
|
2130
|
-
switch (
|
|
2130
|
+
switch (M) {
|
|
2131
2131
|
case "day":
|
|
2132
2132
|
return /* @__PURE__ */ e(
|
|
2133
2133
|
St,
|
|
@@ -2339,17 +2339,17 @@ function Mn({
|
|
|
2339
2339
|
Ct,
|
|
2340
2340
|
{
|
|
2341
2341
|
currentDate: H,
|
|
2342
|
-
view:
|
|
2342
|
+
view: M,
|
|
2343
2343
|
events: X,
|
|
2344
2344
|
onViewChange: G,
|
|
2345
|
-
onNavigateToday: () => L(/* @__PURE__ */ new Date(),
|
|
2345
|
+
onNavigateToday: () => L(/* @__PURE__ */ new Date(), M),
|
|
2346
2346
|
onNavigatePrev: () => {
|
|
2347
2347
|
const g = new Date(H);
|
|
2348
|
-
|
|
2348
|
+
M === "day" || M === "timeline-day" || M === "resource-day" ? g.setDate(g.getDate() - 1) : M === "timeline-3day" ? g.setDate(g.getDate() - 3) : M === "week" || M === "timeline-week" || M === "resource-week" ? g.setDate(g.getDate() - 7) : M === "month" ? g.setMonth(g.getMonth() - 1) : M === "year" ? g.setFullYear(g.getFullYear() - 1) : g.setDate(g.getDate() - 7), L(g, M);
|
|
2349
2349
|
},
|
|
2350
2350
|
onNavigateNext: () => {
|
|
2351
2351
|
const g = new Date(H);
|
|
2352
|
-
|
|
2352
|
+
M === "day" || M === "timeline-day" || M === "resource-day" ? g.setDate(g.getDate() + 1) : M === "timeline-3day" ? g.setDate(g.getDate() + 3) : M === "week" || M === "timeline-week" || M === "resource-week" ? g.setDate(g.getDate() + 7) : M === "month" ? g.setMonth(g.getMonth() + 1) : M === "year" ? g.setFullYear(g.getFullYear() + 1) : g.setDate(g.getDate() + 7), L(g, M);
|
|
2353
2353
|
},
|
|
2354
2354
|
availableViews: [
|
|
2355
2355
|
"day",
|
|
@@ -2364,7 +2364,7 @@ function Mn({
|
|
|
2364
2364
|
actions: P,
|
|
2365
2365
|
settingsContent: A,
|
|
2366
2366
|
filterContent: $,
|
|
2367
|
-
...
|
|
2367
|
+
...C && { headerConfig: C }
|
|
2368
2368
|
}
|
|
2369
2369
|
),
|
|
2370
2370
|
/* @__PURE__ */ r("div", { className: "relative flex-1 min-h-0", children: [
|
|
@@ -2406,11 +2406,11 @@ function Sn({
|
|
|
2406
2406
|
onAddEvent: P,
|
|
2407
2407
|
onEventDrop: F,
|
|
2408
2408
|
onDateChange: T,
|
|
2409
|
-
onViewChange:
|
|
2409
|
+
onViewChange: C,
|
|
2410
2410
|
className: j,
|
|
2411
2411
|
showHeader: W = !0,
|
|
2412
2412
|
minSelectionMinutes: _ = 30,
|
|
2413
|
-
showMoreMode:
|
|
2413
|
+
showMoreMode: M,
|
|
2414
2414
|
showMoreEventsInPopover: G = !1,
|
|
2415
2415
|
isLoading: H = !1,
|
|
2416
2416
|
renderPopover: L,
|
|
@@ -2421,7 +2421,7 @@ function Sn({
|
|
|
2421
2421
|
headerActions: d,
|
|
2422
2422
|
focusEventId: N,
|
|
2423
2423
|
headerConfig: h,
|
|
2424
|
-
eventDetailMode:
|
|
2424
|
+
eventDetailMode: D,
|
|
2425
2425
|
renderEventDetail: w
|
|
2426
2426
|
}, R) {
|
|
2427
2427
|
return /* @__PURE__ */ e(Tt, { ...F && { onEventDrop: F }, children: /* @__PURE__ */ e(
|
|
@@ -2439,7 +2439,7 @@ function Sn({
|
|
|
2439
2439
|
...v && { initialSearchQuery: v },
|
|
2440
2440
|
...y && { preferencesConfig: y },
|
|
2441
2441
|
...T && { onDateChange: T },
|
|
2442
|
-
...
|
|
2442
|
+
...C && { onViewChange: C },
|
|
2443
2443
|
...N && { initialFocusEventId: N },
|
|
2444
2444
|
children: /* @__PURE__ */ e(
|
|
2445
2445
|
Mn,
|
|
@@ -2452,7 +2452,7 @@ function Sn({
|
|
|
2452
2452
|
className: j,
|
|
2453
2453
|
showHeader: W,
|
|
2454
2454
|
minSelectionMinutes: _,
|
|
2455
|
-
...
|
|
2455
|
+
...M && { showMoreMode: M },
|
|
2456
2456
|
showMoreEventsInPopover: G,
|
|
2457
2457
|
isLoading: H,
|
|
2458
2458
|
...V && { slots: V },
|
|
@@ -2462,7 +2462,7 @@ function Sn({
|
|
|
2462
2462
|
headerActions: d,
|
|
2463
2463
|
calendarRef: R,
|
|
2464
2464
|
...h && { headerConfig: h },
|
|
2465
|
-
...
|
|
2465
|
+
...D && { eventDetailMode: D },
|
|
2466
2466
|
...w && { renderEventDetail: w }
|
|
2467
2467
|
}
|
|
2468
2468
|
)
|
|
@@ -3130,25 +3130,25 @@ function Tr({
|
|
|
3130
3130
|
labels: y,
|
|
3131
3131
|
getScheduleTypeName: b
|
|
3132
3132
|
}) {
|
|
3133
|
-
const A = { ...Yn, ...y }, [$, P] = ie(""), [F, T] = ie(""),
|
|
3133
|
+
const A = { ...Yn, ...y }, [$, P] = ie(""), [F, T] = ie(""), C = te(() => $.trim() ? ot(t, $, (d) => [
|
|
3134
3134
|
d.name,
|
|
3135
3135
|
b?.(d) || d.name
|
|
3136
|
-
]) : t, [t, $, b]), j = te(() => F.trim() ? ot(n, F, (d) => [d.name, d.email || ""]) : n, [n, F]), W =
|
|
3137
|
-
const h = N ? [...s, d] : s.filter((
|
|
3136
|
+
]) : t, [t, $, b]), j = te(() => F.trim() ? ot(n, F, (d) => [d.name, d.email || ""]) : n, [n, F]), W = C.length > 0 && C.every((d) => s.includes(d.id)), _ = j.length > 0 && j.every((d) => i.includes(d.id)), M = s.length + i.length, G = (d, N) => {
|
|
3137
|
+
const h = N ? [...s, d] : s.filter((D) => D !== d);
|
|
3138
3138
|
o(h);
|
|
3139
3139
|
}, H = () => {
|
|
3140
3140
|
if (W) {
|
|
3141
|
-
const d = new Set(
|
|
3141
|
+
const d = new Set(C.map((N) => N.id));
|
|
3142
3142
|
o(s.filter((N) => !d.has(N)));
|
|
3143
3143
|
} else {
|
|
3144
3144
|
const d = /* @__PURE__ */ new Set([
|
|
3145
3145
|
...s,
|
|
3146
|
-
...
|
|
3146
|
+
...C.map((N) => N.id)
|
|
3147
3147
|
]);
|
|
3148
3148
|
o(Array.from(d));
|
|
3149
3149
|
}
|
|
3150
3150
|
}, L = (d, N) => {
|
|
3151
|
-
const h = N ? [...i, d] : i.filter((
|
|
3151
|
+
const h = N ? [...i, d] : i.filter((D) => D !== d);
|
|
3152
3152
|
a(h);
|
|
3153
3153
|
}, V = () => {
|
|
3154
3154
|
if (_) {
|
|
@@ -3174,7 +3174,7 @@ function Tr({
|
|
|
3174
3174
|
/* @__PURE__ */ e("h3", { className: "text-base font-semibold text-foreground", children: A.title }),
|
|
3175
3175
|
/* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: A.subtitle })
|
|
3176
3176
|
] }),
|
|
3177
|
-
|
|
3177
|
+
M > 0 && /* @__PURE__ */ r(
|
|
3178
3178
|
"button",
|
|
3179
3179
|
{
|
|
3180
3180
|
type: "button",
|
|
@@ -3223,13 +3223,13 @@ function Tr({
|
|
|
3223
3223
|
},
|
|
3224
3224
|
`skeleton-${N}`
|
|
3225
3225
|
))
|
|
3226
|
-
) :
|
|
3226
|
+
) : C.map((d) => {
|
|
3227
3227
|
const N = s.includes(d.id), h = B(d);
|
|
3228
3228
|
return /* @__PURE__ */ r(
|
|
3229
3229
|
_e,
|
|
3230
3230
|
{
|
|
3231
3231
|
checked: N,
|
|
3232
|
-
onCheckedChange: (
|
|
3232
|
+
onCheckedChange: (D) => G(d.id, D),
|
|
3233
3233
|
className: p(
|
|
3234
3234
|
"relative flex w-full cursor-pointer items-center justify-between gap-3 rounded-md border border-border bg-white px-3 py-2 transition-colors hover:border-primary/50",
|
|
3235
3235
|
N && "border-primary bg-primary/5"
|
|
@@ -3263,7 +3263,7 @@ function Tr({
|
|
|
3263
3263
|
d.id
|
|
3264
3264
|
);
|
|
3265
3265
|
}),
|
|
3266
|
-
!c &&
|
|
3266
|
+
!c && C.length === 0 && /* @__PURE__ */ e("p", { className: "px-2 py-1 text-xs text-muted-foreground", children: A.noScheduleTypes })
|
|
3267
3267
|
] })
|
|
3268
3268
|
] }),
|
|
3269
3269
|
/* @__PURE__ */ e("div", { className: "h-px w-full bg-border/60" }),
|
|
@@ -3909,8 +3909,8 @@ function jr({
|
|
|
3909
3909
|
compact: v = !1
|
|
3910
3910
|
}) {
|
|
3911
3911
|
const y = it(), b = y?.filteredEvents, A = y?.currentDate ?? /* @__PURE__ */ new Date(), $ = t ?? b ?? [], P = te(() => {
|
|
3912
|
-
const
|
|
3913
|
-
return j.setDate(j.getDate() + n), $.filter((W) => W.endDate >=
|
|
3912
|
+
const C = Pe(A), j = new Date(C);
|
|
3913
|
+
return j.setDate(j.getDate() + n), $.filter((W) => W.endDate >= C && W.startDate < j);
|
|
3914
3914
|
}, [$, n, A]), F = te(
|
|
3915
3915
|
() => hr(P, s),
|
|
3916
3916
|
[P, s]
|
|
@@ -3991,15 +3991,15 @@ function jr({
|
|
|
3991
3991
|
"divide-y overflow-auto",
|
|
3992
3992
|
v ? "p-2 max-h-[280px]" : "p-3 max-h-[400px]"
|
|
3993
3993
|
),
|
|
3994
|
-
children: F.map((
|
|
3994
|
+
children: F.map((C) => /* @__PURE__ */ e(
|
|
3995
3995
|
fr,
|
|
3996
3996
|
{
|
|
3997
|
-
group:
|
|
3997
|
+
group: C,
|
|
3998
3998
|
onEventClick: o,
|
|
3999
3999
|
onViewMore: i ? (j) => i(j) : void 0,
|
|
4000
4000
|
compact: v
|
|
4001
4001
|
},
|
|
4002
|
-
|
|
4002
|
+
C.dateKey
|
|
4003
4003
|
))
|
|
4004
4004
|
}
|
|
4005
4005
|
)
|
|
@@ -4022,4 +4022,4 @@ export {
|
|
|
4022
4022
|
Tr as b,
|
|
4023
4023
|
Dr as c
|
|
4024
4024
|
};
|
|
4025
|
-
//# sourceMappingURL=agenda-widget-
|
|
4025
|
+
//# sourceMappingURL=agenda-widget-Couk7jMB.js.map
|