@innosolutions/inno-calendar 1.0.69 → 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.
Files changed (61) hide show
  1. package/dist/agenda-widget-Bl-Gb588.cjs +2 -0
  2. package/dist/agenda-widget-Bl-Gb588.cjs.map +1 -0
  3. package/dist/{agenda-widget-QSVTdgaz.js → agenda-widget-DrRyLzTK.js} +124 -119
  4. package/dist/agenda-widget-DrRyLzTK.js.map +1 -0
  5. package/dist/components/index.cjs +1 -1
  6. package/dist/components/index.mjs +2 -2
  7. package/dist/components/inno-calendar.d.ts +23 -1
  8. package/dist/components/inno-calendar.d.ts.map +1 -1
  9. package/dist/components/views/timeline-view.d.ts.map +1 -1
  10. package/dist/core/context/inno-calendar-provider.d.ts +8 -2
  11. package/dist/core/context/inno-calendar-provider.d.ts.map +1 -1
  12. package/dist/core/index.cjs +1 -1
  13. package/dist/core/index.d.ts +1 -1
  14. package/dist/core/index.d.ts.map +1 -1
  15. package/dist/core/index.mjs +4 -4
  16. package/dist/core/types.d.ts +55 -8
  17. package/dist/core/types.d.ts.map +1 -1
  18. package/dist/core/utils/view-storage.d.ts +14 -10
  19. package/dist/core/utils/view-storage.d.ts.map +1 -1
  20. package/dist/index.cjs +1 -1
  21. package/dist/index.mjs +7 -7
  22. package/dist/position-utils-D_KpwRus.js +1053 -0
  23. package/dist/position-utils-D_KpwRus.js.map +1 -0
  24. package/dist/position-utils-ksZ_IjXC.cjs +2 -0
  25. package/dist/position-utils-ksZ_IjXC.cjs.map +1 -0
  26. package/dist/presets/index.cjs +1 -1
  27. package/dist/presets/index.mjs +1 -1
  28. package/dist/slot-selection-context-CLYZU6ul.cjs +2 -0
  29. package/dist/slot-selection-context-CLYZU6ul.cjs.map +1 -0
  30. package/dist/slot-selection-context-Ct5cVcKW.js +611 -0
  31. package/dist/slot-selection-context-Ct5cVcKW.js.map +1 -0
  32. package/dist/{tailwind-calendar-KJ1XJ4gr.cjs → tailwind-calendar-BbUb61uY.cjs} +2 -2
  33. package/dist/{tailwind-calendar-KJ1XJ4gr.cjs.map → tailwind-calendar-BbUb61uY.cjs.map} +1 -1
  34. package/dist/{tailwind-calendar-B6qsueM3.js → tailwind-calendar-DrwGVSF-.js} +3 -3
  35. package/dist/{tailwind-calendar-B6qsueM3.js.map → tailwind-calendar-DrwGVSF-.js.map} +1 -1
  36. package/dist/{use-calendar-BwqE_WNA.cjs → use-calendar-BK0nQYJq.cjs} +2 -2
  37. package/dist/{use-calendar-BwqE_WNA.cjs.map → use-calendar-BK0nQYJq.cjs.map} +1 -1
  38. package/dist/{use-calendar--JnbGA3L.js → use-calendar-DJI35SSd.js} +2 -2
  39. package/dist/{use-calendar--JnbGA3L.js.map → use-calendar-DJI35SSd.js.map} +1 -1
  40. package/dist/{use-slot-selection-C1tk-o0j.cjs → use-slot-selection-CCE11R4j.cjs} +2 -2
  41. package/dist/{use-slot-selection-C1tk-o0j.cjs.map → use-slot-selection-CCE11R4j.cjs.map} +1 -1
  42. package/dist/{use-slot-selection-BLCDzQzo.js → use-slot-selection-CX1w8EdM.js} +3 -3
  43. package/dist/{use-slot-selection-BLCDzQzo.js.map → use-slot-selection-CX1w8EdM.js.map} +1 -1
  44. package/dist/utils.cjs +1 -1
  45. package/dist/utils.mjs +1 -1
  46. package/dist/{week-view-Dv-Uz0eT.cjs → week-view-BXmaRChB.cjs} +2 -2
  47. package/dist/{week-view-Dv-Uz0eT.cjs.map → week-view-BXmaRChB.cjs.map} +1 -1
  48. package/dist/{week-view-B1KsZsC3.js → week-view-BeasFcyR.js} +3 -3
  49. package/dist/{week-view-B1KsZsC3.js.map → week-view-BeasFcyR.js.map} +1 -1
  50. package/package.json +1 -1
  51. package/dist/agenda-widget-BJroIHYG.cjs +0 -2
  52. package/dist/agenda-widget-BJroIHYG.cjs.map +0 -1
  53. package/dist/agenda-widget-QSVTdgaz.js.map +0 -1
  54. package/dist/position-utils-BzmOPdvQ.js +0 -1038
  55. package/dist/position-utils-BzmOPdvQ.js.map +0 -1
  56. package/dist/position-utils-EQTCC4tZ.cjs +0 -2
  57. package/dist/position-utils-EQTCC4tZ.cjs.map +0 -1
  58. package/dist/slot-selection-context-CjS_VIPj.js +0 -603
  59. package/dist/slot-selection-context-CjS_VIPj.js.map +0 -1
  60. package/dist/slot-selection-context-CmE-aWgt.cjs +0 -2
  61. package/dist/slot-selection-context-CmE-aWgt.cjs.map +0 -1
@@ -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--JnbGA3L.js";
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 Ht, c as It, N as zt } from "./week-view-B1KsZsC3.js";
6
- import { j as At, D as jt, I as Pt, e as Wt, S as _t } from "./slot-selection-context-CjS_VIPj.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-BzmOPdvQ.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-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",
@@ -32,7 +32,7 @@ function Rt({ view: t, className: n = "" }) {
32
32
  function qe({ view: t, className: n }) {
33
33
  return /* @__PURE__ */ e(Rt, { view: t, className: n });
34
34
  }
35
- function Hr(t) {
35
+ function Ir(t) {
36
36
  const {
37
37
  events: n,
38
38
  resources: a,
@@ -150,7 +150,7 @@ function Vt({ className: t }) {
150
150
  }
151
151
  );
152
152
  }
153
- function He({ className: t }) {
153
+ function Ie({ className: t }) {
154
154
  return /* @__PURE__ */ e(
155
155
  "svg",
156
156
  {
@@ -325,7 +325,7 @@ const Qt = {
325
325
  acceptAllEvents: "Accept all events",
326
326
  deleteConfirmTitle: "Delete Event",
327
327
  deleteConfirmDescription: "Are you sure you want to delete this event? This action cannot be undone."
328
- }, Ie = We(
328
+ }, He = We(
329
329
  ({ onClick: t, label: n, children: a, className: o, variant: s = "ghost", ...l }, p) => /* @__PURE__ */ r(xe, { children: [
330
330
  /* @__PURE__ */ e(ve, { asChild: !0, children: /* @__PURE__ */ e(
331
331
  "button",
@@ -347,7 +347,7 @@ const Qt = {
347
347
  /* @__PURE__ */ e(we, { side: "bottom", className: "text-xs", children: n })
348
348
  ] })
349
349
  );
350
- Ie.displayName = "IconButton";
350
+ He.displayName = "IconButton";
351
351
  function Zt({ src: t, alt: n, initials: a, className: o, isClient: s }) {
352
352
  const [l, p] = le(!1);
353
353
  return /* @__PURE__ */ e(
@@ -403,7 +403,7 @@ function Ge({
403
403
  className: f(b && "grayscale")
404
404
  }
405
405
  ),
406
- b || c ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(Pe, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : h ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-green-100 dark:bg-green-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(He, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
406
+ b || c ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-red-100 dark:bg-red-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(Pe, { className: "h-2 w-2 text-red-600 dark:text-red-400 stroke-[3]" }) }) }) : h ? /* @__PURE__ */ e("div", { className: "absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded-full bg-white dark:bg-zinc-900 flex items-center justify-center", children: /* @__PURE__ */ e("div", { className: "h-3 w-3 rounded-full bg-green-100 dark:bg-green-900/50 flex items-center justify-center", children: /* @__PURE__ */ e(Ie, { className: "h-2 w-2 text-green-600 dark:text-green-400 stroke-[3]" }) }) }) : null
407
407
  ] }),
408
408
  /* @__PURE__ */ r("div", { className: "!h-fit min-w-0 gap-0", children: [
409
409
  /* @__PURE__ */ e("div", { className: "gap-0", children: /* @__PURE__ */ e(
@@ -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, U = $ === !1, O = P && !S && Y, J = N ? C.filter((G) => G.isConfirmed).length : t.isAccepted ? u.length : 0, V = 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 = () => {
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);
@@ -578,10 +578,10 @@ function Je({
578
578
  return a ? /* @__PURE__ */ e("div", { className: "flex h-48 items-center justify-center", children: /* @__PURE__ */ e(Ee, { className: "h-6 w-6 text-zinc-400" }) }) : /* @__PURE__ */ r(pe, { delayDuration: 300, children: [
579
579
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-0.5 p-3", children: [
580
580
  /* @__PURE__ */ e("div", { className: "flex items-start justify-end gap-0.5", children: z ? z({ onClose: o }) : /* @__PURE__ */ r(ke, { children: [
581
- Y && H && s && /* @__PURE__ */ e(Ie, { onClick: Ne, label: n.edit, children: /* @__PURE__ */ e(Ut, { className: "h-[18px] w-[18px]" }) }),
582
- Y && w && p && /* @__PURE__ */ e(Ie, { onClick: te, label: n.cancel, children: /* @__PURE__ */ e(Vt, { className: "h-[18px] w-[18px]" }) }),
581
+ Y && H && s && /* @__PURE__ */ e(He, { onClick: Ne, label: n.edit, children: /* @__PURE__ */ e(Ut, { className: "h-[18px] w-[18px]" }) }),
582
+ Y && w && p && /* @__PURE__ */ e(He, { onClick: te, label: n.cancel, children: /* @__PURE__ */ e(Vt, { className: "h-[18px] w-[18px]" }) }),
583
583
  b && l && /* @__PURE__ */ e(
584
- Ie,
584
+ He,
585
585
  {
586
586
  onClick: ce,
587
587
  label: n.delete,
@@ -589,7 +589,7 @@ function Je({
589
589
  children: /* @__PURE__ */ e(pt, { className: "h-[18px] w-[18px]" })
590
590
  }
591
591
  ),
592
- /* @__PURE__ */ e(Ie, { onClick: o, label: n.close, children: /* @__PURE__ */ e(Pe, { className: "h-[18px] w-[18px]" }) })
592
+ /* @__PURE__ */ e(He, { onClick: o, label: n.close, children: /* @__PURE__ */ e(Pe, { className: "h-[18px] w-[18px]" }) })
593
593
  ] }) }),
594
594
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ r("div", { className: "flex items-start gap-2", children: [
595
595
  /* @__PURE__ */ e(
@@ -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
- V,
656
+ U,
657
657
  " ",
658
- V !== 1 ? n.guests : n.guest
658
+ U !== 1 ? n.guests : n.guest
659
659
  ] }),
660
- V > 0 && /* @__PURE__ */ r("span", { className: "text-xs text-zinc-500", children: [
660
+ U > 0 && /* @__PURE__ */ r("span", { className: "text-xs text-zinc-500", children: [
661
661
  "(",
662
- J,
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
- (G, m) => W ? W(G, m) : /* @__PURE__ */ e(
670
+ (J, m) => W ? W(J, m) : /* @__PURE__ */ e(
671
671
  Ge,
672
672
  {
673
- participant: G,
673
+ participant: J,
674
674
  isEventCanceled: t.isCanceled,
675
675
  labels: n
676
676
  },
677
- G.id
677
+ J.id
678
678
  )
679
- ) : u.slice(0, 6).map((G, m) => {
679
+ ) : u.slice(0, 6).map((J, m) => {
680
680
  const j = {
681
681
  id: String(m),
682
- name: G,
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
- G
695
+ J
696
696
  );
697
697
  }),
698
- V > 6 && /* @__PURE__ */ r("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
698
+ U > 6 && /* @__PURE__ */ r("div", { className: "text-xs text-zinc-500 py-1.5 pl-10", children: [
699
699
  "+",
700
- V - 6,
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((G) => G.isOrganizer)?.name || u[0] || "Calendar" })
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,12 +725,12 @@ 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: (G) => {
729
- G.stopPropagation(), y || h(t);
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: [
733
- y && /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5" }),
733
+ y && /* @__PURE__ */ e(Ie, { className: "h-3.5 w-3.5" }),
734
734
  n.going
735
735
  ] })
736
736
  }
@@ -758,13 +758,13 @@ function Je({
758
758
  ),
759
759
  onClick: () => h(t),
760
760
  children: [
761
- /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
761
+ /* @__PURE__ */ e(Ie, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
762
762
  n.acceptThisEvent
763
763
  ]
764
764
  }
765
765
  ),
766
766
  /* @__PURE__ */ r(Ye, { onClick: () => h(t), children: [
767
- /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
767
+ /* @__PURE__ */ e(Ie, { className: "h-3.5 w-3.5 mr-2 text-green-600" }),
768
768
  n.acceptAllEvents
769
769
  ] })
770
770
  ] })
@@ -782,7 +782,7 @@ function Je({
782
782
  },
783
783
  disabled: F,
784
784
  children: F ? /* @__PURE__ */ e(Ee, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ r(ke, { children: [
785
- y && /* @__PURE__ */ e(He, { className: "h-3.5 w-3.5" }),
785
+ y && /* @__PURE__ */ e(Ie, { className: "h-3.5 w-3.5" }),
786
786
  n.going
787
787
  ] })
788
788
  }
@@ -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
- U && "!bg-rose-700 !text-white hover:!bg-rose-700"
797
+ V && "!bg-rose-700 !text-white hover:!bg-rose-700"
798
798
  ),
799
799
  onClick: () => {
800
- U || c(t);
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
- U && /* @__PURE__ */ e(Pe, { className: "h-3.5 w-3.5" }),
804
+ V && /* @__PURE__ */ e(Pe, { className: "h-3.5 w-3.5" }),
805
805
  n.notGoing
806
806
  ] })
807
807
  }
@@ -841,7 +841,7 @@ function Je({
841
841
  )
842
842
  ] });
843
843
  }
844
- function Ir({
844
+ function Hr({
845
845
  event: t,
846
846
  children: n,
847
847
  open: a,
@@ -995,7 +995,7 @@ function fn({ src: t, alt: n, fallback: a, className: o }) {
995
995
  }
996
996
  );
997
997
  }
998
- const gn = 30, pn = 6, xn = 32;
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,
@@ -1063,7 +1063,7 @@ function Te({
1063
1063
  enableDrag: $ = !0,
1064
1064
  resourceColumnConfig: F
1065
1065
  }) {
1066
- const R = F?.variant ?? "text", I = F?.showAvatar ?? !0, L = ae(null), W = At(), [z, X] = le(null), M = ae(!1), [_, A] = le(null), K = s ?? /* @__PURE__ */ new Date(), q = !0, Y = v?.from ?? ln, g = v?.to ?? cn, C = g - Y, u = re(() => {
1066
+ const R = F?.variant ?? "marquee", I = F?.showAvatar ?? "auto", L = ae(null), W = At(), [z, X] = le(null), M = ae(!1), [_, A] = le(null), K = s ?? /* @__PURE__ */ new Date(), q = !0, Y = v?.from ?? ln, g = v?.to ?? cn, C = g - Y, u = re(() => {
1067
1067
  const i = new Date(K);
1068
1068
  if (t === 1 || t === 3)
1069
1069
  return i.setHours(0, 0, 0, 0), i;
@@ -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
- }), J = re(() => {
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]), V = re(() => {
1117
+ }, [a, n]), U = re(() => {
1118
1118
  const i = [], d = /* @__PURE__ */ new Map();
1119
- for (const D of J)
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 J) {
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
- J,
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 V)
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
- }, [V]), Z = re(() => {
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
- ), G = B(
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 } = G(D, E);
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, G, q, y.length, N.length]
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 = G(i), k = G(d), D = new Date(x.date), E = new Date(k.date);
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, G, q, h, c]);
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
- V.map((i) => {
1454
+ U.map((i) => {
1455
1455
  const d = me(i.maxStack);
1456
1456
  return /* @__PURE__ */ r(
1457
1457
  "div",
@@ -1475,15 +1475,18 @@ function Te({
1475
1475
  S?.resourceHeader
1476
1476
  ),
1477
1477
  children: [
1478
- I && /* @__PURE__ */ e(
1479
- fn,
1480
- {
1481
- className: "size-7",
1482
- src: i.user.avatar,
1483
- alt: i.user.name,
1484
- fallback: dn(i.user.name)
1485
- }
1486
- ),
1478
+ (() => {
1479
+ const x = !!i.user.avatar;
1480
+ return I === !0 || I === "auto" && x ? /* @__PURE__ */ e(
1481
+ fn,
1482
+ {
1483
+ className: "size-7",
1484
+ src: i.user.avatar,
1485
+ alt: i.user.name,
1486
+ fallback: dn(i.user.name)
1487
+ }
1488
+ ) : null;
1489
+ })(),
1487
1490
  R === "marquee" ? /* @__PURE__ */ e(
1488
1491
  vn,
1489
1492
  {
@@ -1519,7 +1522,7 @@ function Te({
1519
1522
  onKeyDown: (Q) => {
1520
1523
  if (oe && (Q.key === "Enter" || Q.key === " ")) {
1521
1524
  Q.preventDefault();
1522
- const ie = G(k);
1525
+ const ie = J(k);
1523
1526
  h?.(ie.date, ie.hour, i.user.id), c?.({
1524
1527
  startDate: ie.date,
1525
1528
  endDate: (() => {
@@ -1594,7 +1597,7 @@ function Te({
1594
1597
  i.user.id
1595
1598
  );
1596
1599
  }),
1597
- V.length === 0 && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-20 text-muted-foreground", children: "No users or events to display" })
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" })
1598
1601
  ] }) }) });
1599
1602
  }
1600
1603
  const bn = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], yn = [
@@ -1766,7 +1769,7 @@ function Tn() {
1766
1769
  }
1767
1770
  );
1768
1771
  }
1769
- function Hn() {
1772
+ function In() {
1770
1773
  return /* @__PURE__ */ e(
1771
1774
  "svg",
1772
1775
  {
@@ -1783,7 +1786,7 @@ function Hn() {
1783
1786
  }
1784
1787
  );
1785
1788
  }
1786
- function In() {
1789
+ function Hn() {
1787
1790
  return /* @__PURE__ */ e(
1788
1791
  "svg",
1789
1792
  {
@@ -1849,8 +1852,8 @@ function zn({
1849
1852
  if (!u) return;
1850
1853
  const N = (y) => {
1851
1854
  if (y.ctrlKey || y.metaKey || y.altKey) return;
1852
- const U = y.target.tagName;
1853
- if (!(U === "INPUT" || U === "TEXTAREA" || y.target.isContentEditable))
1855
+ const V = y.target.tagName;
1856
+ if (!(V === "INPUT" || V === "TEXTAREA" || y.target.isContentEditable))
1854
1857
  switch (y.key) {
1855
1858
  case "ArrowUp":
1856
1859
  y.preventDefault(), W();
@@ -1873,30 +1876,30 @@ function zn({
1873
1876
  if (!u) return;
1874
1877
  let N = 0;
1875
1878
  const y = () => {
1876
- const V = u.offsetParent;
1877
- if (!V) return;
1878
- const se = V.getBoundingClientRect(), Z = window.innerHeight;
1879
+ const U = u.offsetParent;
1880
+ if (!U) return;
1881
+ const se = U.getBoundingClientRect(), Z = window.innerHeight;
1879
1882
  if (se.height <= Z) {
1880
1883
  u.style.removeProperty("top"), u.style.removeProperty("bottom");
1881
1884
  return;
1882
1885
  }
1883
- const Ne = Math.min(se.bottom, Z) - se.top, te = u.offsetHeight, ce = Ne - te - 12, fe = 12, G = V.clientHeight - te - 12, m = Math.max(fe, Math.min(ce, G));
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));
1884
1887
  u.style.top = `${m}px`, u.style.bottom = "auto";
1885
- }, U = () => {
1888
+ }, V = () => {
1886
1889
  cancelAnimationFrame(N), N = requestAnimationFrame(y);
1887
1890
  }, O = [window];
1888
- let J = u.parentElement;
1889
- for (; J; ) {
1890
- const V = getComputedStyle(J);
1891
- /(auto|scroll)/.test(V.overflow + V.overflowY) && O.push(J), J = J.parentElement;
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;
1892
1895
  }
1893
- for (const V of O)
1894
- V.addEventListener("scroll", U, { passive: !0 });
1895
- return window.addEventListener("resize", U, { passive: !0 }), y(), () => {
1896
+ for (const U of O)
1897
+ U.addEventListener("scroll", V, { passive: !0 });
1898
+ return window.addEventListener("resize", V, { passive: !0 }), y(), () => {
1896
1899
  cancelAnimationFrame(N);
1897
- for (const V of O)
1898
- V.removeEventListener("scroll", U);
1899
- window.removeEventListener("resize", U);
1900
+ for (const U of O)
1901
+ U.removeEventListener("scroll", V);
1902
+ window.removeEventListener("resize", V);
1900
1903
  };
1901
1904
  }, [v]);
1902
1905
  const K = B(() => {
@@ -1908,10 +1911,10 @@ function zn({
1908
1911
  if (!P.current) return;
1909
1912
  const y = t.current;
1910
1913
  if (y) {
1911
- const { x: U, y: O } = $.current, J = Math.sqrt(U * U + O * O);
1912
- if (J > rt) {
1913
- const se = Math.min(J / Be, 1) * Ln;
1914
- y.scrollLeft += U / J * se, y.scrollTop += O / J * se;
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;
1915
1918
  }
1916
1919
  }
1917
1920
  F.current = requestAnimationFrame(N);
@@ -1923,14 +1926,14 @@ function zn({
1923
1926
  if (!P.current) return;
1924
1927
  const N = u.clientX - S.current.x, y = u.clientY - S.current.y;
1925
1928
  $.current = { x: N, y };
1926
- const U = Math.sqrt(N * N + y * y);
1927
- if (U < rt)
1929
+ const V = Math.sqrt(N * N + y * y);
1930
+ if (V < rt)
1928
1931
  p({ x: 0, y: 0 });
1929
1932
  else {
1930
- const J = Math.min(U, Be) / Be * En;
1933
+ const G = Math.min(V, Be) / Be * En;
1931
1934
  p({
1932
- x: N / U * J,
1933
- y: y / U * J
1935
+ x: N / V * G,
1936
+ y: y / V * G
1934
1937
  });
1935
1938
  }
1936
1939
  }, []), g = B(
@@ -1994,7 +1997,7 @@ function zn({
1994
1997
  onPointerUp: _,
1995
1998
  onPointerLeave: _,
1996
1999
  tabIndex: o.canLeft ? 0 : -1,
1997
- children: /* @__PURE__ */ e(Hn, {})
2000
+ children: /* @__PURE__ */ e(In, {})
1998
2001
  }
1999
2002
  ),
2000
2003
  /* @__PURE__ */ e(
@@ -2031,7 +2034,7 @@ function zn({
2031
2034
  onPointerUp: _,
2032
2035
  onPointerLeave: _,
2033
2036
  tabIndex: o.canRight ? 0 : -1,
2034
- children: /* @__PURE__ */ e(In, {})
2037
+ children: /* @__PURE__ */ e(Hn, {})
2035
2038
  }
2036
2039
  ),
2037
2040
  /* @__PURE__ */ e(
@@ -2098,7 +2101,7 @@ function jn({
2098
2101
  workingHours: u,
2099
2102
  badgeVariant: N,
2100
2103
  showWorkingHoursOnly: y,
2101
- clearFocusEventId: U
2104
+ clearFocusEventId: V
2102
2105
  } = Wt(), O = re(() => {
2103
2106
  if (!y || !u)
2104
2107
  return {
@@ -2114,7 +2117,7 @@ function jn({
2114
2117
  startHour: C.start,
2115
2118
  endHour: C.end
2116
2119
  } : { startHour: m, endHour: j };
2117
- }, [y, u, C]), J = O, V = ae(null);
2120
+ }, [y, u, C]), G = O, U = ae(null);
2118
2121
  Dt(
2119
2122
  R,
2120
2123
  () => ({
@@ -2122,7 +2125,7 @@ function jn({
2122
2125
  const m = /* @__PURE__ */ new Date();
2123
2126
  K(m, M), requestAnimationFrame(() => {
2124
2127
  requestAnimationFrame(() => {
2125
- const j = V.current?.querySelector(
2128
+ const j = U.current?.querySelector(
2126
2129
  ".ic-timeline-scroll-container, [class*='overflow-auto']"
2127
2130
  );
2128
2131
  if (!j) return;
@@ -2144,7 +2147,7 @@ function jn({
2144
2147
  }
2145
2148
  requestAnimationFrame(() => {
2146
2149
  requestAnimationFrame(() => {
2147
- const j = V.current?.querySelector(
2150
+ const j = U.current?.querySelector(
2148
2151
  ".ic-timeline-scroll-container, [class*='overflow-auto']"
2149
2152
  );
2150
2153
  if (!j) return;
@@ -2156,12 +2159,12 @@ function jn({
2156
2159
  });
2157
2160
  });
2158
2161
  },
2159
- getViewRect: () => V.current?.getBoundingClientRect() ?? null,
2162
+ getViewRect: () => U.current?.getBoundingClientRect() ?? null,
2160
2163
  focusEvent: (m) => {
2161
- U(), requestAnimationFrame(() => {
2162
- U();
2164
+ V(), requestAnimationFrame(() => {
2165
+ V();
2163
2166
  });
2164
- const j = V.current?.querySelector(
2167
+ const j = U.current?.querySelector(
2165
2168
  `[data-event-id="${m}"]`
2166
2169
  );
2167
2170
  j && setTimeout(() => j.click(), 150);
@@ -2172,7 +2175,7 @@ function jn({
2172
2175
  M,
2173
2176
  O,
2174
2177
  u,
2175
- U
2178
+ V
2176
2179
  ]
2177
2180
  );
2178
2181
  const se = re(() => An(M), [M]), Z = B(
@@ -2212,11 +2215,11 @@ function jn({
2212
2215
  switch (M) {
2213
2216
  case "day":
2214
2217
  return /* @__PURE__ */ e(
2215
- It,
2218
+ Ht,
2216
2219
  {
2217
2220
  events: m,
2218
2221
  date: A,
2219
- visibleHours: J,
2222
+ visibleHours: G,
2220
2223
  workingHours: u,
2221
2224
  slotDuration: q,
2222
2225
  badgeVariant: N,
@@ -2228,11 +2231,11 @@ function jn({
2228
2231
  );
2229
2232
  case "week":
2230
2233
  return /* @__PURE__ */ e(
2231
- Ht,
2234
+ It,
2232
2235
  {
2233
2236
  events: m,
2234
2237
  date: A,
2235
- visibleHours: J,
2238
+ visibleHours: G,
2236
2239
  workingHours: u,
2237
2240
  slotDuration: q,
2238
2241
  badgeVariant: N,
@@ -2407,9 +2410,9 @@ function jn({
2407
2410
  }
2408
2411
  );
2409
2412
  }
2410
- }, G = ae(null);
2413
+ }, J = ae(null);
2411
2414
  return he(() => {
2412
- V.current = G.current;
2415
+ U.current = J.current;
2413
2416
  }), /* @__PURE__ */ e(
2414
2417
  _t,
2415
2418
  {
@@ -2463,7 +2466,7 @@ function jn({
2463
2466
  /* @__PURE__ */ e(
2464
2467
  "div",
2465
2468
  {
2466
- ref: G,
2469
+ ref: J,
2467
2470
  className: f(
2468
2471
  "h-full border rounded-lg bg-white overflow-x-auto",
2469
2472
  w?.viewContainer
@@ -2472,7 +2475,7 @@ function jn({
2472
2475
  }
2473
2476
  ),
2474
2477
  H && /* @__PURE__ */ e("div", { className: "inno-calendar-loading-overlay", children: /* @__PURE__ */ e("div", { className: "inno-calendar-spinner" }) }),
2475
- /* @__PURE__ */ e(zn, { containerRef: G, currentDate: A })
2478
+ /* @__PURE__ */ e(zn, { containerRef: J, currentDate: A })
2476
2479
  ] })
2477
2480
  ]
2478
2481
  }
@@ -2515,9 +2518,10 @@ function Pn({
2515
2518
  focusEventId: u,
2516
2519
  headerConfig: N,
2517
2520
  resourceColumnConfig: y,
2518
- eventDetailMode: U,
2519
- renderEventDetail: O
2520
- }, J) {
2521
+ viewPersistence: V,
2522
+ eventDetailMode: O,
2523
+ renderEventDetail: G
2524
+ }, U) {
2521
2525
  return /* @__PURE__ */ e(jt, { ...F && { onEventDrop: F }, children: /* @__PURE__ */ e(
2522
2526
  Pt,
2523
2527
  {
@@ -2535,6 +2539,7 @@ function Pn({
2535
2539
  ...R && { onDateChange: R },
2536
2540
  ...I && { onViewChange: I },
2537
2541
  ...u && { initialFocusEventId: u },
2542
+ ...V && { viewPersistence: V },
2538
2543
  children: /* @__PURE__ */ e(
2539
2544
  jn,
2540
2545
  {
@@ -2555,11 +2560,11 @@ function Pn({
2555
2560
  settingsContent: Y,
2556
2561
  filterContent: g,
2557
2562
  headerActions: C,
2558
- calendarRef: J,
2563
+ calendarRef: U,
2559
2564
  ...N && { headerConfig: N },
2560
2565
  ...y && { resourceColumnConfig: y },
2561
- ...U && { eventDetailMode: U },
2562
- ...O && { renderEventDetail: O }
2566
+ ...O && { eventDetailMode: O },
2567
+ ...G && { renderEventDetail: G }
2563
2568
  }
2564
2569
  )
2565
2570
  }
@@ -4104,9 +4109,9 @@ function Rr({
4104
4109
  export {
4105
4110
  Br as A,
4106
4111
  jr as B,
4107
- Hr as C,
4112
+ Ir as C,
4108
4113
  _r as D,
4109
- Ir as E,
4114
+ Hr as E,
4110
4115
  zr as I,
4111
4116
  Fr as S,
4112
4117
  Te as T,
@@ -4118,4 +4123,4 @@ export {
4118
4123
  $r as b,
4119
4124
  Ar as c
4120
4125
  };
4121
- //# sourceMappingURL=agenda-widget-QSVTdgaz.js.map
4126
+ //# sourceMappingURL=agenda-widget-DrRyLzTK.js.map