@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.
- package/dist/generated/wspace-operations.d.ts +342 -69
- package/dist/generated/wspace-operations.js +73 -31
- package/dist/generated/wspace-operations.js.map +1 -1
- package/dist/generated/wspace-types.d.ts +405 -6
- package/dist/translations/en.d.ts +22 -4
- package/dist/v2/CalendarPageV2.js +45 -41
- package/dist/v2/CalendarPageV2.js.map +1 -1
- package/dist/v2/CalendarRoutesV2.js +64 -64
- package/dist/v2/CalendarRoutesV2.js.map +1 -1
- package/dist/v2/data/errors.d.ts +5 -0
- package/dist/v2/data/errors.js +6 -2
- package/dist/v2/data/errors.js.map +1 -1
- package/dist/v2/data/normalize.d.ts +31 -3
- package/dist/v2/data/normalize.js +57 -13
- package/dist/v2/data/normalize.js.map +1 -1
- package/dist/v2/data/seriesDateLookup.d.ts +9 -0
- package/dist/v2/data/seriesDateLookup.js +12 -0
- package/dist/v2/data/seriesDateLookup.js.map +1 -0
- package/dist/v2/data/useEventActions.d.ts +9 -3
- package/dist/v2/data/useEventActions.js +239 -186
- package/dist/v2/data/useEventActions.js.map +1 -1
- package/dist/v2/data/useEventForPeek.js +63 -21
- package/dist/v2/data/useEventForPeek.js.map +1 -1
- package/dist/v2/data/useEventsInRangeV2.d.ts +40 -2
- package/dist/v2/data/useEventsInRangeV2.js +76 -47
- package/dist/v2/data/useEventsInRangeV2.js.map +1 -1
- package/dist/v2/day/DayPanel.js +1 -1
- package/dist/v2/day/DayPanel.js.map +1 -1
- package/dist/v2/event/EventDialog.d.ts +13 -3
- package/dist/v2/event/EventDialog.js +189 -166
- package/dist/v2/event/EventDialog.js.map +1 -1
- package/dist/v2/event/EventDialogs.js +57 -50
- package/dist/v2/event/EventDialogs.js.map +1 -1
- package/dist/v2/event/EventMoreTab.js +8 -7
- package/dist/v2/event/EventMoreTab.js.map +1 -1
- package/dist/v2/event/EventPlaceTab.js +2 -2
- package/dist/v2/event/EventPlaceTab.js.map +1 -1
- package/dist/v2/event/FindTimeDialog.js +1 -1
- package/dist/v2/event/FindTimeDialog.js.map +1 -1
- package/dist/v2/event/RepeatField.js +10 -7
- package/dist/v2/event/RepeatField.js.map +1 -1
- package/dist/v2/event/dialogLogic.d.ts +10 -0
- package/dist/v2/event/dialogLogic.js +25 -22
- package/dist/v2/event/dialogLogic.js.map +1 -1
- package/dist/v2/event/dialogModel.d.ts +3 -0
- package/dist/v2/event/dialogModel.js.map +1 -1
- package/dist/v2/event/eventForm.d.ts +26 -0
- package/dist/v2/event/eventForm.js +145 -92
- package/dist/v2/event/eventForm.js.map +1 -1
- package/dist/v2/event/findTimeSource.js +44 -44
- package/dist/v2/event/findTimeSource.js.map +1 -1
- package/dist/v2/event/rrule.js.map +1 -1
- package/dist/v2/event/savePlan.d.ts +125 -15
- package/dist/v2/event/savePlan.js +162 -68
- package/dist/v2/event/savePlan.js.map +1 -1
- package/dist/v2/event/useEventData.d.ts +7 -2
- package/dist/v2/event/useEventData.js +107 -80
- package/dist/v2/event/useEventData.js.map +1 -1
- package/dist/v2/event/useEventDialogModel.d.ts +16 -3
- package/dist/v2/event/useEventDialogModel.js +82 -67
- package/dist/v2/event/useEventDialogModel.js.map +1 -1
- package/dist/v2/event/useEventSave.d.ts +20 -4
- package/dist/v2/event/useEventSave.js +181 -90
- package/dist/v2/event/useEventSave.js.map +1 -1
- package/dist/v2/events/eventLook.js +16 -16
- package/dist/v2/events/eventLook.js.map +1 -1
- package/dist/v2/events/eventModel.d.ts +17 -4
- package/dist/v2/events/eventModel.js +46 -34
- package/dist/v2/events/eventModel.js.map +1 -1
- package/dist/v2/events/localChanges.d.ts +4 -1
- package/dist/v2/events/localChanges.js +4 -2
- package/dist/v2/events/localChanges.js.map +1 -1
- package/dist/v2/page/CalendarPageContext.d.ts +2 -2
- package/dist/v2/page/CalendarPageContext.js.map +1 -1
- package/dist/v2/page/useCalendarPageModel.js +141 -139
- package/dist/v2/page/useCalendarPageModel.js.map +1 -1
- package/dist/v2/page/viewState.d.ts +9 -1
- package/dist/v2/page/viewState.js +5 -3
- package/dist/v2/page/viewState.js.map +1 -1
- package/dist/v2/peek/PeekEvent.js +210 -204
- package/dist/v2/peek/PeekEvent.js.map +1 -1
- package/dist/v2/rail/useMonthEventDates.js +1 -1
- package/dist/v2/rail/useMonthEventDates.js.map +1 -1
- package/dist/v2/states/CalendarStates.d.ts +15 -0
- package/dist/v2/states/CalendarStates.js +42 -11
- package/dist/v2/states/CalendarStates.js.map +1 -1
- package/dist/v2/types.d.ts +30 -2
- 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 {
|
|
4
|
-
import { formatDay as
|
|
5
|
-
import { useCalendarPage as
|
|
6
|
-
import { SEARCH_PARAMS as
|
|
7
|
-
import { FOCUS_RING as
|
|
8
|
-
import { eventDays as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
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
|
|
19
|
-
let n =
|
|
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]),
|
|
25
|
+
})), [t.guests, t.organizerId]), x = ae(v, {
|
|
23
26
|
apiGatewayUrl: f,
|
|
24
27
|
authToken: p,
|
|
25
|
-
workspaceId:
|
|
26
|
-
}),
|
|
28
|
+
workspaceId: m
|
|
29
|
+
}), S = (e, t) => {
|
|
27
30
|
if (t) return t;
|
|
28
|
-
let n = e ?
|
|
31
|
+
let n = e ? x[e] : void 0;
|
|
29
32
|
return n?.resolved ? n.displayName : null;
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
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:
|
|
44
|
+
calendar: h,
|
|
45
|
+
calendarName: h?.name ?? r("calendar.v2.aCalendar", "a calendar"),
|
|
39
46
|
answer: n.answerOf(t),
|
|
40
|
-
iOrganise:
|
|
41
|
-
organizerName:
|
|
42
|
-
nameOf:
|
|
43
|
-
when:
|
|
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 } =
|
|
48
|
-
return
|
|
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
|
|
54
|
-
let
|
|
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:
|
|
57
|
-
icon:
|
|
58
|
-
onSelect: () => void
|
|
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:
|
|
62
|
-
icon:
|
|
63
|
-
onSelect: () => void
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
})}`,
|
|
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
|
|
78
|
+
return i(c) && l.editable && _.push({
|
|
69
79
|
id: "series",
|
|
70
|
-
label:
|
|
71
|
-
icon:
|
|
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
|
-
|
|
85
|
+
r.closePeek(), r.actions.removeSeries(c);
|
|
76
86
|
}
|
|
77
|
-
}), /* @__PURE__ */
|
|
87
|
+
}), /* @__PURE__ */ H("div", {
|
|
78
88
|
className: "flex shrink-0 items-center",
|
|
79
89
|
children: [
|
|
80
|
-
|
|
90
|
+
l.editable ? /* @__PURE__ */ V("button", {
|
|
81
91
|
type: "button",
|
|
82
|
-
className:
|
|
83
|
-
"aria-label":
|
|
84
|
-
title:
|
|
85
|
-
onClick: () =>
|
|
86
|
-
children: /* @__PURE__ */
|
|
87
|
-
}) : /* @__PURE__ */
|
|
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:
|
|
90
|
-
"aria-label":
|
|
91
|
-
title:
|
|
92
|
-
onClick: () =>
|
|
93
|
-
title:
|
|
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__ */
|
|
106
|
+
children: /* @__PURE__ */ V(N, { "aria-hidden": "true" })
|
|
97
107
|
}),
|
|
98
|
-
|
|
108
|
+
u && !u.isReadOnly ? /* @__PURE__ */ V("button", {
|
|
99
109
|
type: "button",
|
|
100
|
-
className:
|
|
101
|
-
"aria-label":
|
|
102
|
-
title:
|
|
110
|
+
className: h,
|
|
111
|
+
"aria-label": a("calendar.v2.duplicate", "Duplicate"),
|
|
112
|
+
title: a("calendar.v2.duplicate", "Duplicate"),
|
|
103
113
|
onClick: () => {
|
|
104
|
-
|
|
114
|
+
r.closePeek(), r.actions.duplicate(c);
|
|
105
115
|
},
|
|
106
|
-
children: /* @__PURE__ */
|
|
116
|
+
children: /* @__PURE__ */ V(j, { "aria-hidden": "true" })
|
|
107
117
|
}) : null,
|
|
108
|
-
|
|
118
|
+
l.editable ? /* @__PURE__ */ V("button", {
|
|
109
119
|
type: "button",
|
|
110
|
-
className:
|
|
111
|
-
"aria-label":
|
|
112
|
-
title:
|
|
120
|
+
className: h,
|
|
121
|
+
"aria-label": a("calendar.v2.delete", "Delete"),
|
|
122
|
+
title: a("calendar.v2.delete", "Delete"),
|
|
113
123
|
onClick: () => {
|
|
114
|
-
|
|
124
|
+
r.closePeek(), r.actions.remove(c);
|
|
115
125
|
},
|
|
116
|
-
children: /* @__PURE__ */
|
|
126
|
+
children: /* @__PURE__ */ V(L, { "aria-hidden": "true" })
|
|
117
127
|
}) : null,
|
|
118
|
-
/* @__PURE__ */
|
|
119
|
-
items:
|
|
128
|
+
/* @__PURE__ */ V(U, {
|
|
129
|
+
items: _,
|
|
120
130
|
placement: "row",
|
|
121
|
-
label:
|
|
131
|
+
label: a("calendar.v2.moreForEvent", "More for this event")
|
|
122
132
|
}),
|
|
123
|
-
/* @__PURE__ */
|
|
133
|
+
/* @__PURE__ */ V(x, {})
|
|
124
134
|
]
|
|
125
135
|
});
|
|
126
136
|
}
|
|
127
|
-
function
|
|
128
|
-
let { tr: t, format: n, timeZone: r } =
|
|
129
|
-
return /* @__PURE__ */
|
|
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
|
|
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__ */
|
|
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
|
-
|
|
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:
|
|
148
|
-
zone:
|
|
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
|
|
155
|
-
let { tr: t } =
|
|
156
|
-
return /* @__PURE__ */ B
|
|
157
|
-
e.look.roomRefused &&
|
|
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:
|
|
169
|
+
icon: T,
|
|
160
170
|
children: [
|
|
161
|
-
/* @__PURE__ */
|
|
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 &&
|
|
176
|
+
e.look.roomPending && n ? /* @__PURE__ */ V(q, {
|
|
167
177
|
tone: "info",
|
|
168
|
-
icon:
|
|
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__ */
|
|
181
|
+
e.calendar?.isReadOnly ? /* @__PURE__ */ V(q, {
|
|
172
182
|
tone: "lock",
|
|
173
|
-
icon:
|
|
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
|
|
179
|
-
let t =
|
|
180
|
-
return r ? /* @__PURE__ */
|
|
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__ */
|
|
193
|
+
/* @__PURE__ */ V(K, {
|
|
184
194
|
asChild: !0,
|
|
185
|
-
children: /* @__PURE__ */
|
|
195
|
+
children: /* @__PURE__ */ H("a", {
|
|
186
196
|
href: r,
|
|
187
197
|
target: "_blank",
|
|
188
198
|
rel: "noopener noreferrer",
|
|
189
|
-
children: [/* @__PURE__ */ z
|
|
199
|
+
children: [/* @__PURE__ */ V(z, { "aria-hidden": "true" }), n("calendar.v2.joinCall", "Join the call")]
|
|
190
200
|
})
|
|
191
201
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
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__ */
|
|
206
|
+
/* @__PURE__ */ V("button", {
|
|
197
207
|
type: "button",
|
|
198
|
-
className:
|
|
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__ */
|
|
211
|
+
children: /* @__PURE__ */ V(j, { "aria-hidden": "true" })
|
|
202
212
|
})
|
|
203
213
|
]
|
|
204
214
|
}) : null;
|
|
205
215
|
}
|
|
206
|
-
function
|
|
207
|
-
let { tr: t } =
|
|
208
|
-
return
|
|
209
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
221
|
+
/* @__PURE__ */ V("b", {
|
|
212
222
|
className: "font-semibold",
|
|
213
|
-
children:
|
|
223
|
+
children: n.name ?? t("calendar.v2.theRoom", "The room")
|
|
214
224
|
}),
|
|
215
|
-
|
|
216
|
-
|
|
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__ */
|
|
219
|
-
icon: /* @__PURE__ */
|
|
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
|
|
224
|
-
let t =
|
|
225
|
-
if (
|
|
226
|
-
let
|
|
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
|
|
233
|
-
let
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
].filter(Boolean).map((e) => ` · ${e}`).join(""),
|
|
239
|
-
return /* @__PURE__ */
|
|
240
|
-
icon: /* @__PURE__ */
|
|
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__ */
|
|
252
|
+
/* @__PURE__ */ H("div", {
|
|
243
253
|
className: "mb-1.5",
|
|
244
|
-
children: [/* @__PURE__ */
|
|
254
|
+
children: [/* @__PURE__ */ V("b", {
|
|
245
255
|
className: "font-semibold",
|
|
246
|
-
children:
|
|
247
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
262
|
+
/* @__PURE__ */ V("ul", {
|
|
253
263
|
className: "flex flex-col gap-1.5",
|
|
254
|
-
children:
|
|
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 ??
|
|
257
|
-
you: t.userId ===
|
|
258
|
-
answer:
|
|
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
|
-
|
|
271
|
+
f > 0 && e.look.editable ? /* @__PURE__ */ V("button", {
|
|
262
272
|
type: "button",
|
|
263
|
-
className:
|
|
273
|
+
className: Y("mt-1 text-xs font-semibold text-text-link hover:underline", m),
|
|
264
274
|
onClick: () => t.openEventDialog({
|
|
265
|
-
|
|
275
|
+
...n(a),
|
|
266
276
|
tab: "people"
|
|
267
277
|
}),
|
|
268
|
-
children:
|
|
278
|
+
children: r("calendar.v2.seeAll", "See all {{count}}", { count: l.length })
|
|
269
279
|
}) : null,
|
|
270
|
-
|
|
280
|
+
f > 0 && !e.look.editable ? /* @__PURE__ */ V("p", {
|
|
271
281
|
className: "mt-1 text-xs text-text-secondary",
|
|
272
|
-
children:
|
|
282
|
+
children: r("calendar.v2.andMore", "and {{count}} more", { count: f })
|
|
273
283
|
}) : null
|
|
274
284
|
]
|
|
275
285
|
});
|
|
276
286
|
}
|
|
277
|
-
function
|
|
278
|
-
let { tr: t, durationWords: n } =
|
|
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__ */
|
|
282
|
-
icon: /* @__PURE__ */
|
|
283
|
-
children: e.reminders.map((e) => /* @__PURE__ */
|
|
284
|
-
e.minutesBefore === 0 ? t("calendar.v2.reminderAtStart", "When it starts") : t("calendar.v2.reminderBefore", "{{time}} before", { time:
|
|
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 } =
|
|
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__ */
|
|
293
|
-
icon: /* @__PURE__ */
|
|
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
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
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
|
|
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
|
|
311
|
-
let t =
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
349
|
+
i === "NO_RESPONSE" ? /* @__PURE__ */ H("span", {
|
|
344
350
|
className: "inline-flex items-center gap-1 text-xs text-text-secondary",
|
|
345
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
362
|
+
/* @__PURE__ */ H("span", {
|
|
357
363
|
className: "inline-flex items-center gap-1.5 text-sm font-semibold text-text-primary",
|
|
358
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
364
|
-
/* @__PURE__ */
|
|
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
|
|
369
|
-
children: [/* @__PURE__ */
|
|
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
|
|
375
|
-
let n =
|
|
376
|
-
return /* @__PURE__ */ B
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
394
|
+
/* @__PURE__ */ V(x, {})
|
|
389
395
|
]
|
|
390
|
-
}), /* @__PURE__ */
|
|
396
|
+
}), /* @__PURE__ */ H("div", {
|
|
391
397
|
className: "flex flex-col gap-3 px-4 pb-4",
|
|
392
|
-
children: [/* @__PURE__ */
|
|
398
|
+
children: [/* @__PURE__ */ V("p", {
|
|
393
399
|
className: "ps-[26px] text-sm text-text-secondary",
|
|
394
400
|
children: e.when
|
|
395
|
-
}), /* @__PURE__ */
|
|
396
|
-
icon: /* @__PURE__ */
|
|
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
|
|
402
|
-
let n =
|
|
403
|
-
return r.look.busyOnly ? /* @__PURE__ */
|
|
404
|
-
/* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
422
|
+
/* @__PURE__ */ V(se, { model: r })
|
|
417
423
|
]
|
|
418
424
|
}),
|
|
419
|
-
/* @__PURE__ */
|
|
425
|
+
/* @__PURE__ */ H("div", {
|
|
420
426
|
className: "min-h-0 flex-1 overflow-y-auto px-4 pb-4",
|
|
421
|
-
children: [/* @__PURE__ */
|
|
427
|
+
children: [/* @__PURE__ */ V(ce, { model: r }), /* @__PURE__ */ H("div", {
|
|
422
428
|
className: "flex flex-col gap-3",
|
|
423
429
|
children: [
|
|
424
|
-
/* @__PURE__ */
|
|
425
|
-
/* @__PURE__ */
|
|
426
|
-
/* @__PURE__ */
|
|
427
|
-
/* @__PURE__ */
|
|
428
|
-
/* @__PURE__ */
|
|
429
|
-
/* @__PURE__ */
|
|
430
|
-
/* @__PURE__ */
|
|
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__ */
|
|
435
|
-
n.compact ? /* @__PURE__ */
|
|
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 {
|
|
447
|
+
export { _e as PeekEvent };
|
|
442
448
|
|
|
443
449
|
//# sourceMappingURL=PeekEvent.js.map
|