@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
|
@@ -2,50 +2,52 @@ import { technicalDetails as e } from "../data/errors.js";
|
|
|
2
2
|
import { useCalendarPage as t } from "../page/CalendarPageContext.js";
|
|
3
3
|
import { TITLE_INPUT_ID as n, issueTarget as r } from "./dialogLogic.js";
|
|
4
4
|
import { EventDetailsTab as i } from "./EventDetailsTab.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
5
|
+
import { detachedForm as a } from "./eventForm.js";
|
|
6
|
+
import { EventMoreTab as o } from "./EventMoreTab.js";
|
|
7
|
+
import { EventPeopleTab as s, GUEST_INPUT_SELECTOR as c } from "./EventPeopleTab.js";
|
|
8
|
+
import { EventPlaceTab as l } from "./EventPlaceTab.js";
|
|
9
|
+
import { canChangeLater as u, isFirstDate as d } from "./savePlan.js";
|
|
10
|
+
import { useEventDialogModel as f } from "./useEventDialogModel.js";
|
|
11
|
+
import { useEventSave as p } from "./useEventSave.js";
|
|
12
|
+
import { useState as m } from "react";
|
|
13
|
+
import { CalendarDays as h, ChevronDown as g, FileText as _, Loader2 as v, Lock as y, MapPin as b, SlidersHorizontal as x, Users as S } from "lucide-react";
|
|
14
|
+
import { jsx as C, jsxs as w } from "react/jsx-runtime";
|
|
15
|
+
import { Button as T, DropdownMenu as E, DropdownMenuContent as D, DropdownMenuRadioGroup as O, DropdownMenuRadioItem as k, DropdownMenuTrigger as A, IconTile as j, Notice as M, ShowTechnicalDetails as N, Spinner as P, TabbedDialog as F, TabbedDialogContent as I, TabbedDialogFooter as L, TabbedDialogHeader as R, TabbedDialogTabs as z, useConfirm as B } from "@burdenoff/fe-libs/ui";
|
|
16
|
+
import { cn as V } from "@burdenoff/fe-libs/utils";
|
|
15
17
|
// src/v2/event/EventDialog.tsx
|
|
16
|
-
var
|
|
17
|
-
details:
|
|
18
|
-
people:
|
|
19
|
-
place:
|
|
20
|
-
more:
|
|
18
|
+
var H = {
|
|
19
|
+
details: _,
|
|
20
|
+
people: S,
|
|
21
|
+
place: b,
|
|
22
|
+
more: x
|
|
21
23
|
};
|
|
22
|
-
function
|
|
23
|
-
return e ? /* @__PURE__ */
|
|
24
|
+
function U({ session: e, edited: t, onChange: n, onClose: r, onFindTime: i }) {
|
|
25
|
+
return e ? /* @__PURE__ */ C(q, {
|
|
24
26
|
session: e,
|
|
25
27
|
edited: t,
|
|
26
28
|
onChange: n,
|
|
27
29
|
onClose: r,
|
|
28
30
|
onFindTime: i
|
|
29
|
-
}) : /* @__PURE__ */
|
|
31
|
+
}) : /* @__PURE__ */ C(G, {
|
|
30
32
|
edited: t,
|
|
31
33
|
onClose: r
|
|
32
34
|
});
|
|
33
35
|
}
|
|
34
|
-
function
|
|
36
|
+
function W({ heading: e, description: n, locked: r, onOpenChange: i, onOpenAutoFocus: a, children: o }) {
|
|
35
37
|
let { tr: s } = t();
|
|
36
|
-
return /* @__PURE__ */
|
|
38
|
+
return /* @__PURE__ */ C(F, {
|
|
37
39
|
open: !0,
|
|
38
40
|
onOpenChange: i,
|
|
39
|
-
children: /* @__PURE__ */
|
|
41
|
+
children: /* @__PURE__ */ w(I, {
|
|
40
42
|
size: "form",
|
|
41
43
|
className: "sm:max-w-[640px]",
|
|
42
44
|
"aria-describedby": void 0,
|
|
43
45
|
onOpenAutoFocus: a,
|
|
44
|
-
children: [/* @__PURE__ */
|
|
45
|
-
icon: /* @__PURE__ */
|
|
46
|
+
children: [/* @__PURE__ */ C(R, {
|
|
47
|
+
icon: /* @__PURE__ */ C(j, {
|
|
46
48
|
size: "sm",
|
|
47
49
|
"aria-hidden": "true",
|
|
48
|
-
children:
|
|
50
|
+
children: C(r ? y : h, {})
|
|
49
51
|
}),
|
|
50
52
|
title: e,
|
|
51
53
|
description: n,
|
|
@@ -54,49 +56,49 @@ function V({ heading: e, description: n, locked: r, onOpenChange: i, onOpenAutoF
|
|
|
54
56
|
})
|
|
55
57
|
});
|
|
56
58
|
}
|
|
57
|
-
function
|
|
58
|
-
let { tr: i } = t(), a = /* @__PURE__ */
|
|
59
|
+
function G({ edited: n, onClose: r }) {
|
|
60
|
+
let { tr: i } = t(), a = /* @__PURE__ */ w("div", {
|
|
59
61
|
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
60
|
-
children: [/* @__PURE__ */
|
|
62
|
+
children: [/* @__PURE__ */ C(P, { size: "sm" }), i("calendar.v2.openingEvent", "Opening the event…")]
|
|
61
63
|
});
|
|
62
|
-
return n.status === "missing" ? a = /* @__PURE__ */
|
|
64
|
+
return n.status === "missing" ? a = /* @__PURE__ */ w("div", {
|
|
63
65
|
className: "flex max-w-sm flex-col gap-2",
|
|
64
|
-
children: [/* @__PURE__ */
|
|
66
|
+
children: [/* @__PURE__ */ C("b", {
|
|
65
67
|
className: "text-base text-text-primary",
|
|
66
68
|
children: i("calendar.v2.peekMissing", "This event isn’t available")
|
|
67
|
-
}), /* @__PURE__ */
|
|
69
|
+
}), /* @__PURE__ */ C("p", {
|
|
68
70
|
className: "text-sm text-text-secondary",
|
|
69
71
|
children: i("calendar.v2.actionGone", "It may have been deleted or moved by someone else.")
|
|
70
72
|
})]
|
|
71
|
-
}) : n.status === "error" && (a = /* @__PURE__ */
|
|
73
|
+
}) : n.status === "error" && (a = /* @__PURE__ */ w("div", {
|
|
72
74
|
className: "flex max-w-sm flex-col items-center gap-3",
|
|
73
75
|
children: [
|
|
74
|
-
/* @__PURE__ */
|
|
76
|
+
/* @__PURE__ */ C("b", {
|
|
75
77
|
className: "text-base text-text-primary",
|
|
76
78
|
children: i("calendar.v2.peekFailed", "Couldn’t open the event")
|
|
77
79
|
}),
|
|
78
|
-
/* @__PURE__ */
|
|
80
|
+
/* @__PURE__ */ C("p", {
|
|
79
81
|
className: "text-sm text-text-secondary",
|
|
80
82
|
children: i("calendar.v2.peekFailedBody", "The calendar service didn’t answer. Nothing was changed.")
|
|
81
83
|
}),
|
|
82
|
-
/* @__PURE__ */
|
|
84
|
+
/* @__PURE__ */ C(T, {
|
|
83
85
|
type: "button",
|
|
84
86
|
variant: "outline",
|
|
85
87
|
onClick: n.retry,
|
|
86
88
|
children: i("calendar.v2.tryAgain", "Try again")
|
|
87
89
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ C(N, {
|
|
89
91
|
copyable: !0,
|
|
90
92
|
children: e(n.error)
|
|
91
93
|
})
|
|
92
94
|
]
|
|
93
|
-
})), /* @__PURE__ */
|
|
95
|
+
})), /* @__PURE__ */ w(W, {
|
|
94
96
|
heading: i("calendar.v2.evEditTitle", "Edit event"),
|
|
95
97
|
onOpenChange: (e) => e ? void 0 : r(),
|
|
96
|
-
children: [/* @__PURE__ */
|
|
98
|
+
children: [/* @__PURE__ */ C("div", {
|
|
97
99
|
className: "grid min-h-0 flex-1 place-items-center p-6 text-center",
|
|
98
100
|
children: a
|
|
99
|
-
}), /* @__PURE__ */
|
|
101
|
+
}), /* @__PURE__ */ C(L, { children: /* @__PURE__ */ C(T, {
|
|
100
102
|
type: "button",
|
|
101
103
|
variant: "outline",
|
|
102
104
|
onClick: r,
|
|
@@ -104,181 +106,201 @@ function H({ edited: n, onClose: r }) {
|
|
|
104
106
|
}) })]
|
|
105
107
|
});
|
|
106
108
|
}
|
|
107
|
-
function
|
|
109
|
+
function K(e, t) {
|
|
108
110
|
requestAnimationFrame(() => {
|
|
109
111
|
let n = (e instanceof HTMLElement ? e : document).querySelector(t);
|
|
110
112
|
n instanceof HTMLElement && n.focus();
|
|
111
113
|
});
|
|
112
114
|
}
|
|
113
|
-
function
|
|
114
|
-
let
|
|
115
|
+
function q({ session: e, edited: h, onChange: g, onClose: _, onFindTime: v }) {
|
|
116
|
+
let b = t(), { tr: x, format: S, timeZone: E } = b, D = B(), [O, k] = m(!1), [A, j] = m(!1), [N, P] = m(!1), F = f({
|
|
115
117
|
session: e,
|
|
116
|
-
edited:
|
|
117
|
-
onChange:
|
|
118
|
-
onFindTime:
|
|
119
|
-
onGuestsPending:
|
|
120
|
-
showIssues:
|
|
121
|
-
}), { model:
|
|
122
|
-
tr:
|
|
123
|
-
format:
|
|
124
|
-
durationWords:
|
|
125
|
-
timeZone:
|
|
126
|
-
calendarName: (e) =>
|
|
127
|
-
roomName: (e) =>
|
|
128
|
-
guestName:
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
118
|
+
edited: h,
|
|
119
|
+
onChange: g,
|
|
120
|
+
onFindTime: v,
|
|
121
|
+
onGuestsPending: P,
|
|
122
|
+
showIssues: O
|
|
123
|
+
}), { model: I, event: R, row: V, readOnly: U } = F, G = p({
|
|
124
|
+
tr: x,
|
|
125
|
+
format: S,
|
|
126
|
+
durationWords: b.durationWords,
|
|
127
|
+
timeZone: E,
|
|
128
|
+
calendarName: (e) => b.calendarsById.get(e)?.name ?? null,
|
|
129
|
+
roomName: (e) => I.rooms.rooms.find((t) => t.id === e)?.name ?? null,
|
|
130
|
+
guestName: I.guestName,
|
|
131
|
+
me: b.me
|
|
132
|
+
}), q = async () => {
|
|
133
|
+
A || (U || !F.dirty || await D({
|
|
134
|
+
title: x("calendar.v2.evDiscardTitle", "Discard your changes?"),
|
|
135
|
+
description: x("calendar.v2.evDiscardBody", "What you changed in this event isn’t saved."),
|
|
133
136
|
tone: "danger",
|
|
134
|
-
confirmLabel:
|
|
135
|
-
cancelLabel:
|
|
136
|
-
})) &&
|
|
137
|
-
},
|
|
138
|
-
if (
|
|
139
|
-
|
|
140
|
-
let t = r(
|
|
141
|
-
if (t || !
|
|
137
|
+
confirmLabel: x("calendar.v2.evDiscard", "Discard"),
|
|
138
|
+
cancelLabel: x("calendar.v2.evKeepEditing", "Keep editing")
|
|
139
|
+
})) && _();
|
|
140
|
+
}, Q = async () => {
|
|
141
|
+
if (A || U || F.readBack || N) return;
|
|
142
|
+
k(!0);
|
|
143
|
+
let t = r(I.issues);
|
|
144
|
+
if (t || !F.calendarId) t && g((e) => ({
|
|
142
145
|
...e,
|
|
143
146
|
tab: t.tab
|
|
144
|
-
})), t?.field &&
|
|
145
|
-
else if (!
|
|
147
|
+
})), t?.field && K(null, `#${t.field}`);
|
|
148
|
+
else if (!F.toSave) _();
|
|
146
149
|
else {
|
|
147
|
-
|
|
150
|
+
j(!0);
|
|
148
151
|
try {
|
|
149
152
|
let t = {
|
|
150
|
-
...
|
|
151
|
-
calendarId:
|
|
152
|
-
}, n = await
|
|
153
|
+
...I.form,
|
|
154
|
+
calendarId: F.calendarId
|
|
155
|
+
}, n = await G({
|
|
153
156
|
form: t,
|
|
154
|
-
|
|
155
|
-
|
|
157
|
+
initial: F.baseline,
|
|
158
|
+
event: R,
|
|
159
|
+
row: V,
|
|
160
|
+
scope: e.scope,
|
|
161
|
+
carry: e.carry
|
|
156
162
|
});
|
|
157
|
-
n.kind === "saved" &&
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
if (n.kind === "saved" && _(), n.kind === "partial") {
|
|
164
|
+
let t = n.madeNew && F.seriesDate && e.scope === "this";
|
|
165
|
+
g((e) => ({
|
|
166
|
+
...e,
|
|
167
|
+
eventId: n.eventId,
|
|
168
|
+
instanceDate: n.instanceDate,
|
|
169
|
+
form: n.madeNew ? a(t ? {
|
|
170
|
+
...e.form,
|
|
171
|
+
repeat: { kind: "none" }
|
|
172
|
+
} : e.form) : e.form,
|
|
173
|
+
partlySaved: !0,
|
|
174
|
+
carry: n.carry
|
|
175
|
+
}));
|
|
176
|
+
}
|
|
161
177
|
} finally {
|
|
162
|
-
|
|
178
|
+
j(!1);
|
|
163
179
|
}
|
|
164
180
|
}
|
|
165
|
-
},
|
|
181
|
+
}, $ = [
|
|
166
182
|
{
|
|
167
183
|
value: "details",
|
|
168
|
-
label:
|
|
169
|
-
icon:
|
|
184
|
+
label: x("calendar.v2.evDetails", "Details"),
|
|
185
|
+
icon: H.details
|
|
170
186
|
},
|
|
171
187
|
{
|
|
172
188
|
value: "people",
|
|
173
|
-
label:
|
|
174
|
-
icon:
|
|
189
|
+
label: x("calendar.v2.evPeopleTab", "People"),
|
|
190
|
+
icon: H.people
|
|
175
191
|
},
|
|
176
192
|
{
|
|
177
193
|
value: "place",
|
|
178
|
-
label:
|
|
179
|
-
icon:
|
|
194
|
+
label: x("calendar.v2.evPlace", "Place"),
|
|
195
|
+
icon: H.place
|
|
180
196
|
},
|
|
181
197
|
{
|
|
182
198
|
value: "more",
|
|
183
|
-
label:
|
|
184
|
-
icon:
|
|
199
|
+
label: x("calendar.v2.evMore", "More"),
|
|
200
|
+
icon: H.more
|
|
185
201
|
}
|
|
186
|
-
],
|
|
202
|
+
], ee = {
|
|
187
203
|
details: `#${n}`,
|
|
188
|
-
people:
|
|
204
|
+
people: c
|
|
189
205
|
};
|
|
190
|
-
return /* @__PURE__ */
|
|
191
|
-
heading:
|
|
192
|
-
description:
|
|
193
|
-
locked:
|
|
194
|
-
onOpenChange: (e) => e ? void 0 : void
|
|
206
|
+
return /* @__PURE__ */ w(W, {
|
|
207
|
+
heading: F.heading,
|
|
208
|
+
description: F.description,
|
|
209
|
+
locked: U,
|
|
210
|
+
onOpenChange: (e) => e ? void 0 : void q(),
|
|
195
211
|
onOpenAutoFocus: (t) => {
|
|
196
|
-
let n =
|
|
197
|
-
n && (t.preventDefault(),
|
|
212
|
+
let n = U ? void 0 : ee[e.tab];
|
|
213
|
+
n && (t.preventDefault(), K(t.currentTarget, n));
|
|
198
214
|
},
|
|
199
|
-
children: [/* @__PURE__ */
|
|
200
|
-
tabs:
|
|
215
|
+
children: [/* @__PURE__ */ C(z, {
|
|
216
|
+
tabs: $,
|
|
201
217
|
value: e.tab,
|
|
202
|
-
onValueChange: (e) =>
|
|
218
|
+
onValueChange: (e) => g((t) => ({
|
|
203
219
|
...t,
|
|
204
220
|
tab: e
|
|
205
221
|
})),
|
|
206
|
-
"aria-label":
|
|
207
|
-
renderPanel: (e) => /* @__PURE__ */
|
|
208
|
-
disabled:
|
|
222
|
+
"aria-label": x("calendar.v2.evSections", "Event sections"),
|
|
223
|
+
renderPanel: (e) => /* @__PURE__ */ w("fieldset", {
|
|
224
|
+
disabled: A,
|
|
209
225
|
className: "m-0 flex min-w-0 flex-col gap-4 border-0 p-0",
|
|
210
226
|
children: [
|
|
211
|
-
|
|
227
|
+
F.lock ? /* @__PURE__ */ C(M, {
|
|
212
228
|
tone: "lock",
|
|
213
|
-
icon:
|
|
214
|
-
children:
|
|
229
|
+
icon: y,
|
|
230
|
+
children: F.lock
|
|
215
231
|
}) : null,
|
|
216
|
-
|
|
217
|
-
readBack:
|
|
218
|
-
edited:
|
|
232
|
+
F.readBack ? /* @__PURE__ */ C(Y, {
|
|
233
|
+
readBack: F.readBack,
|
|
234
|
+
edited: h
|
|
219
235
|
}) : null,
|
|
220
|
-
e === "details" ? /* @__PURE__ */
|
|
221
|
-
e === "people" ? /* @__PURE__ */
|
|
222
|
-
e === "place" ? /* @__PURE__ */
|
|
223
|
-
e === "more" ? /* @__PURE__ */
|
|
236
|
+
e === "details" ? /* @__PURE__ */ C(i, { model: I }) : null,
|
|
237
|
+
e === "people" ? /* @__PURE__ */ C(s, { model: I }) : null,
|
|
238
|
+
e === "place" ? /* @__PURE__ */ C(l, { model: I }) : null,
|
|
239
|
+
e === "more" ? /* @__PURE__ */ C(o, { model: I }) : null
|
|
224
240
|
]
|
|
225
241
|
})
|
|
226
|
-
}), /* @__PURE__ */
|
|
242
|
+
}), /* @__PURE__ */ w(L, {
|
|
227
243
|
className: "gap-2",
|
|
228
244
|
children: [
|
|
229
|
-
/* @__PURE__ */
|
|
245
|
+
/* @__PURE__ */ C(J, { note: N && !U ? {
|
|
230
246
|
tone: "info",
|
|
231
|
-
text:
|
|
232
|
-
} :
|
|
233
|
-
F
|
|
247
|
+
text: x("calendar.v2.evAddingTeam", "Adding the team’s people…")
|
|
248
|
+
} : F.note }),
|
|
249
|
+
F.seriesDate && R && V && !U ? /* @__PURE__ */ C(Z, {
|
|
234
250
|
scope: e.scope,
|
|
235
|
-
disabled:
|
|
236
|
-
|
|
251
|
+
disabled: A,
|
|
252
|
+
firstDate: d(R, V),
|
|
253
|
+
laterAllowed: u(R, V),
|
|
254
|
+
onScope: (e) => g((t) => ({
|
|
237
255
|
...t,
|
|
238
|
-
scope: e
|
|
256
|
+
scope: e,
|
|
257
|
+
form: e === "this" ? {
|
|
258
|
+
...t.form,
|
|
259
|
+
repeat: F.baseline.repeat
|
|
260
|
+
} : t.form
|
|
239
261
|
}))
|
|
240
262
|
}) : null,
|
|
241
|
-
/* @__PURE__ */
|
|
263
|
+
/* @__PURE__ */ C(T, {
|
|
242
264
|
type: "button",
|
|
243
265
|
variant: "outline",
|
|
244
|
-
onClick: () => void
|
|
245
|
-
disabled:
|
|
246
|
-
children:
|
|
266
|
+
onClick: () => void q(),
|
|
267
|
+
disabled: A,
|
|
268
|
+
children: U ? x("calendar.v2.close", "Close") : x("calendar.v2.evCancel", "Cancel")
|
|
247
269
|
}),
|
|
248
|
-
|
|
249
|
-
saving:
|
|
250
|
-
waiting:
|
|
270
|
+
U ? null : /* @__PURE__ */ C(X, {
|
|
271
|
+
saving: A,
|
|
272
|
+
waiting: F.readBack !== null || N,
|
|
251
273
|
editing: e.eventId !== null,
|
|
252
|
-
onSave: () => void
|
|
274
|
+
onSave: () => void Q()
|
|
253
275
|
})
|
|
254
276
|
]
|
|
255
277
|
})]
|
|
256
278
|
});
|
|
257
279
|
}
|
|
258
|
-
function
|
|
259
|
-
if (!e) return /* @__PURE__ */
|
|
280
|
+
function J({ note: e }) {
|
|
281
|
+
if (!e) return /* @__PURE__ */ C("span", { className: "flex-1" });
|
|
260
282
|
let t = {
|
|
261
283
|
bad: "font-medium text-status-error-text",
|
|
262
284
|
warn: "font-medium text-status-warning-text",
|
|
263
285
|
info: "text-text-secondary"
|
|
264
286
|
}[e.tone];
|
|
265
|
-
return /* @__PURE__ */
|
|
266
|
-
className:
|
|
287
|
+
return /* @__PURE__ */ C("span", {
|
|
288
|
+
className: V("min-w-0 flex-1 truncate text-xs max-sm:basis-full", t),
|
|
267
289
|
role: e.tone === "bad" ? "alert" : void 0,
|
|
268
290
|
children: e.text
|
|
269
291
|
});
|
|
270
292
|
}
|
|
271
|
-
function
|
|
293
|
+
function Y({ readBack: e, edited: n }) {
|
|
272
294
|
let { tr: r } = t();
|
|
273
|
-
if (e === "missing") return /* @__PURE__ */
|
|
295
|
+
if (e === "missing") return /* @__PURE__ */ C(M, {
|
|
274
296
|
tone: "bad",
|
|
275
297
|
children: r("calendar.v2.evSavedGone", "This event isn’t available any more. It may have been deleted by someone else.")
|
|
276
298
|
});
|
|
277
299
|
if (e !== "failed") return null;
|
|
278
300
|
let i = n.status === "ready" || n.status === "error" ? n.retry : null;
|
|
279
|
-
return /* @__PURE__ */
|
|
301
|
+
return /* @__PURE__ */ C(M, {
|
|
280
302
|
tone: "bad",
|
|
281
|
-
action: i ? /* @__PURE__ */
|
|
303
|
+
action: i ? /* @__PURE__ */ C(T, {
|
|
282
304
|
type: "button",
|
|
283
305
|
variant: "outline",
|
|
284
306
|
size: "sm",
|
|
@@ -288,78 +310,79 @@ function K({ readBack: e, edited: n }) {
|
|
|
288
310
|
children: r("calendar.v2.evSavedUnread", "Couldn’t read the event back from the calendar service, so saving waits. Try again.")
|
|
289
311
|
});
|
|
290
312
|
}
|
|
291
|
-
function
|
|
313
|
+
function X({ saving: e, waiting: n, editing: r, onSave: i }) {
|
|
292
314
|
let { tr: a } = t(), o = a("calendar.v2.evCreate", "Create event");
|
|
293
|
-
return r && (o = a("calendar.v2.evSaveChanges", "Save changes")), e && (o = a("calendar.v2.evSaving", "Saving…")), /* @__PURE__ */
|
|
315
|
+
return r && (o = a("calendar.v2.evSaveChanges", "Save changes")), e && (o = a("calendar.v2.evSaving", "Saving…")), /* @__PURE__ */ w(T, {
|
|
294
316
|
type: "button",
|
|
295
317
|
onClick: i,
|
|
296
318
|
disabled: e || n,
|
|
297
319
|
"aria-busy": e || void 0,
|
|
298
|
-
children: [e ? /* @__PURE__ */
|
|
320
|
+
children: [e ? /* @__PURE__ */ C(v, {
|
|
299
321
|
className: "motion-safe:animate-spin",
|
|
300
322
|
"aria-hidden": "true"
|
|
301
323
|
}) : null, o]
|
|
302
324
|
});
|
|
303
325
|
}
|
|
304
|
-
function
|
|
305
|
-
let { tr:
|
|
306
|
-
|
|
307
|
-
|
|
326
|
+
function Z({ scope: e, disabled: n, firstDate: r, laterAllowed: i, onScope: a }) {
|
|
327
|
+
let { tr: o } = t(), s = {
|
|
328
|
+
this: o("calendar.v2.evScopeThis", "This event"),
|
|
329
|
+
later: o("calendar.v2.evScopeLater", "This and later events"),
|
|
330
|
+
all: o("calendar.v2.evScopeAll", "Every event in the series")
|
|
308
331
|
};
|
|
309
|
-
return /* @__PURE__ */
|
|
332
|
+
return /* @__PURE__ */ w(E, { children: [/* @__PURE__ */ C(A, {
|
|
310
333
|
asChild: !0,
|
|
311
|
-
children: /* @__PURE__ */
|
|
334
|
+
children: /* @__PURE__ */ w(T, {
|
|
312
335
|
type: "button",
|
|
313
336
|
variant: "ghost",
|
|
314
337
|
size: "sm",
|
|
315
338
|
disabled: n,
|
|
316
339
|
children: [
|
|
317
|
-
/* @__PURE__ */
|
|
340
|
+
/* @__PURE__ */ C("span", {
|
|
318
341
|
className: "text-text-secondary",
|
|
319
|
-
children:
|
|
342
|
+
children: o("calendar.v2.evChange", "Change:")
|
|
320
343
|
}),
|
|
321
|
-
|
|
322
|
-
/* @__PURE__ */
|
|
344
|
+
s[e],
|
|
345
|
+
/* @__PURE__ */ C(g, { "aria-hidden": "true" })
|
|
323
346
|
]
|
|
324
347
|
})
|
|
325
|
-
}), /* @__PURE__ */
|
|
348
|
+
}), /* @__PURE__ */ C(D, {
|
|
326
349
|
align: "end",
|
|
327
350
|
className: "w-72",
|
|
328
|
-
children: /* @__PURE__ */
|
|
351
|
+
children: /* @__PURE__ */ w(O, {
|
|
329
352
|
value: e,
|
|
330
353
|
onValueChange: (e) => {
|
|
331
|
-
(e === "
|
|
354
|
+
(e === "this" || e === "all" || e === "later" && i) && a(e);
|
|
332
355
|
},
|
|
333
356
|
children: [
|
|
334
|
-
/* @__PURE__ */
|
|
357
|
+
/* @__PURE__ */ C(k, {
|
|
335
358
|
value: "this",
|
|
336
|
-
|
|
337
|
-
children: /* @__PURE__ */ x("span", {
|
|
359
|
+
children: /* @__PURE__ */ w("span", {
|
|
338
360
|
className: "flex flex-col",
|
|
339
|
-
children: [
|
|
361
|
+
children: [s.this, /* @__PURE__ */ C("span", {
|
|
340
362
|
className: "text-xs text-text-secondary",
|
|
341
|
-
children:
|
|
363
|
+
children: o("calendar.v2.evScopeThisNote", "Only this date. The rest of the series stays as it is.")
|
|
342
364
|
})]
|
|
343
365
|
})
|
|
344
366
|
}),
|
|
345
|
-
/* @__PURE__ */
|
|
367
|
+
/* @__PURE__ */ C(k, {
|
|
346
368
|
value: "later",
|
|
347
|
-
|
|
369
|
+
disabled: !i,
|
|
370
|
+
children: /* @__PURE__ */ w("span", {
|
|
348
371
|
className: "flex flex-col",
|
|
349
|
-
children: [
|
|
372
|
+
children: [s.later, r || !i ? /* @__PURE__ */ C("span", {
|
|
350
373
|
className: "text-xs text-text-secondary",
|
|
351
|
-
children:
|
|
352
|
-
})]
|
|
374
|
+
children: r ? o("calendar.v2.evScopeLaterFirst", "This is the series’ first date, so every event changes.") : o("calendar.v2.evScopeLaterCount", "Not for a series that ends after a number of times yet. Change this event or every event.")
|
|
375
|
+
}) : null]
|
|
353
376
|
})
|
|
354
377
|
}),
|
|
355
|
-
/* @__PURE__ */
|
|
378
|
+
/* @__PURE__ */ C(k, {
|
|
356
379
|
value: "all",
|
|
357
|
-
children:
|
|
380
|
+
children: s.all
|
|
358
381
|
})
|
|
359
382
|
]
|
|
360
383
|
})
|
|
361
384
|
})] });
|
|
362
385
|
}
|
|
363
|
-
export {
|
|
386
|
+
export { U as EventDialog };
|
|
364
387
|
|
|
365
388
|
//# sourceMappingURL=EventDialog.js.map
|