@burdenoff/microfe-calendar 2026.525.3 → 2026.610.1
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/CalendarRoutes.js +1 -1
- package/dist/CalendarRoutes.js.map +1 -1
- package/dist/components/AgendaView.js +52 -42
- package/dist/components/AgendaView.js.map +1 -1
- package/dist/components/CalendarErrorState.js +40 -0
- package/dist/components/CalendarErrorState.js.map +1 -0
- package/dist/components/ConfirmDialog.js +3 -0
- package/dist/components/ConfirmDialog.js.map +1 -1
- package/dist/components/DayView.js +43 -32
- package/dist/components/DayView.js.map +1 -1
- package/dist/components/EventBlock.js +14 -26
- package/dist/components/EventBlock.js.map +1 -1
- package/dist/components/EventFormModal.js +464 -443
- package/dist/components/EventFormModal.js.map +1 -1
- package/dist/components/MiniCalendar.js +3 -0
- package/dist/components/MiniCalendar.js.map +1 -1
- package/dist/components/MonthView.js +37 -26
- package/dist/components/MonthView.js.map +1 -1
- package/dist/components/TimelineView.js +51 -35
- package/dist/components/TimelineView.js.map +1 -1
- package/dist/components/ViewSwitcher.js +1 -0
- package/dist/components/ViewSwitcher.js.map +1 -1
- package/dist/components/WeekView.js +54 -35
- package/dist/components/WeekView.js.map +1 -1
- package/dist/components/YearView.js +73 -51
- package/dist/components/YearView.js.map +1 -1
- package/dist/hooks/useEvents.js +23 -17
- package/dist/hooks/useEvents.js.map +1 -1
- package/dist/hooks/useOpenEvent.js +24 -0
- package/dist/hooks/useOpenEvent.js.map +1 -0
- package/dist/hooks/useSafePermissions.js +1 -9
- package/dist/hooks/useSafePermissions.js.map +1 -1
- package/dist/pages/CalendarPage.js +31 -14
- package/dist/pages/CalendarPage.js.map +1 -1
- package/dist/pages/EventDetailsPage.js +12 -3
- package/dist/pages/EventDetailsPage.js.map +1 -1
- package/dist/pages/ResourcesPage.js +192 -182
- package/dist/pages/ResourcesPage.js.map +1 -1
- package/dist/pages/SettingsPage.js +26 -10
- package/dist/pages/SettingsPage.js.map +1 -1
- package/dist/pages/SubscriptionsPage.js +2 -0
- package/dist/pages/SubscriptionsPage.js.map +1 -1
- package/dist/providers/CalendarProvider.js +1 -1
- package/dist/providers/CalendarProvider.js.map +1 -1
- package/dist/store/calendarStore.js +11 -4
- package/dist/store/calendarStore.js.map +1 -1
- package/dist/utils/dateHelpers.js +2 -5
- package/dist/utils/dateHelpers.js.map +1 -1
- package/package.json +3 -4
|
@@ -1,54 +1,59 @@
|
|
|
1
1
|
import { useCreateEventMutation as e, useGetCalendarsQuery as t, useUpdateEventMutation as n } from "../generated/wspace-operations.js";
|
|
2
|
-
import { useEffect as r,
|
|
2
|
+
import { useEffect as r, useMemo as i, useState as a } from "react";
|
|
3
3
|
import { useI18n as o } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
4
|
-
import { AlignLeft as s, Calendar as c, Clock as l, MapPin as u, Tag as d
|
|
5
|
-
import { jsx as
|
|
4
|
+
import { AlignLeft as s, Calendar as c, Clock as l, MapPin as u, Tag as d } from "lucide-react";
|
|
5
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
|
+
import { Button as m, OptionalFields as h, ResponsiveDialog as g, ResponsiveDialogContent as _, ResponsiveDialogFooter as v, ResponsiveDialogHeader as y, ResponsiveDialogTitle as b } from "@burdenoff/fe-libs/ui";
|
|
6
7
|
//#region src/components/EventFormModal.tsx
|
|
7
|
-
function
|
|
8
|
+
function x(e) {
|
|
8
9
|
return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
+
function S(e) {
|
|
11
12
|
return `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}`;
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
+
function C(e, t) {
|
|
14
15
|
return (/* @__PURE__ */ new Date(`${e}T${t}:00`)).toISOString();
|
|
15
16
|
}
|
|
16
|
-
var
|
|
17
|
-
let
|
|
18
|
-
let n =
|
|
17
|
+
var w = ({ open: w, event: T, defaultDate: E, defaultStartHour: D, onClose: O, onSuccess: k }) => {
|
|
18
|
+
let A = !!T, { t: j } = o(), M = (e, t) => {
|
|
19
|
+
let n = j(e);
|
|
19
20
|
return n === e ? t : n;
|
|
20
|
-
},
|
|
21
|
-
MEETING:
|
|
22
|
-
TASK:
|
|
23
|
-
MILESTONE:
|
|
24
|
-
PROMPT:
|
|
25
|
-
},
|
|
26
|
-
PUBLIC:
|
|
27
|
-
PRIVATE:
|
|
28
|
-
CONFIDENTIAL:
|
|
29
|
-
},
|
|
30
|
-
PHYSICAL:
|
|
31
|
-
ONLINE:
|
|
32
|
-
HYBRID:
|
|
33
|
-
TBD:
|
|
34
|
-
},
|
|
21
|
+
}, N = {
|
|
22
|
+
MEETING: M("calendar.meeting", "Meeting"),
|
|
23
|
+
TASK: M("calendar.task", "Task"),
|
|
24
|
+
MILESTONE: M("calendar.milestone", "Milestone"),
|
|
25
|
+
PROMPT: M("calendar.prompt", "Prompt")
|
|
26
|
+
}, P = {
|
|
27
|
+
PUBLIC: M("calendar.visibilityPublic", "Public"),
|
|
28
|
+
PRIVATE: M("calendar.visibilityPrivate", "Private"),
|
|
29
|
+
CONFIDENTIAL: M("calendar.visibilityConfidential", "Confidential")
|
|
30
|
+
}, F = {
|
|
31
|
+
PHYSICAL: M("calendar.locationPhysical", "Physical"),
|
|
32
|
+
ONLINE: M("calendar.locationOnline", "Online"),
|
|
33
|
+
HYBRID: M("calendar.locationHybrid", "Hybrid"),
|
|
34
|
+
TBD: M("calendar.locationTbd", "To be decided")
|
|
35
|
+
}, I = {
|
|
35
36
|
ZOOM: "Zoom",
|
|
36
37
|
GOOGLE_MEET: "Google Meet",
|
|
37
38
|
MICROSOFT_TEAMS: "Microsoft Teams",
|
|
38
39
|
WEBEX: "Webex",
|
|
39
|
-
CUSTOM:
|
|
40
|
-
}, { data:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
40
|
+
CUSTOM: M("calendar.customMeetingProvider", "Custom")
|
|
41
|
+
}, { data: L } = t({ variables: { pagination: { limit: 50 } } }), R = i(() => L?.calendars?.calendars ?? [], [L?.calendars?.calendars]), [z, { loading: B, error: V }] = e(), [H, { loading: U, error: W }] = n(), G = B || U, K = V || W, { defaultStart: q, defaultEnd: J } = i(() => {
|
|
42
|
+
let e = E ?? /* @__PURE__ */ new Date(), t = D ?? e.getHours() + 1, n = new Date(e);
|
|
43
|
+
n.setHours(t, 0, 0, 0);
|
|
44
|
+
let r = new Date(n);
|
|
45
|
+
return r.setHours(t + 1, 0, 0, 0), {
|
|
46
|
+
defaultStart: n,
|
|
47
|
+
defaultEnd: r
|
|
48
|
+
};
|
|
49
|
+
}, [E, D]), [Y, X] = a({
|
|
45
50
|
title: "",
|
|
46
51
|
description: "",
|
|
47
52
|
calendarId: "",
|
|
48
|
-
startDate:
|
|
49
|
-
startTime:
|
|
50
|
-
endDate:
|
|
51
|
-
endTime:
|
|
53
|
+
startDate: x(q),
|
|
54
|
+
startTime: S(q),
|
|
55
|
+
endDate: x(J),
|
|
56
|
+
endTime: S(J),
|
|
52
57
|
allDay: !1,
|
|
53
58
|
location: "",
|
|
54
59
|
locationAddress: "",
|
|
@@ -67,17 +72,17 @@ var v = ({ open: v, event: y, defaultDate: b, defaultStartHour: x, onClose: S, o
|
|
|
67
72
|
timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
68
73
|
});
|
|
69
74
|
r(() => {
|
|
70
|
-
if (
|
|
71
|
-
let e =
|
|
75
|
+
if (T) {
|
|
76
|
+
let e = T;
|
|
72
77
|
Promise.resolve().then(() => {
|
|
73
|
-
|
|
78
|
+
X({
|
|
74
79
|
title: e.title,
|
|
75
80
|
description: e.description ?? "",
|
|
76
81
|
calendarId: e.calendarId,
|
|
77
|
-
startDate:
|
|
78
|
-
startTime:
|
|
79
|
-
endDate:
|
|
80
|
-
endTime:
|
|
82
|
+
startDate: x(e.startTime),
|
|
83
|
+
startTime: S(e.startTime),
|
|
84
|
+
endDate: x(e.endTime),
|
|
85
|
+
endTime: S(e.endTime),
|
|
81
86
|
allDay: e.isAllDay,
|
|
82
87
|
location: e.location ?? "",
|
|
83
88
|
locationAddress: e.locationAddress ?? "",
|
|
@@ -97,9 +102,9 @@ var v = ({ open: v, event: y, defaultDate: b, defaultStartHour: x, onClose: S, o
|
|
|
97
102
|
});
|
|
98
103
|
});
|
|
99
104
|
} else {
|
|
100
|
-
let e =
|
|
105
|
+
let e = R.find((e) => e.isDefault) ?? R[0];
|
|
101
106
|
Promise.resolve().then(() => {
|
|
102
|
-
|
|
107
|
+
X((t) => ({
|
|
103
108
|
...t,
|
|
104
109
|
title: "",
|
|
105
110
|
description: "",
|
|
@@ -108,10 +113,10 @@ var v = ({ open: v, event: y, defaultDate: b, defaultStartHour: x, onClose: S, o
|
|
|
108
113
|
locationAddress: "",
|
|
109
114
|
locationUrl: "",
|
|
110
115
|
locationType: "PHYSICAL",
|
|
111
|
-
startDate:
|
|
112
|
-
startTime:
|
|
113
|
-
endDate:
|
|
114
|
-
endTime:
|
|
116
|
+
startDate: x(q),
|
|
117
|
+
startTime: S(q),
|
|
118
|
+
endDate: x(J),
|
|
119
|
+
endTime: S(J),
|
|
115
120
|
allDay: !1,
|
|
116
121
|
status: "CONFIRMED",
|
|
117
122
|
visibility: "PUBLIC",
|
|
@@ -125,421 +130,437 @@ var v = ({ open: v, event: y, defaultDate: b, defaultStartHour: x, onClose: S, o
|
|
|
125
130
|
}));
|
|
126
131
|
});
|
|
127
132
|
}
|
|
128
|
-
}, [
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
}, [
|
|
134
|
+
T,
|
|
135
|
+
R,
|
|
136
|
+
q,
|
|
137
|
+
J
|
|
138
|
+
]);
|
|
139
|
+
let Z = (e, t) => {
|
|
140
|
+
X((n) => ({
|
|
134
141
|
...n,
|
|
135
142
|
[e]: t
|
|
136
143
|
}));
|
|
137
144
|
};
|
|
138
|
-
return
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
location: K.location || void 0,
|
|
175
|
-
locationAddress: K.locationAddress || void 0,
|
|
176
|
-
locationUrl: K.locationUrl || void 0,
|
|
177
|
-
locationType: K.locationType,
|
|
178
|
-
startTime: t,
|
|
179
|
-
endTime: n,
|
|
180
|
-
allDay: K.allDay,
|
|
181
|
-
eventType: K.eventType,
|
|
182
|
-
status: K.status,
|
|
183
|
-
onlineMeetingProvider: K.onlineMeetingProvider,
|
|
184
|
-
onlineMeetingUrl: K.onlineMeetingUrl || void 0,
|
|
185
|
-
maxAttendees: K.maxAttendees ? parseInt(K.maxAttendees, 10) : void 0,
|
|
186
|
-
checkInEnabled: K.checkInEnabled,
|
|
187
|
-
isRecurring: K.isRecurring,
|
|
188
|
-
rrule: K.isRecurring && K.rrule.trim() ? K.rrule.trim() : void 0,
|
|
189
|
-
tags: K.tagsText.split(",").map((e) => e.trim()).filter(Boolean),
|
|
190
|
-
timezone: K.timezone
|
|
191
|
-
} } })).data?.createEvent.id;
|
|
192
|
-
e && K.visibility !== "PUBLIC" && await L({ variables: {
|
|
193
|
-
id: e,
|
|
194
|
-
input: { visibility: K.visibility }
|
|
145
|
+
return /* @__PURE__ */ f(g, {
|
|
146
|
+
open: w,
|
|
147
|
+
onOpenChange: (e) => {
|
|
148
|
+
e || O();
|
|
149
|
+
},
|
|
150
|
+
children: /* @__PURE__ */ p(_, {
|
|
151
|
+
className: "max-w-lg",
|
|
152
|
+
children: [/* @__PURE__ */ f(y, { children: /* @__PURE__ */ f(b, { children: A ? M("calendar.editEvent", "Edit Event") : M("calendar.createEvent", "Create Event") }) }), /* @__PURE__ */ p("form", {
|
|
153
|
+
onSubmit: async (e) => {
|
|
154
|
+
if (e.preventDefault(), !Y.title.trim()) return;
|
|
155
|
+
let t = Y.allDay ? (/* @__PURE__ */ new Date(`${Y.startDate}T00:00:00`)).toISOString() : C(Y.startDate, Y.startTime), n = Y.allDay ? (/* @__PURE__ */ new Date(`${Y.endDate}T23:59:59`)).toISOString() : C(Y.endDate, Y.endTime);
|
|
156
|
+
if (A && T) await H({ variables: {
|
|
157
|
+
id: T.id,
|
|
158
|
+
input: {
|
|
159
|
+
title: Y.title,
|
|
160
|
+
description: Y.description || void 0,
|
|
161
|
+
location: Y.location || void 0,
|
|
162
|
+
locationAddress: Y.locationAddress || void 0,
|
|
163
|
+
locationUrl: Y.locationUrl || void 0,
|
|
164
|
+
locationType: Y.locationType,
|
|
165
|
+
startTime: t,
|
|
166
|
+
endTime: n,
|
|
167
|
+
allDay: Y.allDay,
|
|
168
|
+
status: Y.status,
|
|
169
|
+
visibility: Y.visibility,
|
|
170
|
+
onlineMeetingProvider: Y.onlineMeetingProvider,
|
|
171
|
+
onlineMeetingUrl: Y.onlineMeetingUrl || void 0,
|
|
172
|
+
maxAttendees: Y.maxAttendees ? parseInt(Y.maxAttendees, 10) : void 0,
|
|
173
|
+
checkInEnabled: Y.checkInEnabled,
|
|
174
|
+
tags: Y.tagsText.split(",").flatMap((e) => {
|
|
175
|
+
let t = e.trim();
|
|
176
|
+
return t ? [t] : [];
|
|
177
|
+
}),
|
|
178
|
+
rrule: Y.isRecurring && Y.rrule.trim() ? Y.rrule.trim() : void 0,
|
|
179
|
+
timezone: Y.timezone
|
|
180
|
+
}
|
|
195
181
|
} });
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
})
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
243
|
-
})] }),
|
|
244
|
-
!T && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
|
|
245
|
-
htmlFor: "event-calendar",
|
|
246
|
-
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
247
|
-
children: [/* @__PURE__ */ p(c, { className: "size-4 text-text-secondary" }), D("calendar.calendar", "Calendar")]
|
|
248
|
-
}), /* @__PURE__ */ m("select", {
|
|
249
|
-
id: "event-calendar",
|
|
250
|
-
value: K.calendarId,
|
|
251
|
-
onChange: (e) => J("calendarId", e.target.value),
|
|
252
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
253
|
-
children: [/* @__PURE__ */ p("option", {
|
|
254
|
-
value: "",
|
|
255
|
-
children: D("calendar.selectCalendar", "Select calendar")
|
|
256
|
-
}), N.map((e) => /* @__PURE__ */ p("option", {
|
|
257
|
-
value: e.id,
|
|
258
|
-
children: e.name
|
|
259
|
-
}, e.id))]
|
|
260
|
-
})] }),
|
|
261
|
-
!T && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
|
|
262
|
-
htmlFor: "event-type",
|
|
263
|
-
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
264
|
-
children: [/* @__PURE__ */ p(d, { className: "size-4 text-text-secondary" }), D("calendar.eventType", "Event Type")]
|
|
265
|
-
}), /* @__PURE__ */ m("select", {
|
|
266
|
-
id: "event-type",
|
|
267
|
-
value: K.eventType,
|
|
268
|
-
onChange: (e) => J("eventType", e.target.value),
|
|
269
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
270
|
-
children: [
|
|
271
|
-
/* @__PURE__ */ p("option", {
|
|
272
|
-
value: "MEETING",
|
|
273
|
-
children: O.MEETING
|
|
274
|
-
}),
|
|
275
|
-
/* @__PURE__ */ p("option", {
|
|
276
|
-
value: "TASK",
|
|
277
|
-
children: O.TASK
|
|
278
|
-
}),
|
|
279
|
-
/* @__PURE__ */ p("option", {
|
|
280
|
-
value: "MILESTONE",
|
|
281
|
-
children: O.MILESTONE
|
|
282
|
-
}),
|
|
283
|
-
/* @__PURE__ */ p("option", {
|
|
284
|
-
value: "PROMPT",
|
|
285
|
-
children: O.PROMPT
|
|
286
|
-
})
|
|
287
|
-
]
|
|
288
|
-
})] }),
|
|
289
|
-
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
|
|
290
|
-
htmlFor: "event-visibility",
|
|
291
|
-
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
292
|
-
children: [/* @__PURE__ */ p(d, { className: "size-4 text-text-secondary" }), D("calendar.visibility", "Visibility")]
|
|
293
|
-
}), /* @__PURE__ */ p("select", {
|
|
294
|
-
id: "event-visibility",
|
|
295
|
-
value: K.visibility,
|
|
296
|
-
onChange: (e) => J("visibility", e.target.value),
|
|
297
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
298
|
-
children: Object.entries(k).map(([e, t]) => /* @__PURE__ */ p("option", {
|
|
299
|
-
value: e,
|
|
300
|
-
children: t
|
|
301
|
-
}, e))
|
|
302
|
-
})] }),
|
|
303
|
-
/* @__PURE__ */ m("div", {
|
|
304
|
-
className: "flex items-center gap-3",
|
|
305
|
-
children: [/* @__PURE__ */ p("input", {
|
|
306
|
-
id: "event-allday",
|
|
307
|
-
type: "checkbox",
|
|
308
|
-
checked: K.allDay,
|
|
309
|
-
onChange: (e) => J("allDay", e.target.checked),
|
|
310
|
-
className: "size-4 rounded border-border-default"
|
|
311
|
-
}), /* @__PURE__ */ p("label", {
|
|
312
|
-
htmlFor: "event-allday",
|
|
313
|
-
className: "font-text-sm text-text-primary",
|
|
314
|
-
children: D("calendar.allDayEvent", "All day event")
|
|
315
|
-
})]
|
|
316
|
-
}),
|
|
317
|
-
/* @__PURE__ */ m("div", {
|
|
318
|
-
className: "grid grid-cols-2 gap-3",
|
|
319
|
-
children: [/* @__PURE__ */ m("div", { children: [
|
|
320
|
-
/* @__PURE__ */ m("label", {
|
|
321
|
-
htmlFor: "event-start-date",
|
|
322
|
-
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
323
|
-
children: [/* @__PURE__ */ p(l, { className: "size-4 text-text-secondary" }), D("calendar.start", "Start")]
|
|
324
|
-
}),
|
|
325
|
-
/* @__PURE__ */ p("input", {
|
|
326
|
-
id: "event-start-date",
|
|
327
|
-
type: "date",
|
|
328
|
-
value: K.startDate,
|
|
329
|
-
onChange: (e) => J("startDate", e.target.value),
|
|
330
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
331
|
-
}),
|
|
332
|
-
!K.allDay && /* @__PURE__ */ p("input", {
|
|
333
|
-
type: "time",
|
|
334
|
-
value: K.startTime,
|
|
335
|
-
onChange: (e) => J("startTime", e.target.value),
|
|
336
|
-
className: "w-full mt-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
337
|
-
})
|
|
338
|
-
] }), /* @__PURE__ */ m("div", { children: [
|
|
339
|
-
/* @__PURE__ */ p("label", {
|
|
340
|
-
htmlFor: "event-end-date",
|
|
341
|
-
className: "font-text-sm font-weight-medium text-text-primary mb-1 block",
|
|
342
|
-
children: D("calendar.end", "End")
|
|
343
|
-
}),
|
|
344
|
-
/* @__PURE__ */ p("input", {
|
|
345
|
-
id: "event-end-date",
|
|
346
|
-
type: "date",
|
|
347
|
-
value: K.endDate,
|
|
348
|
-
onChange: (e) => J("endDate", e.target.value),
|
|
349
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
350
|
-
}),
|
|
351
|
-
!K.allDay && /* @__PURE__ */ p("input", {
|
|
352
|
-
type: "time",
|
|
353
|
-
value: K.endTime,
|
|
354
|
-
onChange: (e) => J("endTime", e.target.value),
|
|
355
|
-
className: "w-full mt-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
356
|
-
})
|
|
357
|
-
] })]
|
|
358
|
-
}),
|
|
359
|
-
/* @__PURE__ */ m("div", {
|
|
360
|
-
className: "space-y-3",
|
|
361
|
-
children: [
|
|
362
|
-
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
|
|
363
|
-
htmlFor: "event-location",
|
|
364
|
-
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
365
|
-
children: [/* @__PURE__ */ p(u, { className: "size-4 text-text-secondary" }), D("calendar.location", "Location")]
|
|
366
|
-
}), /* @__PURE__ */ p("input", {
|
|
367
|
-
id: "event-location",
|
|
368
|
-
type: "text",
|
|
369
|
-
value: K.location,
|
|
370
|
-
onChange: (e) => J("location", e.target.value),
|
|
371
|
-
placeholder: D("calendar.addLocation", "Add location"),
|
|
372
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
373
|
-
})] }),
|
|
374
|
-
/* @__PURE__ */ m("div", {
|
|
375
|
-
className: "grid grid-cols-1 gap-3 @md:grid-cols-2",
|
|
376
|
-
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
377
|
-
htmlFor: "event-location-type",
|
|
378
|
-
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
379
|
-
children: D("calendar.locationType", "Location type")
|
|
380
|
-
}), /* @__PURE__ */ p("select", {
|
|
381
|
-
id: "event-location-type",
|
|
382
|
-
value: K.locationType,
|
|
383
|
-
onChange: (e) => J("locationType", e.target.value),
|
|
384
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
385
|
-
children: Object.entries(A).map(([e, t]) => /* @__PURE__ */ p("option", {
|
|
386
|
-
value: e,
|
|
387
|
-
children: t
|
|
388
|
-
}, e))
|
|
389
|
-
})] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
390
|
-
htmlFor: "event-max-attendees",
|
|
391
|
-
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
392
|
-
children: D("calendar.maxAttendees", "Max attendees")
|
|
393
|
-
}), /* @__PURE__ */ p("input", {
|
|
394
|
-
id: "event-max-attendees",
|
|
395
|
-
type: "number",
|
|
396
|
-
min: "1",
|
|
397
|
-
value: K.maxAttendees,
|
|
398
|
-
onChange: (e) => J("maxAttendees", e.target.value),
|
|
399
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
400
|
-
})] })]
|
|
401
|
-
}),
|
|
402
|
-
/* @__PURE__ */ p("input", {
|
|
403
|
-
type: "text",
|
|
404
|
-
value: K.locationAddress,
|
|
405
|
-
onChange: (e) => J("locationAddress", e.target.value),
|
|
406
|
-
placeholder: D("calendar.locationAddress", "Location address or room details"),
|
|
407
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
408
|
-
}),
|
|
409
|
-
/* @__PURE__ */ p("input", {
|
|
410
|
-
type: "url",
|
|
411
|
-
value: K.locationUrl,
|
|
412
|
-
onChange: (e) => J("locationUrl", e.target.value),
|
|
413
|
-
placeholder: D("calendar.locationUrl", "Location URL"),
|
|
414
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
415
|
-
})
|
|
416
|
-
]
|
|
417
|
-
}),
|
|
418
|
-
/* @__PURE__ */ m("div", {
|
|
419
|
-
className: "grid grid-cols-1 gap-3 @md:grid-cols-2",
|
|
420
|
-
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
421
|
-
htmlFor: "event-meeting-provider",
|
|
182
|
+
else {
|
|
183
|
+
let e = (await z({ variables: { input: {
|
|
184
|
+
title: Y.title,
|
|
185
|
+
description: Y.description || void 0,
|
|
186
|
+
calendarId: Y.calendarId,
|
|
187
|
+
location: Y.location || void 0,
|
|
188
|
+
locationAddress: Y.locationAddress || void 0,
|
|
189
|
+
locationUrl: Y.locationUrl || void 0,
|
|
190
|
+
locationType: Y.locationType,
|
|
191
|
+
startTime: t,
|
|
192
|
+
endTime: n,
|
|
193
|
+
allDay: Y.allDay,
|
|
194
|
+
eventType: Y.eventType,
|
|
195
|
+
status: Y.status,
|
|
196
|
+
onlineMeetingProvider: Y.onlineMeetingProvider,
|
|
197
|
+
onlineMeetingUrl: Y.onlineMeetingUrl || void 0,
|
|
198
|
+
maxAttendees: Y.maxAttendees ? parseInt(Y.maxAttendees, 10) : void 0,
|
|
199
|
+
checkInEnabled: Y.checkInEnabled,
|
|
200
|
+
isRecurring: Y.isRecurring,
|
|
201
|
+
rrule: Y.isRecurring && Y.rrule.trim() ? Y.rrule.trim() : void 0,
|
|
202
|
+
tags: Y.tagsText.split(",").flatMap((e) => {
|
|
203
|
+
let t = e.trim();
|
|
204
|
+
return t ? [t] : [];
|
|
205
|
+
}),
|
|
206
|
+
timezone: Y.timezone
|
|
207
|
+
} } })).data?.createEvent.id;
|
|
208
|
+
e && Y.visibility !== "PUBLIC" && await H({ variables: {
|
|
209
|
+
id: e,
|
|
210
|
+
input: { visibility: Y.visibility }
|
|
211
|
+
} });
|
|
212
|
+
}
|
|
213
|
+
k?.(), O();
|
|
214
|
+
},
|
|
215
|
+
children: [
|
|
216
|
+
K && /* @__PURE__ */ f("div", {
|
|
217
|
+
className: "mb-4 p-3 rounded-radius-md bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800",
|
|
218
|
+
children: /* @__PURE__ */ f("p", {
|
|
219
|
+
className: "font-text-sm text-red-700 dark:text-red-300",
|
|
220
|
+
children: K.message
|
|
221
|
+
})
|
|
222
|
+
}),
|
|
223
|
+
/* @__PURE__ */ p("div", {
|
|
224
|
+
className: "space-y-4",
|
|
225
|
+
children: [
|
|
226
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
227
|
+
htmlFor: "event-title",
|
|
422
228
|
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
423
|
-
children:
|
|
229
|
+
children: [
|
|
230
|
+
M("calendar.title", "Title"),
|
|
231
|
+
" ",
|
|
232
|
+
/* @__PURE__ */ f("span", {
|
|
233
|
+
className: "text-red-500",
|
|
234
|
+
children: "*"
|
|
235
|
+
})
|
|
236
|
+
]
|
|
237
|
+
}), /* @__PURE__ */ f("input", {
|
|
238
|
+
id: "event-title",
|
|
239
|
+
type: "text",
|
|
240
|
+
required: !0,
|
|
241
|
+
value: Y.title,
|
|
242
|
+
onChange: (e) => Z("title", e.target.value),
|
|
243
|
+
placeholder: M("calendar.addTitle", "Add title"),
|
|
244
|
+
"aria-label": M("calendar.title", "Title"),
|
|
245
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
246
|
+
})] }),
|
|
247
|
+
!A && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
248
|
+
htmlFor: "event-calendar",
|
|
249
|
+
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
250
|
+
children: [/* @__PURE__ */ f(c, { className: "size-4 text-text-secondary" }), M("calendar.calendar", "Calendar")]
|
|
424
251
|
}), /* @__PURE__ */ p("select", {
|
|
425
|
-
id: "event-
|
|
426
|
-
value:
|
|
427
|
-
onChange: (e) =>
|
|
252
|
+
id: "event-calendar",
|
|
253
|
+
value: Y.calendarId,
|
|
254
|
+
onChange: (e) => Z("calendarId", e.target.value),
|
|
428
255
|
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
429
|
-
children:
|
|
256
|
+
children: [/* @__PURE__ */ f("option", {
|
|
257
|
+
value: "",
|
|
258
|
+
children: M("calendar.selectCalendar", "Select calendar")
|
|
259
|
+
}), R.map((e) => /* @__PURE__ */ f("option", {
|
|
260
|
+
value: e.id,
|
|
261
|
+
children: e.name
|
|
262
|
+
}, e.id))]
|
|
263
|
+
})] }),
|
|
264
|
+
!A && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
265
|
+
htmlFor: "event-type",
|
|
266
|
+
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
267
|
+
children: [/* @__PURE__ */ f(d, { className: "size-4 text-text-secondary" }), M("calendar.eventType", "Event Type")]
|
|
268
|
+
}), /* @__PURE__ */ p("select", {
|
|
269
|
+
id: "event-type",
|
|
270
|
+
value: Y.eventType,
|
|
271
|
+
onChange: (e) => Z("eventType", e.target.value),
|
|
272
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
273
|
+
children: [
|
|
274
|
+
/* @__PURE__ */ f("option", {
|
|
275
|
+
value: "MEETING",
|
|
276
|
+
children: N.MEETING
|
|
277
|
+
}),
|
|
278
|
+
/* @__PURE__ */ f("option", {
|
|
279
|
+
value: "TASK",
|
|
280
|
+
children: N.TASK
|
|
281
|
+
}),
|
|
282
|
+
/* @__PURE__ */ f("option", {
|
|
283
|
+
value: "MILESTONE",
|
|
284
|
+
children: N.MILESTONE
|
|
285
|
+
}),
|
|
286
|
+
/* @__PURE__ */ f("option", {
|
|
287
|
+
value: "PROMPT",
|
|
288
|
+
children: N.PROMPT
|
|
289
|
+
})
|
|
290
|
+
]
|
|
291
|
+
})] }),
|
|
292
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
293
|
+
htmlFor: "event-visibility",
|
|
294
|
+
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
295
|
+
children: [/* @__PURE__ */ f(d, { className: "size-4 text-text-secondary" }), M("calendar.visibility", "Visibility")]
|
|
296
|
+
}), /* @__PURE__ */ f("select", {
|
|
297
|
+
id: "event-visibility",
|
|
298
|
+
value: Y.visibility,
|
|
299
|
+
onChange: (e) => Z("visibility", e.target.value),
|
|
300
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
301
|
+
children: Object.entries(P).map(([e, t]) => /* @__PURE__ */ f("option", {
|
|
430
302
|
value: e,
|
|
431
303
|
children: t
|
|
432
304
|
}, e))
|
|
433
|
-
})] }),
|
|
434
|
-
|
|
435
|
-
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
436
|
-
children: D("calendar.meetingUrl", "Meeting URL")
|
|
437
|
-
}), /* @__PURE__ */ p("input", {
|
|
438
|
-
id: "event-meeting-url",
|
|
439
|
-
type: "url",
|
|
440
|
-
value: K.onlineMeetingUrl,
|
|
441
|
-
onChange: (e) => J("onlineMeetingUrl", e.target.value),
|
|
442
|
-
placeholder: D("calendar.addMeetingLink", "Add meeting link"),
|
|
443
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
444
|
-
})] })]
|
|
445
|
-
}),
|
|
446
|
-
/* @__PURE__ */ m("div", { children: [
|
|
447
|
-
/* @__PURE__ */ m("label", {
|
|
448
|
-
htmlFor: "event-description",
|
|
449
|
-
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
450
|
-
children: [/* @__PURE__ */ p(s, { className: "size-4 text-text-secondary" }), D("calendar.description", "Description")]
|
|
451
|
-
}),
|
|
452
|
-
/* @__PURE__ */ p("textarea", {
|
|
453
|
-
id: "event-description",
|
|
454
|
-
value: K.description,
|
|
455
|
-
onChange: (e) => J("description", e.target.value),
|
|
456
|
-
placeholder: D("calendar.addDescription", "Add markdown notes or event description"),
|
|
457
|
-
rows: 4,
|
|
458
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border resize-none"
|
|
459
|
-
}),
|
|
460
|
-
/* @__PURE__ */ p("p", {
|
|
461
|
-
className: "mt-1 font-text-xs text-text-tertiary",
|
|
462
|
-
children: D("calendar.descriptionMarkdownHint", "Supports markdown-style notes and formatting text.")
|
|
463
|
-
})
|
|
464
|
-
] }),
|
|
465
|
-
/* @__PURE__ */ m("div", {
|
|
466
|
-
className: "grid grid-cols-1 gap-3 @md:grid-cols-2",
|
|
467
|
-
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
468
|
-
htmlFor: "event-tags",
|
|
469
|
-
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
470
|
-
children: D("calendar.tags", "Tags")
|
|
471
|
-
}), /* @__PURE__ */ p("input", {
|
|
472
|
-
id: "event-tags",
|
|
473
|
-
type: "text",
|
|
474
|
-
value: K.tagsText,
|
|
475
|
-
onChange: (e) => J("tagsText", e.target.value),
|
|
476
|
-
placeholder: D("calendar.tagsPlaceholder", "e.g. planning, roadmap, leadership"),
|
|
477
|
-
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
478
|
-
})] }), /* @__PURE__ */ m("div", {
|
|
479
|
-
className: "flex items-center gap-3 self-end",
|
|
480
|
-
children: [/* @__PURE__ */ p("input", {
|
|
481
|
-
id: "event-checkin-enabled",
|
|
482
|
-
type: "checkbox",
|
|
483
|
-
checked: K.checkInEnabled,
|
|
484
|
-
onChange: (e) => J("checkInEnabled", e.target.checked),
|
|
485
|
-
className: "size-4 rounded border-border-default"
|
|
486
|
-
}), /* @__PURE__ */ p("label", {
|
|
487
|
-
htmlFor: "event-checkin-enabled",
|
|
488
|
-
className: "font-text-sm text-text-primary",
|
|
489
|
-
children: D("calendar.enableCheckIn", "Enable attendee check-in")
|
|
490
|
-
})]
|
|
491
|
-
})]
|
|
492
|
-
}),
|
|
493
|
-
/* @__PURE__ */ m("div", {
|
|
494
|
-
className: "space-y-3 rounded-radius-md border border-border-subtle p-3 bg-bg-canvas",
|
|
495
|
-
children: [/* @__PURE__ */ m("div", {
|
|
305
|
+
})] }),
|
|
306
|
+
/* @__PURE__ */ p("div", {
|
|
496
307
|
className: "flex items-center gap-3",
|
|
497
|
-
children: [/* @__PURE__ */
|
|
498
|
-
id: "event-
|
|
308
|
+
children: [/* @__PURE__ */ f("input", {
|
|
309
|
+
id: "event-allday",
|
|
499
310
|
type: "checkbox",
|
|
500
|
-
checked:
|
|
501
|
-
onChange: (e) =>
|
|
502
|
-
className: "size-4 rounded border-border-default"
|
|
503
|
-
|
|
504
|
-
|
|
311
|
+
checked: Y.allDay,
|
|
312
|
+
onChange: (e) => Z("allDay", e.target.checked),
|
|
313
|
+
className: "size-4 rounded border-border-default",
|
|
314
|
+
"aria-label": M("calendar.allDayEvent", "All day event")
|
|
315
|
+
}), /* @__PURE__ */ f("label", {
|
|
316
|
+
htmlFor: "event-allday",
|
|
505
317
|
className: "font-text-sm text-text-primary",
|
|
506
|
-
children:
|
|
318
|
+
children: M("calendar.allDayEvent", "All day event")
|
|
507
319
|
})]
|
|
508
|
-
}),
|
|
509
|
-
|
|
510
|
-
className: "
|
|
511
|
-
children:
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
320
|
+
}),
|
|
321
|
+
/* @__PURE__ */ p("div", {
|
|
322
|
+
className: "grid grid-cols-2 gap-3",
|
|
323
|
+
children: [/* @__PURE__ */ p("div", { children: [
|
|
324
|
+
/* @__PURE__ */ p("label", {
|
|
325
|
+
htmlFor: "event-start-date",
|
|
326
|
+
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
327
|
+
children: [/* @__PURE__ */ f(l, { className: "size-4 text-text-secondary" }), M("calendar.start", "Start")]
|
|
328
|
+
}),
|
|
329
|
+
/* @__PURE__ */ f("input", {
|
|
330
|
+
id: "event-start-date",
|
|
331
|
+
type: "date",
|
|
332
|
+
value: Y.startDate,
|
|
333
|
+
onChange: (e) => Z("startDate", e.target.value),
|
|
334
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
335
|
+
"aria-label": M("calendar.start", "Start")
|
|
336
|
+
}),
|
|
337
|
+
!Y.allDay && /* @__PURE__ */ f("input", {
|
|
338
|
+
type: "time",
|
|
339
|
+
value: Y.startTime,
|
|
340
|
+
onChange: (e) => Z("startTime", e.target.value),
|
|
341
|
+
className: "w-full mt-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
342
|
+
"aria-label": M("calendar.startTime", "Start time")
|
|
343
|
+
})
|
|
344
|
+
] }), /* @__PURE__ */ p("div", { children: [
|
|
345
|
+
/* @__PURE__ */ f("label", {
|
|
346
|
+
htmlFor: "event-end-date",
|
|
347
|
+
className: "font-text-sm font-weight-medium text-text-primary mb-1 block",
|
|
348
|
+
children: M("calendar.end", "End")
|
|
349
|
+
}),
|
|
350
|
+
/* @__PURE__ */ f("input", {
|
|
351
|
+
id: "event-end-date",
|
|
352
|
+
type: "date",
|
|
353
|
+
value: Y.endDate,
|
|
354
|
+
onChange: (e) => Z("endDate", e.target.value),
|
|
355
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
356
|
+
"aria-label": M("calendar.end", "End")
|
|
357
|
+
}),
|
|
358
|
+
!Y.allDay && /* @__PURE__ */ f("input", {
|
|
359
|
+
type: "time",
|
|
360
|
+
value: Y.endTime,
|
|
361
|
+
onChange: (e) => Z("endTime", e.target.value),
|
|
362
|
+
className: "w-full mt-2 px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
363
|
+
"aria-label": M("calendar.endTime", "End time")
|
|
364
|
+
})
|
|
365
|
+
] })]
|
|
366
|
+
}),
|
|
367
|
+
/* @__PURE__ */ p("div", {
|
|
368
|
+
className: "space-y-3",
|
|
369
|
+
children: [
|
|
370
|
+
/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ p("label", {
|
|
371
|
+
htmlFor: "event-location",
|
|
372
|
+
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
373
|
+
children: [/* @__PURE__ */ f(u, { className: "size-4 text-text-secondary" }), M("calendar.location", "Location")]
|
|
374
|
+
}), /* @__PURE__ */ f("input", {
|
|
375
|
+
id: "event-location",
|
|
376
|
+
type: "text",
|
|
377
|
+
value: Y.location,
|
|
378
|
+
onChange: (e) => Z("location", e.target.value),
|
|
379
|
+
placeholder: M("calendar.addLocation", "Add location"),
|
|
380
|
+
"aria-label": M("calendar.location", "Location"),
|
|
381
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
382
|
+
})] }),
|
|
383
|
+
/* @__PURE__ */ p("div", {
|
|
384
|
+
className: "grid grid-cols-1 gap-3 @md:grid-cols-2",
|
|
385
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
386
|
+
htmlFor: "event-location-type",
|
|
387
|
+
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
388
|
+
children: M("calendar.locationType", "Location type")
|
|
389
|
+
}), /* @__PURE__ */ f("select", {
|
|
390
|
+
id: "event-location-type",
|
|
391
|
+
value: Y.locationType,
|
|
392
|
+
onChange: (e) => Z("locationType", e.target.value),
|
|
393
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
394
|
+
children: Object.entries(F).map(([e, t]) => /* @__PURE__ */ f("option", {
|
|
395
|
+
value: e,
|
|
396
|
+
children: t
|
|
397
|
+
}, e))
|
|
398
|
+
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
399
|
+
htmlFor: "event-max-attendees",
|
|
400
|
+
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
401
|
+
children: M("calendar.maxAttendees", "Max attendees")
|
|
402
|
+
}), /* @__PURE__ */ f("input", {
|
|
403
|
+
id: "event-max-attendees",
|
|
404
|
+
type: "number",
|
|
405
|
+
min: "1",
|
|
406
|
+
value: Y.maxAttendees,
|
|
407
|
+
onChange: (e) => Z("maxAttendees", e.target.value),
|
|
408
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
409
|
+
"aria-label": M("calendar.maxAttendees", "Max attendees")
|
|
410
|
+
})] })]
|
|
411
|
+
}),
|
|
412
|
+
/* @__PURE__ */ f("input", {
|
|
413
|
+
type: "text",
|
|
414
|
+
value: Y.locationAddress,
|
|
415
|
+
onChange: (e) => Z("locationAddress", e.target.value),
|
|
416
|
+
placeholder: M("calendar.locationAddress", "Location address or room details"),
|
|
417
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
418
|
+
"aria-label": M("calendar.locationAddress", "Location address or room details")
|
|
419
|
+
}),
|
|
420
|
+
/* @__PURE__ */ f("input", {
|
|
421
|
+
type: "url",
|
|
422
|
+
value: Y.locationUrl,
|
|
423
|
+
onChange: (e) => Z("locationUrl", e.target.value),
|
|
424
|
+
placeholder: M("calendar.locationUrl", "Location URL"),
|
|
425
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
426
|
+
"aria-label": M("calendar.locationUrl", "Location URL")
|
|
427
|
+
})
|
|
428
|
+
]
|
|
429
|
+
}),
|
|
430
|
+
/* @__PURE__ */ p(h, {
|
|
431
|
+
title: M("calendar.advancedTitle", "Advanced"),
|
|
432
|
+
description: M("calendar.advancedDescription", "Meeting provider, recurrence, timezone and other options"),
|
|
433
|
+
children: [
|
|
434
|
+
/* @__PURE__ */ p("div", {
|
|
435
|
+
className: "grid grid-cols-1 gap-3 @md:grid-cols-2",
|
|
436
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
437
|
+
htmlFor: "event-meeting-provider",
|
|
438
|
+
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
439
|
+
children: M("calendar.meetingProvider", "Meeting provider")
|
|
440
|
+
}), /* @__PURE__ */ f("select", {
|
|
441
|
+
id: "event-meeting-provider",
|
|
442
|
+
value: Y.onlineMeetingProvider,
|
|
443
|
+
onChange: (e) => Z("onlineMeetingProvider", e.target.value),
|
|
444
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
|
|
445
|
+
children: Object.entries(I).map(([e, t]) => /* @__PURE__ */ f("option", {
|
|
446
|
+
value: e,
|
|
447
|
+
children: t
|
|
448
|
+
}, e))
|
|
449
|
+
})] }), /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
450
|
+
htmlFor: "event-meeting-url",
|
|
451
|
+
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
452
|
+
children: M("calendar.meetingUrl", "Meeting URL")
|
|
453
|
+
}), /* @__PURE__ */ f("input", {
|
|
454
|
+
id: "event-meeting-url",
|
|
455
|
+
type: "url",
|
|
456
|
+
value: Y.onlineMeetingUrl,
|
|
457
|
+
onChange: (e) => Z("onlineMeetingUrl", e.target.value),
|
|
458
|
+
placeholder: M("calendar.addMeetingLink", "Add meeting link"),
|
|
459
|
+
"aria-label": M("calendar.meetingUrl", "Meeting URL"),
|
|
460
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
461
|
+
})] })]
|
|
462
|
+
}),
|
|
463
|
+
/* @__PURE__ */ p("div", { children: [
|
|
464
|
+
/* @__PURE__ */ p("label", {
|
|
465
|
+
htmlFor: "event-description",
|
|
466
|
+
className: "flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1",
|
|
467
|
+
children: [/* @__PURE__ */ f(s, { className: "size-4 text-text-secondary" }), M("calendar.description", "Description")]
|
|
468
|
+
}),
|
|
469
|
+
/* @__PURE__ */ f("textarea", {
|
|
470
|
+
id: "event-description",
|
|
471
|
+
value: Y.description,
|
|
472
|
+
onChange: (e) => Z("description", e.target.value),
|
|
473
|
+
placeholder: M("calendar.addDescription", "Add markdown notes or event description"),
|
|
474
|
+
rows: 4,
|
|
475
|
+
"aria-label": M("calendar.description", "Description"),
|
|
476
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border resize-none"
|
|
477
|
+
}),
|
|
478
|
+
/* @__PURE__ */ f("p", {
|
|
479
|
+
className: "mt-1 font-text-xs text-text-tertiary",
|
|
480
|
+
children: M("calendar.descriptionMarkdownHint", "Supports markdown-style notes and formatting text.")
|
|
481
|
+
})
|
|
482
|
+
] }),
|
|
483
|
+
/* @__PURE__ */ p("div", {
|
|
484
|
+
className: "grid grid-cols-1 gap-3 @md:grid-cols-2",
|
|
485
|
+
children: [/* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
486
|
+
htmlFor: "event-tags",
|
|
487
|
+
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
488
|
+
children: M("calendar.tags", "Tags")
|
|
489
|
+
}), /* @__PURE__ */ f("input", {
|
|
490
|
+
id: "event-tags",
|
|
491
|
+
type: "text",
|
|
492
|
+
value: Y.tagsText,
|
|
493
|
+
onChange: (e) => Z("tagsText", e.target.value),
|
|
494
|
+
placeholder: M("calendar.tagsPlaceholder", "e.g. planning, roadmap, leadership"),
|
|
495
|
+
"aria-label": M("calendar.tags", "Tags"),
|
|
496
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
497
|
+
})] }), /* @__PURE__ */ p("div", {
|
|
498
|
+
className: "flex items-center gap-3 self-end",
|
|
499
|
+
children: [/* @__PURE__ */ f("input", {
|
|
500
|
+
id: "event-checkin-enabled",
|
|
501
|
+
type: "checkbox",
|
|
502
|
+
checked: Y.checkInEnabled,
|
|
503
|
+
onChange: (e) => Z("checkInEnabled", e.target.checked),
|
|
504
|
+
className: "size-4 rounded border-border-default",
|
|
505
|
+
"aria-label": M("calendar.enableCheckIn", "Enable attendee check-in")
|
|
506
|
+
}), /* @__PURE__ */ f("label", {
|
|
507
|
+
htmlFor: "event-checkin-enabled",
|
|
508
|
+
className: "font-text-sm text-text-primary",
|
|
509
|
+
children: M("calendar.enableCheckIn", "Enable attendee check-in")
|
|
510
|
+
})]
|
|
511
|
+
})]
|
|
512
|
+
}),
|
|
513
|
+
/* @__PURE__ */ p("div", {
|
|
514
|
+
className: "space-y-3 rounded-radius-md border border-border-subtle p-3 bg-bg-canvas",
|
|
515
|
+
children: [/* @__PURE__ */ p("div", {
|
|
516
|
+
className: "flex items-center gap-3",
|
|
517
|
+
children: [/* @__PURE__ */ f("input", {
|
|
518
|
+
id: "event-recurring",
|
|
519
|
+
type: "checkbox",
|
|
520
|
+
checked: Y.isRecurring,
|
|
521
|
+
onChange: (e) => Z("isRecurring", e.target.checked),
|
|
522
|
+
className: "size-4 rounded border-border-default",
|
|
523
|
+
"aria-label": M("calendar.recurringEvent", "Recurring event")
|
|
524
|
+
}), /* @__PURE__ */ f("label", {
|
|
525
|
+
htmlFor: "event-recurring",
|
|
526
|
+
className: "font-text-sm text-text-primary",
|
|
527
|
+
children: M("calendar.recurringEvent", "Recurring event")
|
|
528
|
+
})]
|
|
529
|
+
}), Y.isRecurring && /* @__PURE__ */ p("div", { children: [/* @__PURE__ */ f("label", {
|
|
530
|
+
htmlFor: "event-rrule",
|
|
531
|
+
className: "block font-text-sm font-weight-medium text-text-primary mb-1",
|
|
532
|
+
children: M("calendar.rrule", "Recurrence rule (RRULE)")
|
|
533
|
+
}), /* @__PURE__ */ f("input", {
|
|
534
|
+
id: "event-rrule",
|
|
535
|
+
type: "text",
|
|
536
|
+
value: Y.rrule,
|
|
537
|
+
onChange: (e) => Z("rrule", e.target.value),
|
|
538
|
+
"aria-label": M("calendar.rrule", "Recurrence rule (RRULE)"),
|
|
539
|
+
placeholder: M("calendar.rrulePlaceholder", "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;INTERVAL=1"),
|
|
540
|
+
className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
|
|
541
|
+
})] })]
|
|
542
|
+
})
|
|
543
|
+
]
|
|
544
|
+
})
|
|
545
|
+
]
|
|
546
|
+
}),
|
|
547
|
+
/* @__PURE__ */ p(v, { children: [/* @__PURE__ */ f(m, {
|
|
526
548
|
type: "button",
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
children:
|
|
531
|
-
}), /* @__PURE__ */
|
|
549
|
+
variant: "outline",
|
|
550
|
+
onClick: O,
|
|
551
|
+
disabled: G,
|
|
552
|
+
children: M("calendar.cancel", "Cancel")
|
|
553
|
+
}), /* @__PURE__ */ f(m, {
|
|
532
554
|
type: "submit",
|
|
533
|
-
disabled:
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
]
|
|
555
|
+
disabled: G || !Y.title.trim(),
|
|
556
|
+
children: G ? M("calendar.saving", "Saving...") : A ? M("calendar.updateEvent", "Update Event") : M("calendar.createEvent", "Create Event")
|
|
557
|
+
})] })
|
|
558
|
+
]
|
|
559
|
+
})]
|
|
539
560
|
})
|
|
540
|
-
})
|
|
561
|
+
});
|
|
541
562
|
};
|
|
542
563
|
//#endregion
|
|
543
|
-
export {
|
|
564
|
+
export { w as EventFormModal };
|
|
544
565
|
|
|
545
566
|
//# sourceMappingURL=EventFormModal.js.map
|