@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.
Files changed (49) hide show
  1. package/dist/CalendarRoutes.js +1 -1
  2. package/dist/CalendarRoutes.js.map +1 -1
  3. package/dist/components/AgendaView.js +52 -42
  4. package/dist/components/AgendaView.js.map +1 -1
  5. package/dist/components/CalendarErrorState.js +40 -0
  6. package/dist/components/CalendarErrorState.js.map +1 -0
  7. package/dist/components/ConfirmDialog.js +3 -0
  8. package/dist/components/ConfirmDialog.js.map +1 -1
  9. package/dist/components/DayView.js +43 -32
  10. package/dist/components/DayView.js.map +1 -1
  11. package/dist/components/EventBlock.js +14 -26
  12. package/dist/components/EventBlock.js.map +1 -1
  13. package/dist/components/EventFormModal.js +464 -443
  14. package/dist/components/EventFormModal.js.map +1 -1
  15. package/dist/components/MiniCalendar.js +3 -0
  16. package/dist/components/MiniCalendar.js.map +1 -1
  17. package/dist/components/MonthView.js +37 -26
  18. package/dist/components/MonthView.js.map +1 -1
  19. package/dist/components/TimelineView.js +51 -35
  20. package/dist/components/TimelineView.js.map +1 -1
  21. package/dist/components/ViewSwitcher.js +1 -0
  22. package/dist/components/ViewSwitcher.js.map +1 -1
  23. package/dist/components/WeekView.js +54 -35
  24. package/dist/components/WeekView.js.map +1 -1
  25. package/dist/components/YearView.js +73 -51
  26. package/dist/components/YearView.js.map +1 -1
  27. package/dist/hooks/useEvents.js +23 -17
  28. package/dist/hooks/useEvents.js.map +1 -1
  29. package/dist/hooks/useOpenEvent.js +24 -0
  30. package/dist/hooks/useOpenEvent.js.map +1 -0
  31. package/dist/hooks/useSafePermissions.js +1 -9
  32. package/dist/hooks/useSafePermissions.js.map +1 -1
  33. package/dist/pages/CalendarPage.js +31 -14
  34. package/dist/pages/CalendarPage.js.map +1 -1
  35. package/dist/pages/EventDetailsPage.js +12 -3
  36. package/dist/pages/EventDetailsPage.js.map +1 -1
  37. package/dist/pages/ResourcesPage.js +192 -182
  38. package/dist/pages/ResourcesPage.js.map +1 -1
  39. package/dist/pages/SettingsPage.js +26 -10
  40. package/dist/pages/SettingsPage.js.map +1 -1
  41. package/dist/pages/SubscriptionsPage.js +2 -0
  42. package/dist/pages/SubscriptionsPage.js.map +1 -1
  43. package/dist/providers/CalendarProvider.js +1 -1
  44. package/dist/providers/CalendarProvider.js.map +1 -1
  45. package/dist/store/calendarStore.js +11 -4
  46. package/dist/store/calendarStore.js.map +1 -1
  47. package/dist/utils/dateHelpers.js +2 -5
  48. package/dist/utils/dateHelpers.js.map +1 -1
  49. 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, useRef as i, useState as a } from "react";
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, X as f } from "lucide-react";
5
- import { jsx as p, jsxs as m } from "react/jsx-runtime";
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 h(e) {
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 g(e) {
11
+ function S(e) {
11
12
  return `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}`;
12
13
  }
13
- function _(e, t) {
14
+ function C(e, t) {
14
15
  return (/* @__PURE__ */ new Date(`${e}T${t}:00`)).toISOString();
15
16
  }
16
- var v = ({ open: v, event: y, defaultDate: b, defaultStartHour: x, onClose: S, onSuccess: C }) => {
17
- let w = i(null), T = !!y, { t: E } = o(), D = (e, t) => {
18
- let n = E(e);
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
- }, O = {
21
- MEETING: D("calendar.meeting", "Meeting"),
22
- TASK: D("calendar.task", "Task"),
23
- MILESTONE: D("calendar.milestone", "Milestone"),
24
- PROMPT: D("calendar.prompt", "Prompt")
25
- }, k = {
26
- PUBLIC: D("calendar.visibilityPublic", "Public"),
27
- PRIVATE: D("calendar.visibilityPrivate", "Private"),
28
- CONFIDENTIAL: D("calendar.visibilityConfidential", "Confidential")
29
- }, A = {
30
- PHYSICAL: D("calendar.locationPhysical", "Physical"),
31
- ONLINE: D("calendar.locationOnline", "Online"),
32
- HYBRID: D("calendar.locationHybrid", "Hybrid"),
33
- TBD: D("calendar.locationTbd", "To be decided")
34
- }, j = {
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: D("calendar.customMeetingProvider", "Custom")
40
- }, { data: M } = t({ variables: { pagination: { limit: 50 } } }), N = M?.calendars?.calendars ?? [], [P, { loading: F, error: I }] = e(), [L, { loading: R, error: z }] = n(), B = F || R, V = I || z, H = b ?? /* @__PURE__ */ new Date(), U = x ?? H.getHours() + 1, W = new Date(H);
41
- W.setHours(U, 0, 0, 0);
42
- let G = new Date(W);
43
- G.setHours(U + 1, 0, 0, 0);
44
- let [K, q] = a({
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: h(W),
49
- startTime: g(W),
50
- endDate: h(G),
51
- endTime: g(G),
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 (y) {
71
- let e = y;
75
+ if (T) {
76
+ let e = T;
72
77
  Promise.resolve().then(() => {
73
- q({
78
+ X({
74
79
  title: e.title,
75
80
  description: e.description ?? "",
76
81
  calendarId: e.calendarId,
77
- startDate: h(e.startTime),
78
- startTime: g(e.startTime),
79
- endDate: h(e.endTime),
80
- endTime: g(e.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 = N.find((e) => e.isDefault) ?? N[0];
105
+ let e = R.find((e) => e.isDefault) ?? R[0];
101
106
  Promise.resolve().then(() => {
102
- q((t) => ({
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: h(W),
112
- startTime: g(W),
113
- endDate: h(G),
114
- endTime: g(G),
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
- }, [y, N.length]), r(() => {
129
- let e = w.current;
130
- e && (v && !e.open ? e.showModal() : !v && e.open && e.close());
131
- }, [v]);
132
- let J = (e, t) => {
133
- q((n) => ({
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 v ? /* @__PURE__ */ p("dialog", {
139
- ref: w,
140
- className: "fixed inset-0 z-50 m-auto rounded-radius-lg border border-border-default bg-bg-surface shadow-lg backdrop:bg-black/50 max-w-lg w-full p-0",
141
- onClose: S,
142
- children: /* @__PURE__ */ m("form", {
143
- onSubmit: async (e) => {
144
- if (e.preventDefault(), !K.title.trim()) return;
145
- let t = K.allDay ? (/* @__PURE__ */ new Date(`${K.startDate}T00:00:00`)).toISOString() : _(K.startDate, K.startTime), n = K.allDay ? (/* @__PURE__ */ new Date(`${K.endDate}T23:59:59`)).toISOString() : _(K.endDate, K.endTime);
146
- if (T && y) await L({ variables: {
147
- id: y.id,
148
- input: {
149
- title: K.title,
150
- description: K.description || void 0,
151
- location: K.location || void 0,
152
- locationAddress: K.locationAddress || void 0,
153
- locationUrl: K.locationUrl || void 0,
154
- locationType: K.locationType,
155
- startTime: t,
156
- endTime: n,
157
- allDay: K.allDay,
158
- status: K.status,
159
- visibility: K.visibility,
160
- onlineMeetingProvider: K.onlineMeetingProvider,
161
- onlineMeetingUrl: K.onlineMeetingUrl || void 0,
162
- maxAttendees: K.maxAttendees ? parseInt(K.maxAttendees, 10) : void 0,
163
- checkInEnabled: K.checkInEnabled,
164
- tags: K.tagsText.split(",").map((e) => e.trim()).filter(Boolean),
165
- rrule: K.isRecurring && K.rrule.trim() ? K.rrule.trim() : void 0,
166
- timezone: K.timezone
167
- }
168
- } });
169
- else {
170
- let e = (await P({ variables: { input: {
171
- title: K.title,
172
- description: K.description || void 0,
173
- calendarId: K.calendarId,
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
- C?.(), S();
198
- },
199
- className: "p-6",
200
- children: [
201
- /* @__PURE__ */ m("div", {
202
- className: "flex items-center justify-between mb-6",
203
- children: [/* @__PURE__ */ p("h2", {
204
- className: "font-heading-md text-text-primary",
205
- children: T ? D("calendar.editEvent", "Edit Event") : D("calendar.createEvent", "Create Event")
206
- }), /* @__PURE__ */ p("button", {
207
- type: "button",
208
- onClick: S,
209
- className: "size-8 inline-flex items-center justify-center rounded-radius-sm hover:bg-bg-elevated text-text-tertiary transition-colors",
210
- "aria-label": D("calendar.close", "Close"),
211
- children: /* @__PURE__ */ p(f, { className: "size-5" })
212
- })]
213
- }),
214
- V && /* @__PURE__ */ p("div", {
215
- className: "mb-4 p-3 rounded-radius-md bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800",
216
- children: /* @__PURE__ */ p("p", {
217
- className: "font-text-sm text-red-700 dark:text-red-300",
218
- children: V.message
219
- })
220
- }),
221
- /* @__PURE__ */ m("div", {
222
- className: "space-y-4",
223
- children: [
224
- /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ m("label", {
225
- htmlFor: "event-title",
226
- className: "block font-text-sm font-weight-medium text-text-primary mb-1",
227
- children: [
228
- D("calendar.title", "Title"),
229
- " ",
230
- /* @__PURE__ */ p("span", {
231
- className: "text-red-500",
232
- children: "*"
233
- })
234
- ]
235
- }), /* @__PURE__ */ p("input", {
236
- id: "event-title",
237
- type: "text",
238
- required: !0,
239
- value: K.title,
240
- onChange: (e) => J("title", e.target.value),
241
- placeholder: D("calendar.addTitle", "Add title"),
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: D("calendar.meetingProvider", "Meeting provider")
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-meeting-provider",
426
- value: K.onlineMeetingProvider,
427
- onChange: (e) => J("onlineMeetingProvider", e.target.value),
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: Object.entries(j).map(([e, t]) => /* @__PURE__ */ p("option", {
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
- })] }), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
434
- htmlFor: "event-meeting-url",
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__ */ p("input", {
498
- id: "event-recurring",
308
+ children: [/* @__PURE__ */ f("input", {
309
+ id: "event-allday",
499
310
  type: "checkbox",
500
- checked: K.isRecurring,
501
- onChange: (e) => J("isRecurring", e.target.checked),
502
- className: "size-4 rounded border-border-default"
503
- }), /* @__PURE__ */ p("label", {
504
- htmlFor: "event-recurring",
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: D("calendar.recurringEvent", "Recurring event")
318
+ children: M("calendar.allDayEvent", "All day event")
507
319
  })]
508
- }), K.isRecurring && /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
509
- htmlFor: "event-rrule",
510
- className: "block font-text-sm font-weight-medium text-text-primary mb-1",
511
- children: D("calendar.rrule", "Recurrence rule (RRULE)")
512
- }), /* @__PURE__ */ p("input", {
513
- id: "event-rrule",
514
- type: "text",
515
- value: K.rrule,
516
- onChange: (e) => J("rrule", e.target.value),
517
- placeholder: D("calendar.rrulePlaceholder", "FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;INTERVAL=1"),
518
- 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"
519
- })] })]
520
- })
521
- ]
522
- }),
523
- /* @__PURE__ */ m("div", {
524
- className: "mt-6 flex justify-end gap-3",
525
- children: [/* @__PURE__ */ p("button", {
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
- onClick: S,
528
- disabled: B,
529
- className: "px-4 py-2 rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated font-text-sm font-weight-medium text-text-primary transition-colors disabled:opacity-50",
530
- children: D("calendar.cancel", "Cancel")
531
- }), /* @__PURE__ */ p("button", {
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: B || !K.title.trim(),
534
- className: "px-4 py-2 rounded-radius-md bg-action-primary-bg text-action-primary-fg font-text-sm font-weight-medium hover:bg-action-primary-bg-hover transition-colors disabled:opacity-50",
535
- children: B ? D("calendar.saving", "Saving...") : T ? D("calendar.updateEvent", "Update Event") : D("calendar.createEvent", "Create Event")
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
- }) : null;
561
+ });
541
562
  };
542
563
  //#endregion
543
- export { v as EventFormModal };
564
+ export { w as EventFormModal };
544
565
 
545
566
  //# sourceMappingURL=EventFormModal.js.map