@innosolutions/inno-calendar 1.0.70 → 1.0.71
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-Bl-Gb588.cjs +2 -0
- package/dist/agenda-widget-Bl-Gb588.cjs.map +1 -0
- package/dist/{agenda-widget-GRHaHwQ2.js → agenda-widget-DrRyLzTK.js} +89 -87
- package/dist/agenda-widget-DrRyLzTK.js.map +1 -0
- package/dist/components/index.cjs +1 -1
- package/dist/components/index.mjs +2 -2
- package/dist/components/inno-calendar.d.ts +23 -1
- package/dist/components/inno-calendar.d.ts.map +1 -1
- package/dist/core/context/inno-calendar-provider.d.ts +8 -2
- package/dist/core/context/inno-calendar-provider.d.ts.map +1 -1
- package/dist/core/index.cjs +1 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.mjs +4 -4
- package/dist/core/types.d.ts +40 -0
- package/dist/core/types.d.ts.map +1 -1
- package/dist/core/utils/view-storage.d.ts +14 -10
- package/dist/core/utils/view-storage.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +7 -7
- package/dist/position-utils-D_KpwRus.js +1053 -0
- package/dist/position-utils-D_KpwRus.js.map +1 -0
- package/dist/position-utils-ksZ_IjXC.cjs +2 -0
- package/dist/position-utils-ksZ_IjXC.cjs.map +1 -0
- package/dist/presets/index.cjs +1 -1
- package/dist/presets/index.mjs +1 -1
- package/dist/slot-selection-context-CLYZU6ul.cjs +2 -0
- package/dist/{slot-selection-context-DvTn_R-Z.cjs.map → slot-selection-context-CLYZU6ul.cjs.map} +1 -1
- package/dist/slot-selection-context-Ct5cVcKW.js +611 -0
- package/dist/{slot-selection-context-D6zo91K_.js.map → slot-selection-context-Ct5cVcKW.js.map} +1 -1
- package/dist/{tailwind-calendar-BA7v_Wgx.cjs → tailwind-calendar-BbUb61uY.cjs} +2 -2
- package/dist/{tailwind-calendar-BA7v_Wgx.cjs.map → tailwind-calendar-BbUb61uY.cjs.map} +1 -1
- package/dist/{tailwind-calendar-Bh1yB1jf.js → tailwind-calendar-DrwGVSF-.js} +3 -3
- package/dist/{tailwind-calendar-Bh1yB1jf.js.map → tailwind-calendar-DrwGVSF-.js.map} +1 -1
- package/dist/{use-calendar-BwqE_WNA.cjs → use-calendar-BK0nQYJq.cjs} +2 -2
- package/dist/{use-calendar-BwqE_WNA.cjs.map → use-calendar-BK0nQYJq.cjs.map} +1 -1
- package/dist/{use-calendar--JnbGA3L.js → use-calendar-DJI35SSd.js} +2 -2
- package/dist/{use-calendar--JnbGA3L.js.map → use-calendar-DJI35SSd.js.map} +1 -1
- package/dist/{use-slot-selection-C1tk-o0j.cjs → use-slot-selection-CCE11R4j.cjs} +2 -2
- package/dist/{use-slot-selection-C1tk-o0j.cjs.map → use-slot-selection-CCE11R4j.cjs.map} +1 -1
- package/dist/{use-slot-selection-BLCDzQzo.js → use-slot-selection-CX1w8EdM.js} +3 -3
- package/dist/{use-slot-selection-BLCDzQzo.js.map → use-slot-selection-CX1w8EdM.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.mjs +1 -1
- package/dist/{week-view-D1wefMb8.cjs → week-view-BXmaRChB.cjs} +2 -2
- package/dist/{week-view-D1wefMb8.cjs.map → week-view-BXmaRChB.cjs.map} +1 -1
- package/dist/{week-view-BbtTpJTU.js → week-view-BeasFcyR.js} +3 -3
- package/dist/{week-view-BbtTpJTU.js.map → week-view-BeasFcyR.js.map} +1 -1
- package/package.json +1 -1
- package/dist/agenda-widget-GRHaHwQ2.js.map +0 -1
- package/dist/agenda-widget-TLJuxen3.cjs +0 -2
- package/dist/agenda-widget-TLJuxen3.cjs.map +0 -1
- package/dist/position-utils-BzmOPdvQ.js +0 -1038
- package/dist/position-utils-BzmOPdvQ.js.map +0 -1
- package/dist/position-utils-EQTCC4tZ.cjs +0 -2
- package/dist/position-utils-EQTCC4tZ.cjs.map +0 -1
- package/dist/slot-selection-context-D6zo91K_.js +0 -610
- package/dist/slot-selection-context-DvTn_R-Z.cjs +0 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as e, jsxs as r, Fragment as ke } from "react/jsx-runtime";
|
|
2
|
-
import { g as ct, u as kt, C as Nt } from "./use-calendar
|
|
2
|
+
import { g as ct, u as kt, C as Nt } from "./use-calendar-DJI35SSd.js";
|
|
3
3
|
import { useCallback as B, useState as le, useEffect as he, forwardRef as We, useRef as ae, useMemo as re, useLayoutEffect as dt, useImperativeHandle as Dt } from "react";
|
|
4
4
|
import { c as f } from "./index-DtaLkIY8.js";
|
|
5
|
-
import { P as ut, p as ht, o as mt, z as pe, I as Ct, J as Mt, B as Me, K as Et, L as Ye, x as xe, F as ve, y as we, k as Lt, C as St, M as Ke, A as Tt, W as It, c as Ht, N as zt } from "./week-view-
|
|
6
|
-
import { j as At, D as jt, I as Pt, e as Wt, S as _t } from "./slot-selection-context-
|
|
7
|
-
import { aG as ue, b2 as _e, L as ft, as as $t, a2 as Ft, ad as Ot, o as gt, Y as Bt } from "./position-utils-
|
|
5
|
+
import { P as ut, p as ht, o as mt, z as pe, I as Ct, J as Mt, B as Me, K as Et, L as Ye, x as xe, F as ve, y as we, k as Lt, C as St, M as Ke, A as Tt, W as It, c as Ht, N as zt } from "./week-view-BeasFcyR.js";
|
|
6
|
+
import { j as At, D as jt, I as Pt, e as Wt, S as _t } from "./slot-selection-context-Ct5cVcKW.js";
|
|
7
|
+
import { aG as ue, b2 as _e, L as ft, as as $t, a2 as Ft, ad as Ot, o as gt, Y as Bt } from "./position-utils-D_KpwRus.js";
|
|
8
8
|
function Rt({ view: t, className: n = "" }) {
|
|
9
9
|
return /* @__PURE__ */ e(
|
|
10
10
|
"div",
|
|
@@ -566,7 +566,7 @@ function Je({
|
|
|
566
566
|
formatDate: _ = nn,
|
|
567
567
|
formatTimeRange: A = rn
|
|
568
568
|
}) {
|
|
569
|
-
const [K, q] = le(!1), Y = !(t.isCanceled || t.meetingTookPlace), g = t.isRecurring ?? !1, C = t.participantDetails, u = t.participantsNames || [], N = C && C.length > 0, y = $ === !0,
|
|
569
|
+
const [K, q] = le(!1), Y = !(t.isCanceled || t.meetingTookPlace), g = t.isRecurring ?? !1, C = t.participantDetails, u = t.participantsNames || [], N = C && C.length > 0, y = $ === !0, V = $ === !1, O = P && !S && Y, G = N ? C.filter((J) => J.isConfirmed).length : t.isAccepted ? u.length : 0, U = N ? C.length : u.length, se = t.scheduleTypeColor || t.hexColor || "#039BE5", Z = B(() => t.startDate ? _(t.startDate) : n.noDateProvided, [t.startDate, _, n.noDateProvided]), me = B(() => t.startDate && t.endDate ? A(t.startDate, t.endDate) : null, [t.startDate, t.endDate, A]), Ne = () => {
|
|
570
570
|
o(), s?.(t);
|
|
571
571
|
}, te = () => {
|
|
572
572
|
o(), p?.(t);
|
|
@@ -653,13 +653,13 @@ function Je({
|
|
|
653
653
|
/* @__PURE__ */ r("div", { className: "flex-1", children: [
|
|
654
654
|
/* @__PURE__ */ r("div", { className: "flex items-center gap-0", children: [
|
|
655
655
|
/* @__PURE__ */ r("span", { className: "text-sm text-zinc-900 dark:text-zinc-100 font-medium", children: [
|
|
656
|
-
|
|
656
|
+
U,
|
|
657
657
|
" ",
|
|
658
|
-
|
|
658
|
+
U !== 1 ? n.guests : n.guest
|
|
659
659
|
] }),
|
|
660
|
-
|
|
660
|
+
U > 0 && /* @__PURE__ */ r("span", { className: "text-xs text-zinc-500", children: [
|
|
661
661
|
"(",
|
|
662
|
-
|
|
662
|
+
G,
|
|
663
663
|
" ",
|
|
664
664
|
n.confirmed,
|
|
665
665
|
")"
|
|
@@ -667,19 +667,19 @@ function Je({
|
|
|
667
667
|
] }),
|
|
668
668
|
/* @__PURE__ */ r("div", { className: "mt-2 space-y-2", children: [
|
|
669
669
|
N ? C.slice(0, 6).map(
|
|
670
|
-
(
|
|
670
|
+
(J, m) => W ? W(J, m) : /* @__PURE__ */ e(
|
|
671
671
|
Ge,
|
|
672
672
|
{
|
|
673
|
-
participant:
|
|
673
|
+
participant: J,
|
|
674
674
|
isEventCanceled: t.isCanceled,
|
|
675
675
|
labels: n
|
|
676
676
|
},
|
|
677
|
-
|
|
677
|
+
J.id
|
|
678
678
|
)
|
|
679
|
-
) : u.slice(0, 6).map((
|
|
679
|
+
) : u.slice(0, 6).map((J, m) => {
|
|
680
680
|
const j = {
|
|
681
681
|
id: String(m),
|
|
682
|
-
name:
|
|
682
|
+
name: J,
|
|
683
683
|
email: "",
|
|
684
684
|
isConfirmed: t.isAccepted,
|
|
685
685
|
isOrganizer: m === 0,
|
|
@@ -692,12 +692,12 @@ function Je({
|
|
|
692
692
|
isEventCanceled: t.isCanceled,
|
|
693
693
|
labels: n
|
|
694
694
|
},
|
|
695
|
-
|
|
695
|
+
J
|
|
696
696
|
);
|
|
697
697
|
}),
|
|
698
|
-
|
|
698
|
+
U > 6 && /* @__PURE__ */ r("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
|
|
699
699
|
"+",
|
|
700
|
-
|
|
700
|
+
U - 6,
|
|
701
701
|
" ",
|
|
702
702
|
n.more
|
|
703
703
|
] })
|
|
@@ -710,7 +710,7 @@ function Je({
|
|
|
710
710
|
] }),
|
|
711
711
|
/* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
|
|
712
712
|
/* @__PURE__ */ e(Jt, { className: "h-5 w-5 text-zinc-400 mt-0.5 shrink-0" }),
|
|
713
|
-
/* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: N && C.find((
|
|
713
|
+
/* @__PURE__ */ e("div", { className: "text-sm text-zinc-700 dark:text-zinc-300", children: N && C.find((J) => J.isOrganizer)?.name || u[0] || "Calendar" })
|
|
714
714
|
] })
|
|
715
715
|
] }),
|
|
716
716
|
O && h && 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: [
|
|
@@ -725,8 +725,8 @@ function Je({
|
|
|
725
725
|
"rounded-r-none gap-1.5 h-8 !border-none !bg-green-100 text-green-800 hover:!bg-green-200",
|
|
726
726
|
y && "!bg-green-700 !text-white hover:!bg-green-700"
|
|
727
727
|
),
|
|
728
|
-
onClick: (
|
|
729
|
-
|
|
728
|
+
onClick: (J) => {
|
|
729
|
+
J.stopPropagation(), y || h(t);
|
|
730
730
|
},
|
|
731
731
|
disabled: F,
|
|
732
732
|
children: F ? /* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(ke, { children: [
|
|
@@ -794,14 +794,14 @@ function Je({
|
|
|
794
794
|
variant: "outline",
|
|
795
795
|
className: f(
|
|
796
796
|
"gap-1.5 h-8 !border-none !bg-rose-100 text-rose-800 hover:!bg-rose-200",
|
|
797
|
-
|
|
797
|
+
V && "!bg-rose-700 !text-white hover:!bg-rose-700"
|
|
798
798
|
),
|
|
799
799
|
onClick: () => {
|
|
800
|
-
|
|
800
|
+
V || c(t);
|
|
801
801
|
},
|
|
802
802
|
disabled: R,
|
|
803
803
|
children: R ? /* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(ke, { children: [
|
|
804
|
-
|
|
804
|
+
V && /* @__PURE__ */ e(Pe, { className: "h-3.5 w-3.5" }),
|
|
805
805
|
n.notGoing
|
|
806
806
|
] })
|
|
807
807
|
}
|
|
@@ -995,7 +995,7 @@ function fn({ src: t, alt: n, fallback: a, className: o }) {
|
|
|
995
995
|
}
|
|
996
996
|
);
|
|
997
997
|
}
|
|
998
|
-
const gn =
|
|
998
|
+
const gn = 18, pn = 10, xn = 32;
|
|
999
999
|
function vn({ text: t, className: n }) {
|
|
1000
1000
|
const a = ae(null), o = ae(null), [s, l] = le({
|
|
1001
1001
|
active: !1,
|
|
@@ -1083,7 +1083,7 @@ function Te({
|
|
|
1083
1083
|
return String(d.user.id);
|
|
1084
1084
|
if (i.user?.id) return i.user.id;
|
|
1085
1085
|
if (i.participants?.[0]?.id) return i.participants[0].id;
|
|
1086
|
-
}),
|
|
1086
|
+
}), G = re(() => {
|
|
1087
1087
|
const i = /* @__PURE__ */ new Map();
|
|
1088
1088
|
for (const d of a)
|
|
1089
1089
|
i.set(d.id, {
|
|
@@ -1114,9 +1114,9 @@ function Te({
|
|
|
1114
1114
|
});
|
|
1115
1115
|
}
|
|
1116
1116
|
return Array.from(i.values());
|
|
1117
|
-
}, [a, n]),
|
|
1117
|
+
}, [a, n]), U = re(() => {
|
|
1118
1118
|
const i = [], d = /* @__PURE__ */ new Map();
|
|
1119
|
-
for (const D of
|
|
1119
|
+
for (const D of G)
|
|
1120
1120
|
d.set(D.id, []);
|
|
1121
1121
|
d.set("unassigned", []);
|
|
1122
1122
|
for (const D of n) {
|
|
@@ -1150,7 +1150,7 @@ function Te({
|
|
|
1150
1150
|
}
|
|
1151
1151
|
return E;
|
|
1152
1152
|
};
|
|
1153
|
-
for (const D of
|
|
1153
|
+
for (const D of G) {
|
|
1154
1154
|
const E = d.get(D.id) ?? [], T = x(E), ne = tt(T), oe = ne.reduce(
|
|
1155
1155
|
(Q, ie) => Math.max(Q, ie.stackIndex + 1),
|
|
1156
1156
|
0
|
|
@@ -1194,7 +1194,7 @@ function Te({
|
|
|
1194
1194
|
}
|
|
1195
1195
|
return i;
|
|
1196
1196
|
}, [
|
|
1197
|
-
|
|
1197
|
+
G,
|
|
1198
1198
|
n,
|
|
1199
1199
|
N,
|
|
1200
1200
|
q,
|
|
@@ -1205,14 +1205,14 @@ function Te({
|
|
|
1205
1205
|
o
|
|
1206
1206
|
]), se = re(() => {
|
|
1207
1207
|
const i = /* @__PURE__ */ new Map();
|
|
1208
|
-
for (const d of
|
|
1208
|
+
for (const d of U)
|
|
1209
1209
|
for (const x of d.events)
|
|
1210
1210
|
if (x.spanCols <= 1) {
|
|
1211
1211
|
const k = Math.floor(x.startCol), D = i.get(k) ?? 0;
|
|
1212
1212
|
i.set(k, D + 1);
|
|
1213
1213
|
}
|
|
1214
1214
|
return i;
|
|
1215
|
-
}, [
|
|
1215
|
+
}, [U]), Z = re(() => {
|
|
1216
1216
|
const i = y.length, d = Ae, x = [];
|
|
1217
1217
|
for (let k = 0; k < i; k++) {
|
|
1218
1218
|
const D = se.get(k) ?? 0;
|
|
@@ -1292,7 +1292,7 @@ function Te({
|
|
|
1292
1292
|
return null;
|
|
1293
1293
|
},
|
|
1294
1294
|
[te]
|
|
1295
|
-
),
|
|
1295
|
+
), J = B(
|
|
1296
1296
|
(i, d) => {
|
|
1297
1297
|
if (y[i]) {
|
|
1298
1298
|
const x = y[i], k = new Date(x.date);
|
|
@@ -1306,7 +1306,7 @@ function Te({
|
|
|
1306
1306
|
if (i.preventDefault(), i.dataTransfer.dropEffect = "move", !W?.isDragging || !W.dragState) return;
|
|
1307
1307
|
const x = i.currentTarget, k = fe(i.clientX, x);
|
|
1308
1308
|
if (!k) return;
|
|
1309
|
-
const { colIndex: D, minute: E } = k, { date: T, hour: ne } =
|
|
1309
|
+
const { colIndex: D, minute: E } = k, { date: T, hour: ne } = J(D, E);
|
|
1310
1310
|
W.updateDragPreview(T, ne, E, d);
|
|
1311
1311
|
const { originalStartDate: oe, originalEndDate: Q } = W.dragState, ie = Q.getTime() - oe.getTime(), De = y.length;
|
|
1312
1312
|
let Ce;
|
|
@@ -1316,7 +1316,7 @@ function Te({
|
|
|
1316
1316
|
}
|
|
1317
1317
|
Ce = Math.min(Ce, De - D), A({ resourceId: d, colIndex: D, spanCols: Ce });
|
|
1318
1318
|
},
|
|
1319
|
-
[W, fe,
|
|
1319
|
+
[W, fe, J, q, y.length, N.length]
|
|
1320
1320
|
), j = B(
|
|
1321
1321
|
(i) => {
|
|
1322
1322
|
const d = i.relatedTarget;
|
|
@@ -1357,7 +1357,7 @@ function Te({
|
|
|
1357
1357
|
), $e = B(() => {
|
|
1358
1358
|
if (!M.current || !z) return;
|
|
1359
1359
|
M.current = !1;
|
|
1360
|
-
const i = Math.min(z.startCol, z.endCol), d = Math.max(z.startCol, z.endCol), x =
|
|
1360
|
+
const i = Math.min(z.startCol, z.endCol), d = Math.max(z.startCol, z.endCol), x = J(i), k = J(d), D = new Date(x.date), E = new Date(k.date);
|
|
1361
1361
|
k.hour !== void 0 && E.setHours(k.hour + 1, 0, 0, 0);
|
|
1362
1362
|
const T = {
|
|
1363
1363
|
startDate: D,
|
|
@@ -1365,7 +1365,7 @@ function Te({
|
|
|
1365
1365
|
resourceId: z.resourceId
|
|
1366
1366
|
};
|
|
1367
1367
|
i === d && h && h(x.date, x.hour, z.resourceId), c?.(T), X((ne) => ne ? { ...ne, isSelecting: !1 } : null), setTimeout(() => X(null), 150);
|
|
1368
|
-
}, [z,
|
|
1368
|
+
}, [z, J, q, h, c]);
|
|
1369
1369
|
return he(() => {
|
|
1370
1370
|
const i = () => {
|
|
1371
1371
|
M.current && $e();
|
|
@@ -1451,7 +1451,7 @@ function Te({
|
|
|
1451
1451
|
})
|
|
1452
1452
|
] })
|
|
1453
1453
|
) }),
|
|
1454
|
-
|
|
1454
|
+
U.map((i) => {
|
|
1455
1455
|
const d = me(i.maxStack);
|
|
1456
1456
|
return /* @__PURE__ */ r(
|
|
1457
1457
|
"div",
|
|
@@ -1522,7 +1522,7 @@ function Te({
|
|
|
1522
1522
|
onKeyDown: (Q) => {
|
|
1523
1523
|
if (oe && (Q.key === "Enter" || Q.key === " ")) {
|
|
1524
1524
|
Q.preventDefault();
|
|
1525
|
-
const ie =
|
|
1525
|
+
const ie = J(k);
|
|
1526
1526
|
h?.(ie.date, ie.hour, i.user.id), c?.({
|
|
1527
1527
|
startDate: ie.date,
|
|
1528
1528
|
endDate: (() => {
|
|
@@ -1597,7 +1597,7 @@ function Te({
|
|
|
1597
1597
|
i.user.id
|
|
1598
1598
|
);
|
|
1599
1599
|
}),
|
|
1600
|
-
|
|
1600
|
+
U.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
|
|
1601
1601
|
] }) }) });
|
|
1602
1602
|
}
|
|
1603
1603
|
const bn = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], yn = [
|
|
@@ -1852,8 +1852,8 @@ function zn({
|
|
|
1852
1852
|
if (!u) return;
|
|
1853
1853
|
const N = (y) => {
|
|
1854
1854
|
if (y.ctrlKey || y.metaKey || y.altKey) return;
|
|
1855
|
-
const
|
|
1856
|
-
if (!(
|
|
1855
|
+
const V = y.target.tagName;
|
|
1856
|
+
if (!(V === "INPUT" || V === "TEXTAREA" || y.target.isContentEditable))
|
|
1857
1857
|
switch (y.key) {
|
|
1858
1858
|
case "ArrowUp":
|
|
1859
1859
|
y.preventDefault(), W();
|
|
@@ -1876,30 +1876,30 @@ function zn({
|
|
|
1876
1876
|
if (!u) return;
|
|
1877
1877
|
let N = 0;
|
|
1878
1878
|
const y = () => {
|
|
1879
|
-
const
|
|
1880
|
-
if (!
|
|
1881
|
-
const se =
|
|
1879
|
+
const U = u.offsetParent;
|
|
1880
|
+
if (!U) return;
|
|
1881
|
+
const se = U.getBoundingClientRect(), Z = window.innerHeight;
|
|
1882
1882
|
if (se.height <= Z) {
|
|
1883
1883
|
u.style.removeProperty("top"), u.style.removeProperty("bottom");
|
|
1884
1884
|
return;
|
|
1885
1885
|
}
|
|
1886
|
-
const Ne = Math.min(se.bottom, Z) - se.top, te = u.offsetHeight, ce = Ne - te - 12, fe = 12,
|
|
1886
|
+
const Ne = Math.min(se.bottom, Z) - se.top, te = u.offsetHeight, ce = Ne - te - 12, fe = 12, J = U.clientHeight - te - 12, m = Math.max(fe, Math.min(ce, J));
|
|
1887
1887
|
u.style.top = `${m}px`, u.style.bottom = "auto";
|
|
1888
|
-
},
|
|
1888
|
+
}, V = () => {
|
|
1889
1889
|
cancelAnimationFrame(N), N = requestAnimationFrame(y);
|
|
1890
1890
|
}, O = [window];
|
|
1891
|
-
let
|
|
1892
|
-
for (;
|
|
1893
|
-
const
|
|
1894
|
-
/(auto|scroll)/.test(
|
|
1891
|
+
let G = u.parentElement;
|
|
1892
|
+
for (; G; ) {
|
|
1893
|
+
const U = getComputedStyle(G);
|
|
1894
|
+
/(auto|scroll)/.test(U.overflow + U.overflowY) && O.push(G), G = G.parentElement;
|
|
1895
1895
|
}
|
|
1896
|
-
for (const
|
|
1897
|
-
|
|
1898
|
-
return window.addEventListener("resize",
|
|
1896
|
+
for (const U of O)
|
|
1897
|
+
U.addEventListener("scroll", V, { passive: !0 });
|
|
1898
|
+
return window.addEventListener("resize", V, { passive: !0 }), y(), () => {
|
|
1899
1899
|
cancelAnimationFrame(N);
|
|
1900
|
-
for (const
|
|
1901
|
-
|
|
1902
|
-
window.removeEventListener("resize",
|
|
1900
|
+
for (const U of O)
|
|
1901
|
+
U.removeEventListener("scroll", V);
|
|
1902
|
+
window.removeEventListener("resize", V);
|
|
1903
1903
|
};
|
|
1904
1904
|
}, [v]);
|
|
1905
1905
|
const K = B(() => {
|
|
@@ -1911,10 +1911,10 @@ function zn({
|
|
|
1911
1911
|
if (!P.current) return;
|
|
1912
1912
|
const y = t.current;
|
|
1913
1913
|
if (y) {
|
|
1914
|
-
const { x:
|
|
1915
|
-
if (
|
|
1916
|
-
const se = Math.min(
|
|
1917
|
-
y.scrollLeft +=
|
|
1914
|
+
const { x: V, y: O } = $.current, G = Math.sqrt(V * V + O * O);
|
|
1915
|
+
if (G > rt) {
|
|
1916
|
+
const se = Math.min(G / Be, 1) * Ln;
|
|
1917
|
+
y.scrollLeft += V / G * se, y.scrollTop += O / G * se;
|
|
1918
1918
|
}
|
|
1919
1919
|
}
|
|
1920
1920
|
F.current = requestAnimationFrame(N);
|
|
@@ -1926,14 +1926,14 @@ function zn({
|
|
|
1926
1926
|
if (!P.current) return;
|
|
1927
1927
|
const N = u.clientX - S.current.x, y = u.clientY - S.current.y;
|
|
1928
1928
|
$.current = { x: N, y };
|
|
1929
|
-
const
|
|
1930
|
-
if (
|
|
1929
|
+
const V = Math.sqrt(N * N + y * y);
|
|
1930
|
+
if (V < rt)
|
|
1931
1931
|
p({ x: 0, y: 0 });
|
|
1932
1932
|
else {
|
|
1933
|
-
const
|
|
1933
|
+
const G = Math.min(V, Be) / Be * En;
|
|
1934
1934
|
p({
|
|
1935
|
-
x: N /
|
|
1936
|
-
y: y /
|
|
1935
|
+
x: N / V * G,
|
|
1936
|
+
y: y / V * G
|
|
1937
1937
|
});
|
|
1938
1938
|
}
|
|
1939
1939
|
}, []), g = B(
|
|
@@ -2101,7 +2101,7 @@ function jn({
|
|
|
2101
2101
|
workingHours: u,
|
|
2102
2102
|
badgeVariant: N,
|
|
2103
2103
|
showWorkingHoursOnly: y,
|
|
2104
|
-
clearFocusEventId:
|
|
2104
|
+
clearFocusEventId: V
|
|
2105
2105
|
} = Wt(), O = re(() => {
|
|
2106
2106
|
if (!y || !u)
|
|
2107
2107
|
return {
|
|
@@ -2117,7 +2117,7 @@ function jn({
|
|
|
2117
2117
|
startHour: C.start,
|
|
2118
2118
|
endHour: C.end
|
|
2119
2119
|
} : { startHour: m, endHour: j };
|
|
2120
|
-
}, [y, u, C]),
|
|
2120
|
+
}, [y, u, C]), G = O, U = ae(null);
|
|
2121
2121
|
Dt(
|
|
2122
2122
|
R,
|
|
2123
2123
|
() => ({
|
|
@@ -2125,7 +2125,7 @@ function jn({
|
|
|
2125
2125
|
const m = /* @__PURE__ */ new Date();
|
|
2126
2126
|
K(m, M), requestAnimationFrame(() => {
|
|
2127
2127
|
requestAnimationFrame(() => {
|
|
2128
|
-
const j =
|
|
2128
|
+
const j = U.current?.querySelector(
|
|
2129
2129
|
".ic-timeline-scroll-container, [class*='overflow-auto']"
|
|
2130
2130
|
);
|
|
2131
2131
|
if (!j) return;
|
|
@@ -2147,7 +2147,7 @@ function jn({
|
|
|
2147
2147
|
}
|
|
2148
2148
|
requestAnimationFrame(() => {
|
|
2149
2149
|
requestAnimationFrame(() => {
|
|
2150
|
-
const j =
|
|
2150
|
+
const j = U.current?.querySelector(
|
|
2151
2151
|
".ic-timeline-scroll-container, [class*='overflow-auto']"
|
|
2152
2152
|
);
|
|
2153
2153
|
if (!j) return;
|
|
@@ -2159,12 +2159,12 @@ function jn({
|
|
|
2159
2159
|
});
|
|
2160
2160
|
});
|
|
2161
2161
|
},
|
|
2162
|
-
getViewRect: () =>
|
|
2162
|
+
getViewRect: () => U.current?.getBoundingClientRect() ?? null,
|
|
2163
2163
|
focusEvent: (m) => {
|
|
2164
|
-
|
|
2165
|
-
|
|
2164
|
+
V(), requestAnimationFrame(() => {
|
|
2165
|
+
V();
|
|
2166
2166
|
});
|
|
2167
|
-
const j =
|
|
2167
|
+
const j = U.current?.querySelector(
|
|
2168
2168
|
`[data-event-id="${m}"]`
|
|
2169
2169
|
);
|
|
2170
2170
|
j && setTimeout(() => j.click(), 150);
|
|
@@ -2175,7 +2175,7 @@ function jn({
|
|
|
2175
2175
|
M,
|
|
2176
2176
|
O,
|
|
2177
2177
|
u,
|
|
2178
|
-
|
|
2178
|
+
V
|
|
2179
2179
|
]
|
|
2180
2180
|
);
|
|
2181
2181
|
const se = re(() => An(M), [M]), Z = B(
|
|
@@ -2219,7 +2219,7 @@ function jn({
|
|
|
2219
2219
|
{
|
|
2220
2220
|
events: m,
|
|
2221
2221
|
date: A,
|
|
2222
|
-
visibleHours:
|
|
2222
|
+
visibleHours: G,
|
|
2223
2223
|
workingHours: u,
|
|
2224
2224
|
slotDuration: q,
|
|
2225
2225
|
badgeVariant: N,
|
|
@@ -2235,7 +2235,7 @@ function jn({
|
|
|
2235
2235
|
{
|
|
2236
2236
|
events: m,
|
|
2237
2237
|
date: A,
|
|
2238
|
-
visibleHours:
|
|
2238
|
+
visibleHours: G,
|
|
2239
2239
|
workingHours: u,
|
|
2240
2240
|
slotDuration: q,
|
|
2241
2241
|
badgeVariant: N,
|
|
@@ -2410,9 +2410,9 @@ function jn({
|
|
|
2410
2410
|
}
|
|
2411
2411
|
);
|
|
2412
2412
|
}
|
|
2413
|
-
},
|
|
2413
|
+
}, J = ae(null);
|
|
2414
2414
|
return he(() => {
|
|
2415
|
-
|
|
2415
|
+
U.current = J.current;
|
|
2416
2416
|
}), /* @__PURE__ */ e(
|
|
2417
2417
|
_t,
|
|
2418
2418
|
{
|
|
@@ -2466,7 +2466,7 @@ function jn({
|
|
|
2466
2466
|
/* @__PURE__ */ e(
|
|
2467
2467
|
"div",
|
|
2468
2468
|
{
|
|
2469
|
-
ref:
|
|
2469
|
+
ref: J,
|
|
2470
2470
|
className: f(
|
|
2471
2471
|
"h-full border rounded-lg bg-white overflow-x-auto",
|
|
2472
2472
|
w?.viewContainer
|
|
@@ -2475,7 +2475,7 @@ function jn({
|
|
|
2475
2475
|
}
|
|
2476
2476
|
),
|
|
2477
2477
|
H && /* @__PURE__ */ e("div", { className: "inno-calendar-loading-overlay", children: /* @__PURE__ */ e("div", { className: "inno-calendar-spinner" }) }),
|
|
2478
|
-
/* @__PURE__ */ e(zn, { containerRef:
|
|
2478
|
+
/* @__PURE__ */ e(zn, { containerRef: J, currentDate: A })
|
|
2479
2479
|
] })
|
|
2480
2480
|
]
|
|
2481
2481
|
}
|
|
@@ -2518,9 +2518,10 @@ function Pn({
|
|
|
2518
2518
|
focusEventId: u,
|
|
2519
2519
|
headerConfig: N,
|
|
2520
2520
|
resourceColumnConfig: y,
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2521
|
+
viewPersistence: V,
|
|
2522
|
+
eventDetailMode: O,
|
|
2523
|
+
renderEventDetail: G
|
|
2524
|
+
}, U) {
|
|
2524
2525
|
return /* @__PURE__ */ e(jt, { ...F && { onEventDrop: F }, children: /* @__PURE__ */ e(
|
|
2525
2526
|
Pt,
|
|
2526
2527
|
{
|
|
@@ -2538,6 +2539,7 @@ function Pn({
|
|
|
2538
2539
|
...R && { onDateChange: R },
|
|
2539
2540
|
...I && { onViewChange: I },
|
|
2540
2541
|
...u && { initialFocusEventId: u },
|
|
2542
|
+
...V && { viewPersistence: V },
|
|
2541
2543
|
children: /* @__PURE__ */ e(
|
|
2542
2544
|
jn,
|
|
2543
2545
|
{
|
|
@@ -2558,11 +2560,11 @@ function Pn({
|
|
|
2558
2560
|
settingsContent: Y,
|
|
2559
2561
|
filterContent: g,
|
|
2560
2562
|
headerActions: C,
|
|
2561
|
-
calendarRef:
|
|
2563
|
+
calendarRef: U,
|
|
2562
2564
|
...N && { headerConfig: N },
|
|
2563
2565
|
...y && { resourceColumnConfig: y },
|
|
2564
|
-
...
|
|
2565
|
-
...
|
|
2566
|
+
...O && { eventDetailMode: O },
|
|
2567
|
+
...G && { renderEventDetail: G }
|
|
2566
2568
|
}
|
|
2567
2569
|
)
|
|
2568
2570
|
}
|
|
@@ -4121,4 +4123,4 @@ export {
|
|
|
4121
4123
|
$r as b,
|
|
4122
4124
|
Ar as c
|
|
4123
4125
|
};
|
|
4124
|
-
//# sourceMappingURL=agenda-widget-
|
|
4126
|
+
//# sourceMappingURL=agenda-widget-DrRyLzTK.js.map
|