@burdenoff/microfe-calendar 2026.1124.3 → 2026.1124.4

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 (88) hide show
  1. package/dist/generated/wspace-operations.d.ts +342 -69
  2. package/dist/generated/wspace-operations.js +73 -31
  3. package/dist/generated/wspace-operations.js.map +1 -1
  4. package/dist/generated/wspace-types.d.ts +405 -6
  5. package/dist/translations/en.d.ts +22 -4
  6. package/dist/v2/CalendarPageV2.js +45 -41
  7. package/dist/v2/CalendarPageV2.js.map +1 -1
  8. package/dist/v2/CalendarRoutesV2.js +64 -64
  9. package/dist/v2/CalendarRoutesV2.js.map +1 -1
  10. package/dist/v2/data/errors.d.ts +5 -0
  11. package/dist/v2/data/errors.js +6 -2
  12. package/dist/v2/data/errors.js.map +1 -1
  13. package/dist/v2/data/normalize.d.ts +31 -3
  14. package/dist/v2/data/normalize.js +57 -13
  15. package/dist/v2/data/normalize.js.map +1 -1
  16. package/dist/v2/data/seriesDateLookup.d.ts +9 -0
  17. package/dist/v2/data/seriesDateLookup.js +12 -0
  18. package/dist/v2/data/seriesDateLookup.js.map +1 -0
  19. package/dist/v2/data/useEventActions.d.ts +9 -3
  20. package/dist/v2/data/useEventActions.js +239 -186
  21. package/dist/v2/data/useEventActions.js.map +1 -1
  22. package/dist/v2/data/useEventForPeek.js +63 -21
  23. package/dist/v2/data/useEventForPeek.js.map +1 -1
  24. package/dist/v2/data/useEventsInRangeV2.d.ts +40 -2
  25. package/dist/v2/data/useEventsInRangeV2.js +76 -47
  26. package/dist/v2/data/useEventsInRangeV2.js.map +1 -1
  27. package/dist/v2/day/DayPanel.js +1 -1
  28. package/dist/v2/day/DayPanel.js.map +1 -1
  29. package/dist/v2/event/EventDialog.d.ts +13 -3
  30. package/dist/v2/event/EventDialog.js +189 -166
  31. package/dist/v2/event/EventDialog.js.map +1 -1
  32. package/dist/v2/event/EventDialogs.js +57 -50
  33. package/dist/v2/event/EventDialogs.js.map +1 -1
  34. package/dist/v2/event/EventMoreTab.js +8 -7
  35. package/dist/v2/event/EventMoreTab.js.map +1 -1
  36. package/dist/v2/event/EventPlaceTab.js +2 -2
  37. package/dist/v2/event/EventPlaceTab.js.map +1 -1
  38. package/dist/v2/event/FindTimeDialog.js +1 -1
  39. package/dist/v2/event/FindTimeDialog.js.map +1 -1
  40. package/dist/v2/event/RepeatField.js +10 -7
  41. package/dist/v2/event/RepeatField.js.map +1 -1
  42. package/dist/v2/event/dialogLogic.d.ts +10 -0
  43. package/dist/v2/event/dialogLogic.js +25 -22
  44. package/dist/v2/event/dialogLogic.js.map +1 -1
  45. package/dist/v2/event/dialogModel.d.ts +3 -0
  46. package/dist/v2/event/dialogModel.js.map +1 -1
  47. package/dist/v2/event/eventForm.d.ts +26 -0
  48. package/dist/v2/event/eventForm.js +145 -92
  49. package/dist/v2/event/eventForm.js.map +1 -1
  50. package/dist/v2/event/findTimeSource.js +44 -44
  51. package/dist/v2/event/findTimeSource.js.map +1 -1
  52. package/dist/v2/event/rrule.js.map +1 -1
  53. package/dist/v2/event/savePlan.d.ts +125 -15
  54. package/dist/v2/event/savePlan.js +162 -68
  55. package/dist/v2/event/savePlan.js.map +1 -1
  56. package/dist/v2/event/useEventData.d.ts +7 -2
  57. package/dist/v2/event/useEventData.js +107 -80
  58. package/dist/v2/event/useEventData.js.map +1 -1
  59. package/dist/v2/event/useEventDialogModel.d.ts +16 -3
  60. package/dist/v2/event/useEventDialogModel.js +82 -67
  61. package/dist/v2/event/useEventDialogModel.js.map +1 -1
  62. package/dist/v2/event/useEventSave.d.ts +20 -4
  63. package/dist/v2/event/useEventSave.js +181 -90
  64. package/dist/v2/event/useEventSave.js.map +1 -1
  65. package/dist/v2/events/eventLook.js +16 -16
  66. package/dist/v2/events/eventLook.js.map +1 -1
  67. package/dist/v2/events/eventModel.d.ts +17 -4
  68. package/dist/v2/events/eventModel.js +46 -34
  69. package/dist/v2/events/eventModel.js.map +1 -1
  70. package/dist/v2/events/localChanges.d.ts +4 -1
  71. package/dist/v2/events/localChanges.js +4 -2
  72. package/dist/v2/events/localChanges.js.map +1 -1
  73. package/dist/v2/page/CalendarPageContext.d.ts +2 -2
  74. package/dist/v2/page/CalendarPageContext.js.map +1 -1
  75. package/dist/v2/page/useCalendarPageModel.js +141 -139
  76. package/dist/v2/page/useCalendarPageModel.js.map +1 -1
  77. package/dist/v2/page/viewState.d.ts +9 -1
  78. package/dist/v2/page/viewState.js +5 -3
  79. package/dist/v2/page/viewState.js.map +1 -1
  80. package/dist/v2/peek/PeekEvent.js +210 -204
  81. package/dist/v2/peek/PeekEvent.js.map +1 -1
  82. package/dist/v2/rail/useMonthEventDates.js +1 -1
  83. package/dist/v2/rail/useMonthEventDates.js.map +1 -1
  84. package/dist/v2/states/CalendarStates.d.ts +15 -0
  85. package/dist/v2/states/CalendarStates.js +42 -11
  86. package/dist/v2/states/CalendarStates.js.map +1 -1
  87. package/dist/v2/types.d.ts +30 -2
  88. package/package.json +1 -1
@@ -1,324 +1,330 @@
1
1
  import { useCalendar as e } from "../../providers/CalendarProvider.js";
2
2
  import { calendarHueStyle as t } from "../colors.js";
3
- import { eventRoom as n, isOrganizer as r, joinUrl as i } from "../events/eventModel.js";
4
- import { formatDay as a, formatDayTimeSpan as o, formatDuration as s, formatInstantRange as c } from "../format.js";
5
- import { useCalendarPage as l } from "../page/CalendarPageContext.js";
6
- import { SEARCH_PARAMS as u, calendarV2Href as d } from "../routes.js";
7
- import { FOCUS_RING as f, ICON_BUTTON as p } from "../styles.js";
8
- import { eventDays as m, instantToZoned as h } from "../time/calendarTime.js";
9
- import { CloseButton as g, GuestRow as _, Row as v } from "./PeekParts.js";
10
- import { useMemo as y } from "react";
11
- import { AlertTriangle as b, Bell as x, Building2 as S, CalendarDays as C, CircleHelp as w, Clock3 as T, Copy as E, Crown as D, Download as O, EyeOff as ee, FileText as k, Link2 as A, Lock as j, MapPin as M, Pencil as N, Repeat as P, Trash2 as F, Users as I, Video as L } from "lucide-react";
12
- import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
13
- import { ActionMenu as V, BottomSheetDescription as H, BottomSheetTitle as U, Button as W, Notice as G, Segmented as K, useNotify as q } from "@burdenoff/fe-libs/ui";
14
- import { cn as J } from "@burdenoff/fe-libs/utils";
15
- import { useActorProfiles as Y } from "@burdenoff/fe-libs/shared";
3
+ import { editDraftFor as n, eventRoom as r, inSeries as i, isOrganizer as a, joinUrl as o } from "../events/eventModel.js";
4
+ import { formatDay as s, formatDayTimeSpan as c, formatDuration as l, formatInstantRange as u } from "../format.js";
5
+ import { useCalendarPage as d } from "../page/CalendarPageContext.js";
6
+ import { SEARCH_PARAMS as f, calendarV2Href as p } from "../routes.js";
7
+ import { FOCUS_RING as m, ICON_BUTTON as h } from "../styles.js";
8
+ import { eventDays as g, instantToZoned as _ } from "../time/calendarTime.js";
9
+ import { lockReason as v } from "../event/dialogLogic.js";
10
+ import { formFromEvent as y } from "../event/eventForm.js";
11
+ import { repeatLabel as b } from "../event/repeatWords.js";
12
+ import { CloseButton as x, GuestRow as S, Row as C } from "./PeekParts.js";
13
+ import { useMemo as w } from "react";
14
+ import { AlertTriangle as T, Bell as E, Building2 as D, CalendarDays as O, CircleHelp as k, Clock3 as A, Copy as j, Crown as M, Download as ee, EyeOff as te, FileText as ne, Link2 as re, Lock as N, MapPin as P, Pencil as F, Repeat as I, Trash2 as L, Users as R, Video as z } from "lucide-react";
15
+ import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
16
+ import { ActionMenu as U, BottomSheetDescription as W, BottomSheetTitle as G, Button as K, Notice as q, Segmented as J, useNotify as ie } from "@burdenoff/fe-libs/ui";
17
+ import { cn as Y } from "@burdenoff/fe-libs/utils";
18
+ import { useActorProfiles as ae } from "@burdenoff/fe-libs/shared";
16
19
  // src/v2/peek/PeekEvent.tsx
17
20
  var X = 6;
18
- function Z(t) {
19
- let n = l(), { tr: i, format: s, timeZone: u, me: d } = n, { apiGatewayUrl: f, authToken: p, workspaceId: g } = e(), _ = n.calendarsById.get(t.calendarId), v = y(() => [.../* @__PURE__ */ new Set([t.organizerId, ...t.guests.map((e) => e.userId)])].filter((e) => !!e).map((e) => ({
21
+ function oe(t) {
22
+ let n = d(), { tr: r, format: i, timeZone: o, me: l } = n, { apiGatewayUrl: f, authToken: p, workspaceId: m } = e(), h = n.calendarsById.get(t.calendarId), v = w(() => [.../* @__PURE__ */ new Set([t.organizerId, ...t.guests.map((e) => e.userId)])].filter((e) => !!e).map((e) => ({
20
23
  actorId: e,
21
24
  actorType: "user"
22
- })), [t.guests, t.organizerId]), b = Y(v, {
25
+ })), [t.guests, t.organizerId]), x = ae(v, {
23
26
  apiGatewayUrl: f,
24
27
  authToken: p,
25
- workspaceId: g
26
- }), x = (e, t) => {
28
+ workspaceId: m
29
+ }), S = (e, t) => {
27
30
  if (t) return t;
28
- let n = e ? b[e] : void 0;
31
+ let n = e ? x[e] : void 0;
29
32
  return n?.resolved ? n.displayName : null;
30
- }, S = t.guests.find((e) => e.organizer) ?? null, C = m(t, u), w;
31
- return w = !t.allDay && C.start !== C.end ? o(t.start, t.end, u, s) : t.allDay ? C.start === C.end ? i("calendar.v2.whenAllDay", "{{day}} · all day", { day: a(C.start, s, "mid") }) : i("calendar.v2.whenAllDays", "{{from}} – {{to}} · all day", {
32
- from: a(C.start, s, "short"),
33
- to: a(C.end, s, "short")
34
- }) : `${a(h(t.start, u).date, s, "mid")} · ${c(t.start, t.end, u, s)}`, {
33
+ }, C = t.guests.find((e) => e.organizer) ?? null, T = g(t, o), E;
34
+ if (Z(t)) {
35
+ let e = b(y(t, o), r, i);
36
+ E = t.allDay ? `${e} · ${r("calendar.v2.allDayLower", "all day")}` : `${e} · ${u(t.start, t.end, o, i)}`;
37
+ } else E = !t.allDay && T.start !== T.end ? c(t.start, t.end, o, i) : t.allDay ? T.start === T.end ? r("calendar.v2.whenAllDay", "{{day}} · all day", { day: s(T.start, i, "mid") }) : r("calendar.v2.whenAllDays", "{{from}} – {{to}} · all day", {
38
+ from: s(T.start, i, "short"),
39
+ to: s(T.end, i, "short")
40
+ }) : `${s(_(t.start, o).date, i, "mid")} · ${u(t.start, t.end, o, i)}`;
41
+ return {
35
42
  event: t,
36
43
  look: n.lookOf(t),
37
- calendar: _,
38
- calendarName: _?.name ?? i("calendar.v2.aCalendar", "a calendar"),
44
+ calendar: h,
45
+ calendarName: h?.name ?? r("calendar.v2.aCalendar", "a calendar"),
39
46
  answer: n.answerOf(t),
40
- iOrganise: r(t, d),
41
- organizerName: x(t.organizerId, S?.name ?? null) ?? i("calendar.v2.theOrganiser", "the organiser"),
42
- nameOf: x,
43
- when: w
47
+ iOrganise: a(t, l),
48
+ organizerName: S(t.organizerId, C?.name ?? null),
49
+ nameOf: S,
50
+ when: E
44
51
  };
45
52
  }
53
+ function Z(e) {
54
+ return e.isRecurring && e.instanceDate === null;
55
+ }
46
56
  function Q({ children: e, className: t }) {
47
- let { compact: n } = l();
48
- return z(n ? U : "h3", {
57
+ let { compact: n } = d();
58
+ return V(n ? G : "h3", {
49
59
  className: t,
50
60
  children: e
51
61
  });
52
62
  }
53
- function te({ model: t }) {
54
- let n = l(), { tr: r } = n, { basePath: i } = e(), a = q(), { event: o, look: s, calendar: c } = t, f = c?.isReadOnly ? r("calendar.v2.lockedFollowed", "It comes from {{calendar}}, a calendar you follow. Change it where it lives.", { calendar: t.calendarName }) : r("calendar.v2.lockedOrganiser", "Only {{name}}, the organiser, can change this event.", { name: t.organizerName }), h = [{
63
+ function se({ model: t }) {
64
+ let r = d(), { tr: a } = r, { basePath: o } = e(), s = ie(), { event: c, look: l, calendar: u } = t, m = v(c, u, t.organizerName, a), _ = [{
55
65
  id: "ics",
56
- label: r("calendar.v2.downloadEvent", "Download (.ics)"),
57
- icon: O,
58
- onSelect: () => void n.actions.downloadIcs(o)
66
+ label: a("calendar.v2.downloadEvent", "Download (.ics)"),
67
+ icon: ee,
68
+ onSelect: () => void r.actions.downloadIcs(c)
59
69
  }, {
60
70
  id: "link",
61
- label: r("calendar.v2.copyEventLink", "Copy a link to it"),
62
- icon: A,
63
- onSelect: () => void n.actions.copyText(`${window.location.origin}${d(i, "week", {
64
- [u.event]: o.id,
65
- [u.date]: m(o, n.timeZone).start
66
- })}`, r("calendar.v2.linkCopied", "Link copied."))
71
+ label: a("calendar.v2.copyEventLink", "Copy a link to it"),
72
+ icon: re,
73
+ onSelect: () => void r.actions.copyText(`${window.location.origin}${p(o, "week", {
74
+ [f.event]: c.id,
75
+ [f.date]: g(c, r.timeZone).start
76
+ })}`, a("calendar.v2.linkCopied", "Link copied."))
67
77
  }];
68
- return o.isRecurring && s.editable && h.push({
78
+ return i(c) && l.editable && _.push({
69
79
  id: "series",
70
- label: r("calendar.v2.deleteSeriesMenu", "Delete the whole series…"),
71
- icon: F,
80
+ label: a("calendar.v2.deleteSeriesMenu", "Delete the whole series…"),
81
+ icon: L,
72
82
  danger: !0,
73
83
  separatorBefore: !0,
74
84
  onSelect: () => {
75
- n.closePeek(), n.actions.remove(o);
85
+ r.closePeek(), r.actions.removeSeries(c);
76
86
  }
77
- }), /* @__PURE__ */ B("div", {
87
+ }), /* @__PURE__ */ H("div", {
78
88
  className: "flex shrink-0 items-center",
79
89
  children: [
80
- s.editable ? /* @__PURE__ */ z("button", {
90
+ l.editable ? /* @__PURE__ */ V("button", {
81
91
  type: "button",
82
- className: p,
83
- "aria-label": r("calendar.v2.edit", "Edit"),
84
- title: r("calendar.v2.edit", "Edit"),
85
- onClick: () => n.openEventDialog({ eventId: o.id }),
86
- children: /* @__PURE__ */ z(N, { "aria-hidden": "true" })
87
- }) : /* @__PURE__ */ z("button", {
92
+ className: h,
93
+ "aria-label": a("calendar.v2.edit", "Edit"),
94
+ title: a("calendar.v2.edit", "Edit"),
95
+ onClick: () => r.openEventDialog(n(c)),
96
+ children: /* @__PURE__ */ V(F, { "aria-hidden": "true" })
97
+ }) : /* @__PURE__ */ V("button", {
88
98
  type: "button",
89
- className: p,
90
- "aria-label": r("calendar.v2.editLocked", "Edit (locked): {{reason}}", { reason: f }),
91
- title: f,
92
- onClick: () => a({
93
- title: f,
99
+ className: h,
100
+ "aria-label": a("calendar.v2.editLocked", "Edit (locked): {{reason}}", { reason: m }),
101
+ title: m,
102
+ onClick: () => s({
103
+ title: m,
94
104
  tone: "info"
95
105
  }),
96
- children: /* @__PURE__ */ z(j, { "aria-hidden": "true" })
106
+ children: /* @__PURE__ */ V(N, { "aria-hidden": "true" })
97
107
  }),
98
- c && !c.isReadOnly ? /* @__PURE__ */ z("button", {
108
+ u && !u.isReadOnly ? /* @__PURE__ */ V("button", {
99
109
  type: "button",
100
- className: p,
101
- "aria-label": r("calendar.v2.duplicate", "Duplicate"),
102
- title: r("calendar.v2.duplicate", "Duplicate"),
110
+ className: h,
111
+ "aria-label": a("calendar.v2.duplicate", "Duplicate"),
112
+ title: a("calendar.v2.duplicate", "Duplicate"),
103
113
  onClick: () => {
104
- n.closePeek(), n.actions.duplicate(o);
114
+ r.closePeek(), r.actions.duplicate(c);
105
115
  },
106
- children: /* @__PURE__ */ z(E, { "aria-hidden": "true" })
116
+ children: /* @__PURE__ */ V(j, { "aria-hidden": "true" })
107
117
  }) : null,
108
- s.editable ? /* @__PURE__ */ z("button", {
118
+ l.editable ? /* @__PURE__ */ V("button", {
109
119
  type: "button",
110
- className: p,
111
- "aria-label": r("calendar.v2.delete", "Delete"),
112
- title: r("calendar.v2.delete", "Delete"),
120
+ className: h,
121
+ "aria-label": a("calendar.v2.delete", "Delete"),
122
+ title: a("calendar.v2.delete", "Delete"),
113
123
  onClick: () => {
114
- n.closePeek(), n.actions.remove(o);
124
+ r.closePeek(), r.actions.remove(c);
115
125
  },
116
- children: /* @__PURE__ */ z(F, { "aria-hidden": "true" })
126
+ children: /* @__PURE__ */ V(L, { "aria-hidden": "true" })
117
127
  }) : null,
118
- /* @__PURE__ */ z(V, {
119
- items: h,
128
+ /* @__PURE__ */ V(U, {
129
+ items: _,
120
130
  placement: "row",
121
- label: r("calendar.v2.moreForEvent", "More for this event")
131
+ label: a("calendar.v2.moreForEvent", "More for this event")
122
132
  }),
123
- /* @__PURE__ */ z(g, {})
133
+ /* @__PURE__ */ V(x, {})
124
134
  ]
125
135
  });
126
136
  }
127
- function ne({ model: e }) {
128
- let { tr: t, format: n, timeZone: r } = l(), { event: i } = e, a = i.timeZone && i.timeZone !== r && !i.allDay ? i.timeZone : null;
129
- return /* @__PURE__ */ B("p", {
137
+ function ce({ model: e }) {
138
+ let { tr: t, format: n, timeZone: r } = d(), { event: a } = e, o = a.timeZone && a.timeZone !== r && !a.allDay ? a.timeZone : null;
139
+ return /* @__PURE__ */ H("p", {
130
140
  className: "mb-3 ps-[26px] text-sm text-text-secondary",
131
141
  children: [
132
142
  e.when,
133
- i.isRecurring ? /* @__PURE__ */ B("span", {
143
+ i(a) && !Z(a) ? /* @__PURE__ */ H("span", {
134
144
  className: "ms-1 inline-flex items-center gap-1",
135
145
  children: [
136
146
  "· ",
137
- /* @__PURE__ */ z(P, {
147
+ /* @__PURE__ */ V(I, {
138
148
  className: "size-3",
139
149
  "aria-hidden": "true"
140
150
  }),
141
151
  t("calendar.v2.repeats", "Repeats")
142
152
  ]
143
153
  }) : null,
144
- a ? /* @__PURE__ */ z("span", {
154
+ o ? /* @__PURE__ */ V("span", {
145
155
  className: "mt-0.5 block text-xs text-text-muted",
146
156
  children: t("calendar.v2.inItsZone", "{{time}} in {{zone}}", {
147
- time: c(i.start, i.end, a, n),
148
- zone: a
157
+ time: u(a.start, a.end, o, n),
158
+ zone: o
149
159
  })
150
160
  }) : null
151
161
  ]
152
162
  });
153
163
  }
154
- function re({ model: e }) {
155
- let { tr: t } = l(), r = n(e.event), i = r?.name ?? t("calendar.v2.theRoom", "The room");
156
- return /* @__PURE__ */ B(R, { children: [
157
- e.look.roomRefused && r ? /* @__PURE__ */ B(G, {
164
+ function le({ model: e }) {
165
+ let { tr: t } = d(), n = r(e.event), i = n?.name ?? t("calendar.v2.theRoom", "The room");
166
+ return /* @__PURE__ */ H(B, { children: [
167
+ e.look.roomRefused && n ? /* @__PURE__ */ H(q, {
158
168
  tone: "warn",
159
- icon: b,
169
+ icon: T,
160
170
  children: [
161
- /* @__PURE__ */ z("b", { children: t("calendar.v2.roomRefusedTitle", "Room not available.") }),
171
+ /* @__PURE__ */ V("b", { children: t("calendar.v2.roomRefusedTitle", "Room not available.") }),
162
172
  " ",
163
173
  t("calendar.v2.roomRefusedBody", "{{room}} turned down the booking. Pick another room in the event.", { room: i })
164
174
  ]
165
175
  }) : null,
166
- e.look.roomPending && r ? /* @__PURE__ */ z(G, {
176
+ e.look.roomPending && n ? /* @__PURE__ */ V(q, {
167
177
  tone: "info",
168
- icon: T,
178
+ icon: A,
169
179
  children: t("calendar.v2.roomPendingBody", "{{room}} is waiting for approval.", { room: i })
170
180
  }) : null,
171
- e.calendar?.isReadOnly ? /* @__PURE__ */ z(G, {
181
+ e.calendar?.isReadOnly ? /* @__PURE__ */ V(q, {
172
182
  tone: "lock",
173
- icon: j,
183
+ icon: N,
174
184
  children: t("calendar.v2.readOnlyNote", "From {{calendar}}, a calendar you follow. You can’t change it here.", { calendar: e.calendarName })
175
185
  }) : null
176
186
  ] });
177
187
  }
178
- function ie({ event: e }) {
179
- let t = l(), { tr: n } = t, r = i(e);
180
- return r ? /* @__PURE__ */ B("div", {
188
+ function ue({ event: e }) {
189
+ let t = d(), { tr: n } = t, r = o(e);
190
+ return r ? /* @__PURE__ */ H("div", {
181
191
  className: "flex items-center gap-2",
182
192
  children: [
183
- /* @__PURE__ */ z(W, {
193
+ /* @__PURE__ */ V(K, {
184
194
  asChild: !0,
185
- children: /* @__PURE__ */ B("a", {
195
+ children: /* @__PURE__ */ H("a", {
186
196
  href: r,
187
197
  target: "_blank",
188
198
  rel: "noopener noreferrer",
189
- children: [/* @__PURE__ */ z(L, { "aria-hidden": "true" }), n("calendar.v2.joinCall", "Join the call")]
199
+ children: [/* @__PURE__ */ V(z, { "aria-hidden": "true" }), n("calendar.v2.joinCall", "Join the call")]
190
200
  })
191
201
  }),
192
- /* @__PURE__ */ z("span", {
202
+ /* @__PURE__ */ V("span", {
193
203
  className: "min-w-0 flex-1 truncate font-mono text-xs text-text-secondary",
194
204
  children: r.replace(/^https?:\/\//, "")
195
205
  }),
196
- /* @__PURE__ */ z("button", {
206
+ /* @__PURE__ */ V("button", {
197
207
  type: "button",
198
- className: p,
208
+ className: h,
199
209
  "aria-label": n("calendar.v2.copyMeetingLink", "Copy the meeting link"),
200
210
  onClick: () => void t.actions.copyText(r, n("calendar.v2.meetingLinkCopied", "Meeting link copied.")),
201
- children: /* @__PURE__ */ z(E, { "aria-hidden": "true" })
211
+ children: /* @__PURE__ */ V(j, { "aria-hidden": "true" })
202
212
  })
203
213
  ]
204
214
  }) : null;
205
215
  }
206
- function ae({ event: e }) {
207
- let { tr: t } = l(), r = n(e);
208
- return r ? /* @__PURE__ */ B(v, {
209
- icon: /* @__PURE__ */ z(S, { "aria-hidden": "true" }),
216
+ function de({ event: e }) {
217
+ let { tr: t } = d(), n = r(e);
218
+ return n ? /* @__PURE__ */ H(C, {
219
+ icon: /* @__PURE__ */ V(D, { "aria-hidden": "true" }),
210
220
  children: [
211
- /* @__PURE__ */ z("b", {
221
+ /* @__PURE__ */ V("b", {
212
222
  className: "font-semibold",
213
- children: r.name ?? t("calendar.v2.theRoom", "The room")
223
+ children: n.name ?? t("calendar.v2.theRoom", "The room")
214
224
  }),
215
- r.location ? ` · ${r.location}` : "",
216
- r.capacity ? ` · ${t("calendar.v2.seats", "{{count}} seats", { count: r.capacity })}` : ""
225
+ n.location ? ` · ${n.location}` : "",
226
+ n.capacity ? ` · ${t("calendar.v2.seats", "{{count}} seats", { count: n.capacity })}` : ""
217
227
  ]
218
- }) : e.locationAddress || e.location && e.locationType !== "ONLINE" ? /* @__PURE__ */ z(v, {
219
- icon: /* @__PURE__ */ z(M, { "aria-hidden": "true" }),
228
+ }) : e.locationAddress || e.location && e.locationType !== "ONLINE" ? /* @__PURE__ */ V(C, {
229
+ icon: /* @__PURE__ */ V(P, { "aria-hidden": "true" }),
220
230
  children: [e.location, e.locationAddress].filter(Boolean).join(", ")
221
231
  }) : null;
222
232
  }
223
- function oe({ model: e }) {
224
- let t = l(), { tr: n, me: r } = t, { event: i, answer: a } = e;
225
- if (i.guests.length === 0) return null;
226
- let o = (e, t) => e === r && a ? a : t, s = {
233
+ function fe({ model: e }) {
234
+ let t = d(), { tr: r, me: i } = t, { event: a, answer: o } = e;
235
+ if (a.guests.length === 0) return null;
236
+ let s = (e, t) => e === i && o ? o : t, c = {
227
237
  ACCEPTED: 0,
228
238
  TENTATIVE: 0,
229
239
  DECLINED: 0,
230
240
  NO_RESPONSE: 0
231
241
  };
232
- for (let e of i.guests) s[e.organizer ? "ACCEPTED" : o(e.userId, e.response)] += 1;
233
- let c = [...i.guests].sort((e, t) => Number(t.organizer) - Number(e.organizer)), u = [
234
- s.ACCEPTED ? n("calendar.v2.countGoing", "{{count}} going", { count: s.ACCEPTED }) : "",
235
- s.TENTATIVE ? n("calendar.v2.countMaybe", "{{count}} maybe", { count: s.TENTATIVE }) : "",
236
- s.NO_RESPONSE ? n("calendar.v2.countWaiting", "{{count}} waiting", { count: s.NO_RESPONSE }) : "",
237
- s.DECLINED ? n("calendar.v2.countNotGoing", "{{count}} not going", { count: s.DECLINED }) : ""
238
- ].filter(Boolean).map((e) => ` · ${e}`).join(""), d = c.length - X;
239
- return /* @__PURE__ */ B(v, {
240
- icon: /* @__PURE__ */ z(I, { "aria-hidden": "true" }),
242
+ for (let e of a.guests) c[e.organizer ? "ACCEPTED" : s(e.userId, e.response)] += 1;
243
+ let l = [...a.guests].sort((e, t) => Number(t.organizer) - Number(e.organizer)), u = [
244
+ c.ACCEPTED ? r("calendar.v2.countGoing", "{{count}} going", { count: c.ACCEPTED }) : "",
245
+ c.TENTATIVE ? r("calendar.v2.countMaybe", "{{count}} maybe", { count: c.TENTATIVE }) : "",
246
+ c.NO_RESPONSE ? r("calendar.v2.countWaiting", "{{count}} waiting", { count: c.NO_RESPONSE }) : "",
247
+ c.DECLINED ? r("calendar.v2.countNotGoing", "{{count}} not going", { count: c.DECLINED }) : ""
248
+ ].filter(Boolean).map((e) => ` · ${e}`).join(""), f = l.length - X;
249
+ return /* @__PURE__ */ H(C, {
250
+ icon: /* @__PURE__ */ V(R, { "aria-hidden": "true" }),
241
251
  children: [
242
- /* @__PURE__ */ B("div", {
252
+ /* @__PURE__ */ H("div", {
243
253
  className: "mb-1.5",
244
- children: [/* @__PURE__ */ z("b", {
254
+ children: [/* @__PURE__ */ V("b", {
245
255
  className: "font-semibold",
246
- children: c.length === 1 ? n("calendar.v2.peopleOne", "1 person") : n("calendar.v2.peopleMany", "{{count}} people", { count: c.length })
247
- }), /* @__PURE__ */ z("span", {
256
+ children: l.length === 1 ? r("calendar.v2.peopleOne", "1 person") : r("calendar.v2.peopleMany", "{{count}} people", { count: l.length })
257
+ }), /* @__PURE__ */ V("span", {
248
258
  className: "text-text-secondary",
249
259
  children: u
250
260
  })]
251
261
  }),
252
- /* @__PURE__ */ z("ul", {
262
+ /* @__PURE__ */ V("ul", {
253
263
  className: "flex flex-col gap-1.5",
254
- children: c.slice(0, X).map((t) => /* @__PURE__ */ z(_, {
264
+ children: l.slice(0, X).map((t) => /* @__PURE__ */ V(S, {
255
265
  guest: t,
256
- name: e.nameOf(t.userId, t.name) ?? t.email ?? n("calendar.v2.guest", "Guest"),
257
- you: t.userId === r,
258
- answer: o(t.userId, t.response)
266
+ name: e.nameOf(t.userId, t.name) ?? t.email ?? r("calendar.v2.guest", "Guest"),
267
+ you: t.userId === i,
268
+ answer: s(t.userId, t.response)
259
269
  }, t.id))
260
270
  }),
261
- d > 0 && e.look.editable ? /* @__PURE__ */ z("button", {
271
+ f > 0 && e.look.editable ? /* @__PURE__ */ V("button", {
262
272
  type: "button",
263
- className: J("mt-1 text-xs font-semibold text-text-link hover:underline", f),
273
+ className: Y("mt-1 text-xs font-semibold text-text-link hover:underline", m),
264
274
  onClick: () => t.openEventDialog({
265
- eventId: i.id,
275
+ ...n(a),
266
276
  tab: "people"
267
277
  }),
268
- children: n("calendar.v2.seeAll", "See all {{count}}", { count: c.length })
278
+ children: r("calendar.v2.seeAll", "See all {{count}}", { count: l.length })
269
279
  }) : null,
270
- d > 0 && !e.look.editable ? /* @__PURE__ */ z("p", {
280
+ f > 0 && !e.look.editable ? /* @__PURE__ */ V("p", {
271
281
  className: "mt-1 text-xs text-text-secondary",
272
- children: n("calendar.v2.andMore", "and {{count}} more", { count: d })
282
+ children: r("calendar.v2.andMore", "and {{count}} more", { count: f })
273
283
  }) : null
274
284
  ]
275
285
  });
276
286
  }
277
- function se({ event: e }) {
278
- let { tr: t, durationWords: n } = l();
287
+ function pe({ event: e }) {
288
+ let { tr: t, durationWords: n } = d();
279
289
  if (e.reminders.length === 0) return null;
280
290
  let r = (e) => e === "EMAIL" ? t("calendar.v2.channelEmail", "Email") : e === "SMS" ? t("calendar.v2.channelSms", "Text message") : t("calendar.v2.channelInApp", "In app");
281
- return /* @__PURE__ */ z(v, {
282
- icon: /* @__PURE__ */ z(x, { "aria-hidden": "true" }),
283
- children: e.reminders.map((e) => /* @__PURE__ */ B("div", { children: [
284
- e.minutesBefore === 0 ? t("calendar.v2.reminderAtStart", "When it starts") : t("calendar.v2.reminderBefore", "{{time}} before", { time: s(e.minutesBefore, n) }),
291
+ return /* @__PURE__ */ V(C, {
292
+ icon: /* @__PURE__ */ V(E, { "aria-hidden": "true" }),
293
+ children: e.reminders.map((e) => /* @__PURE__ */ H("div", { children: [
294
+ e.minutesBefore === 0 ? t("calendar.v2.reminderAtStart", "When it starts") : t("calendar.v2.reminderBefore", "{{time}} before", { time: l(e.minutesBefore, n) }),
285
295
  " · ",
286
296
  r(e.channel)
287
297
  ] }, e.id))
288
298
  });
289
299
  }
290
300
  function $({ model: e }) {
291
- let { tr: t } = l(), { event: n } = e, r = [e.calendarName, e.iOrganise ? t("calendar.v2.youOrganise", "you organise it") : t("calendar.v2.organisedBy", "organised by {{name}}", { name: e.organizerName })];
292
- return n.visibility === "PRIVATE" && r.push(t("calendar.v2.private", "Private")), n.visibility === "CONFIDENTIAL" && r.push(t("calendar.v2.busyOnlyLabel", "Busy only")), n.status === "DRAFT" && r.push(t("calendar.v2.draft", "Draft")), /* @__PURE__ */ z(v, {
293
- icon: /* @__PURE__ */ z(C, { "aria-hidden": "true" }),
301
+ let { tr: t } = d(), { event: n } = e, r = [e.calendarName];
302
+ return e.iOrganise ? r.push(t("calendar.v2.youOrganise", "you organise it")) : e.organizerName && r.push(t("calendar.v2.organisedBy", "organised by {{name}}", { name: e.organizerName })), n.visibility === "PRIVATE" && r.push(t("calendar.v2.private", "Private")), n.visibility === "CONFIDENTIAL" && r.push(t("calendar.v2.busyOnlyLabel", "Busy only")), n.isBusy || r.push(t("calendar.v2.showsAsFree", "shows as free")), n.status === "DRAFT" && r.push(t("calendar.v2.draft", "Draft")), /* @__PURE__ */ V(C, {
303
+ icon: /* @__PURE__ */ V(O, { "aria-hidden": "true" }),
294
304
  children: r.join(" · ")
295
305
  });
296
306
  }
297
- function ce({ event: e }) {
298
- let { tr: t } = l();
299
- return /* @__PURE__ */ B(R, { children: [e.description ? /* @__PURE__ */ z(v, {
300
- icon: /* @__PURE__ */ z(k, { "aria-hidden": "true" }),
301
- children: /* @__PURE__ */ z("p", {
307
+ function me({ event: e }) {
308
+ return e.description ? /* @__PURE__ */ V(C, {
309
+ icon: /* @__PURE__ */ V(ne, { "aria-hidden": "true" }),
310
+ children: /* @__PURE__ */ V("p", {
302
311
  className: "break-words whitespace-pre-wrap",
303
312
  children: e.description
304
313
  })
305
- }) : null, e.isRecurring ? /* @__PURE__ */ z("p", {
306
- className: "text-xs text-text-muted",
307
- children: t("calendar.v2.firstOccurrenceNote", "Repeating events show their first date for now. Edit opens the whole series.")
308
- }) : null] });
314
+ }) : null;
309
315
  }
310
- function le({ model: e }) {
311
- let t = l(), { tr: n } = t, { event: r, answer: i } = e;
316
+ function he({ model: e }) {
317
+ let t = d(), { tr: n } = t, { event: r, answer: i } = e;
312
318
  if (!e.iOrganise && i !== null) {
313
319
  let e = i === "NO_RESPONSE" ? "none" : i;
314
- return /* @__PURE__ */ B("div", {
320
+ return /* @__PURE__ */ H("div", {
315
321
  className: "flex flex-wrap items-center gap-2 border-t border-border-subtle p-3 ps-4",
316
322
  children: [
317
- /* @__PURE__ */ z("span", {
323
+ /* @__PURE__ */ V("span", {
318
324
  className: "text-sm font-semibold text-text-primary",
319
325
  children: n("calendar.v2.goingQuestion", "Going?")
320
326
  }),
321
- /* @__PURE__ */ z(K, {
327
+ /* @__PURE__ */ V(J, {
322
328
  "aria-label": n("calendar.v2.yourAnswer", "Your answer"),
323
329
  fillOnPhone: !1,
324
330
  value: e,
@@ -340,9 +346,9 @@ function le({ model: e }) {
340
346
  }
341
347
  ]
342
348
  }),
343
- i === "NO_RESPONSE" ? /* @__PURE__ */ B("span", {
349
+ i === "NO_RESPONSE" ? /* @__PURE__ */ H("span", {
344
350
  className: "inline-flex items-center gap-1 text-xs text-text-secondary",
345
- children: [/* @__PURE__ */ z(w, {
351
+ children: [/* @__PURE__ */ V(k, {
346
352
  className: "size-3",
347
353
  "aria-hidden": "true"
348
354
  }), n("calendar.v2.notAnswered", "Not answered")]
@@ -350,94 +356,94 @@ function le({ model: e }) {
350
356
  ]
351
357
  });
352
358
  }
353
- return !e.iOrganise || !e.look.editable ? null : /* @__PURE__ */ B("div", {
359
+ return !e.iOrganise || !e.look.editable ? null : /* @__PURE__ */ H("div", {
354
360
  className: "flex flex-wrap items-center gap-2 border-t border-border-subtle p-3 ps-4",
355
361
  children: [
356
- /* @__PURE__ */ B("span", {
362
+ /* @__PURE__ */ H("span", {
357
363
  className: "inline-flex items-center gap-1.5 text-sm font-semibold text-text-primary",
358
- children: [/* @__PURE__ */ z(D, {
364
+ children: [/* @__PURE__ */ V(M, {
359
365
  className: "size-3.5 text-action-primary-bg",
360
366
  "aria-hidden": "true"
361
367
  }), n("calendar.v2.youOrganiseThis", "You organise this")]
362
368
  }),
363
- /* @__PURE__ */ z("span", { className: "flex-1" }),
364
- /* @__PURE__ */ B(W, {
369
+ /* @__PURE__ */ V("span", { className: "flex-1" }),
370
+ /* @__PURE__ */ H(K, {
365
371
  type: "button",
366
372
  variant: "outline",
367
373
  size: "sm",
368
- onClick: () => t.openFindTime(r.id),
369
- children: [/* @__PURE__ */ z(I, { "aria-hidden": "true" }), n("calendar.v2.findBetterTime", "Find a better time")]
374
+ onClick: () => t.openFindTime(r),
375
+ children: [/* @__PURE__ */ V(R, { "aria-hidden": "true" }), n("calendar.v2.findBetterTime", "Find a better time")]
370
376
  })
371
377
  ]
372
378
  });
373
379
  }
374
- function ue({ model: e }) {
375
- let n = l(), { tr: r } = n;
376
- return /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ B("div", {
380
+ function ge({ model: e }) {
381
+ let n = d(), { tr: r } = n;
382
+ return /* @__PURE__ */ H(B, { children: [/* @__PURE__ */ H("div", {
377
383
  className: "flex items-center gap-3 p-3 ps-4",
378
384
  style: t(n.hueOf(e.event.calendarId)),
379
385
  children: [
380
- /* @__PURE__ */ z("span", {
386
+ /* @__PURE__ */ V("span", {
381
387
  "aria-hidden": "true",
382
388
  className: "size-3.5 shrink-0 rounded-[4px] bg-[var(--cal-hue)]"
383
389
  }),
384
- /* @__PURE__ */ z(Q, {
390
+ /* @__PURE__ */ V(Q, {
385
391
  className: "min-w-0 flex-1 text-base font-bold text-text-primary",
386
392
  children: e.look.title
387
393
  }),
388
- /* @__PURE__ */ z(g, {})
394
+ /* @__PURE__ */ V(x, {})
389
395
  ]
390
- }), /* @__PURE__ */ B("div", {
396
+ }), /* @__PURE__ */ H("div", {
391
397
  className: "flex flex-col gap-3 px-4 pb-4",
392
- children: [/* @__PURE__ */ z("p", {
398
+ children: [/* @__PURE__ */ V("p", {
393
399
  className: "ps-[26px] text-sm text-text-secondary",
394
400
  children: e.when
395
- }), /* @__PURE__ */ z(v, {
396
- icon: /* @__PURE__ */ z(ee, { "aria-hidden": "true" }),
401
+ }), /* @__PURE__ */ V(C, {
402
+ icon: /* @__PURE__ */ V(te, { "aria-hidden": "true" }),
397
403
  children: r("calendar.v2.privateDetails", "Details are private. {{calendar}} shares only that this time is taken.", { calendar: e.calendarName })
398
404
  })]
399
405
  })] });
400
406
  }
401
- function de({ event: e }) {
402
- let n = l(), r = Z(e);
403
- return r.look.busyOnly ? /* @__PURE__ */ z(ue, { model: r }) : /* @__PURE__ */ B(R, { children: [
404
- /* @__PURE__ */ B("div", {
407
+ function _e({ event: e }) {
408
+ let n = d(), r = oe(e);
409
+ return r.look.busyOnly ? /* @__PURE__ */ V(ge, { model: r }) : /* @__PURE__ */ H(B, { children: [
410
+ /* @__PURE__ */ H("div", {
405
411
  className: "flex items-start gap-3 p-3 ps-4",
406
412
  style: t(n.hueOf(e.calendarId)),
407
413
  children: [
408
- /* @__PURE__ */ z("span", {
414
+ /* @__PURE__ */ V("span", {
409
415
  "aria-hidden": "true",
410
416
  className: "mt-1 size-3.5 shrink-0 rounded-[4px] bg-[var(--cal-hue)]"
411
417
  }),
412
- /* @__PURE__ */ z(Q, {
418
+ /* @__PURE__ */ V(Q, {
413
419
  className: "min-w-0 flex-1 text-base leading-snug font-bold break-words text-text-primary",
414
420
  children: r.look.title
415
421
  }),
416
- /* @__PURE__ */ z(te, { model: r })
422
+ /* @__PURE__ */ V(se, { model: r })
417
423
  ]
418
424
  }),
419
- /* @__PURE__ */ B("div", {
425
+ /* @__PURE__ */ H("div", {
420
426
  className: "min-h-0 flex-1 overflow-y-auto px-4 pb-4",
421
- children: [/* @__PURE__ */ z(ne, { model: r }), /* @__PURE__ */ B("div", {
427
+ children: [/* @__PURE__ */ V(ce, { model: r }), /* @__PURE__ */ H("div", {
422
428
  className: "flex flex-col gap-3",
423
429
  children: [
424
- /* @__PURE__ */ z(re, { model: r }),
425
- /* @__PURE__ */ z(ie, { event: e }),
426
- /* @__PURE__ */ z(ae, { event: e }),
427
- /* @__PURE__ */ z(oe, { model: r }),
428
- /* @__PURE__ */ z(se, { event: e }),
429
- /* @__PURE__ */ z($, { model: r }),
430
- /* @__PURE__ */ z(ce, { event: e })
430
+ /* @__PURE__ */ V(le, { model: r }),
431
+ /* @__PURE__ */ V(ue, { event: e }),
432
+ /* @__PURE__ */ V(de, { event: e }),
433
+ /* @__PURE__ */ V(fe, { model: r }),
434
+ /* @__PURE__ */ V(pe, { event: e }),
435
+ /* @__PURE__ */ V($, { model: r }),
436
+ /* @__PURE__ */ V(me, { event: e })
431
437
  ]
432
438
  })]
433
439
  }),
434
- /* @__PURE__ */ z(le, { model: r }),
435
- n.compact ? /* @__PURE__ */ z(H, {
440
+ /* @__PURE__ */ V(he, { model: r }),
441
+ n.compact ? /* @__PURE__ */ V(W, {
436
442
  className: "sr-only",
437
443
  children: r.when
438
444
  }) : null
439
445
  ] });
440
446
  }
441
- export { de as PeekEvent };
447
+ export { _e as PeekEvent };
442
448
 
443
449
  //# sourceMappingURL=PeekEvent.js.map