@burdenoff/microfe-calendar 2026.510.109

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 (140) hide show
  1. package/README.md +88 -0
  2. package/dist/CalendarRoot.d.ts +33 -0
  3. package/dist/CalendarRoot.d.ts.map +1 -0
  4. package/dist/CalendarRoot.js +81 -0
  5. package/dist/CalendarRoot.js.map +1 -0
  6. package/dist/CalendarRoutes.d.ts +21 -0
  7. package/dist/CalendarRoutes.d.ts.map +1 -0
  8. package/dist/CalendarRoutes.js +69 -0
  9. package/dist/CalendarRoutes.js.map +1 -0
  10. package/dist/components/AgendaView.d.ts +6 -0
  11. package/dist/components/AgendaView.d.ts.map +1 -0
  12. package/dist/components/AgendaView.js +102 -0
  13. package/dist/components/AgendaView.js.map +1 -0
  14. package/dist/components/ConfirmDialog.d.ts +16 -0
  15. package/dist/components/ConfirmDialog.d.ts.map +1 -0
  16. package/dist/components/ConfirmDialog.js +79 -0
  17. package/dist/components/ConfirmDialog.js.map +1 -0
  18. package/dist/components/DayView.d.ts +6 -0
  19. package/dist/components/DayView.d.ts.map +1 -0
  20. package/dist/components/DayView.js +73 -0
  21. package/dist/components/DayView.js.map +1 -0
  22. package/dist/components/EventBlock.d.ts +8 -0
  23. package/dist/components/EventBlock.d.ts.map +1 -0
  24. package/dist/components/EventBlock.js +38 -0
  25. package/dist/components/EventBlock.js.map +1 -0
  26. package/dist/components/EventFormModal.d.ts +14 -0
  27. package/dist/components/EventFormModal.d.ts.map +1 -0
  28. package/dist/components/EventFormModal.js +545 -0
  29. package/dist/components/EventFormModal.js.map +1 -0
  30. package/dist/components/MiniCalendar.d.ts +6 -0
  31. package/dist/components/MiniCalendar.d.ts.map +1 -0
  32. package/dist/components/MiniCalendar.js +73 -0
  33. package/dist/components/MiniCalendar.js.map +1 -0
  34. package/dist/components/MonthView.d.ts +6 -0
  35. package/dist/components/MonthView.d.ts.map +1 -0
  36. package/dist/components/MonthView.js +70 -0
  37. package/dist/components/MonthView.js.map +1 -0
  38. package/dist/components/TimelineView.d.ts +6 -0
  39. package/dist/components/TimelineView.d.ts.map +1 -0
  40. package/dist/components/TimelineView.js +99 -0
  41. package/dist/components/TimelineView.js.map +1 -0
  42. package/dist/components/ViewSwitcher.d.ts +6 -0
  43. package/dist/components/ViewSwitcher.d.ts.map +1 -0
  44. package/dist/components/ViewSwitcher.js +51 -0
  45. package/dist/components/ViewSwitcher.js.map +1 -0
  46. package/dist/components/WeekView.d.ts +6 -0
  47. package/dist/components/WeekView.d.ts.map +1 -0
  48. package/dist/components/WeekView.js +77 -0
  49. package/dist/components/WeekView.js.map +1 -0
  50. package/dist/components/YearView.d.ts +6 -0
  51. package/dist/components/YearView.d.ts.map +1 -0
  52. package/dist/components/YearView.js +69 -0
  53. package/dist/components/YearView.js.map +1 -0
  54. package/dist/constants/permissions.d.ts +90 -0
  55. package/dist/constants/permissions.d.ts.map +1 -0
  56. package/dist/constants/permissions.js +70 -0
  57. package/dist/constants/permissions.js.map +1 -0
  58. package/dist/dev/main.d.ts +2 -0
  59. package/dist/dev/main.d.ts.map +1 -0
  60. package/dist/generated/global-operations.d.ts +2 -0
  61. package/dist/generated/global-operations.d.ts.map +1 -0
  62. package/dist/generated/global-types.d.ts +20716 -0
  63. package/dist/generated/global-types.d.ts.map +1 -0
  64. package/dist/generated/wspace-operations.d.ts +906 -0
  65. package/dist/generated/wspace-operations.d.ts.map +1 -0
  66. package/dist/generated/wspace-operations.js +456 -0
  67. package/dist/generated/wspace-operations.js.map +1 -0
  68. package/dist/generated/wspace-types.d.ts +53363 -0
  69. package/dist/generated/wspace-types.d.ts.map +1 -0
  70. package/dist/graphql/calendarDocuments.d.ts +25 -0
  71. package/dist/graphql/calendarDocuments.d.ts.map +1 -0
  72. package/dist/graphql/calendarDocuments.js +360 -0
  73. package/dist/graphql/calendarDocuments.js.map +1 -0
  74. package/dist/hooks/index.d.ts +11 -0
  75. package/dist/hooks/index.d.ts.map +1 -0
  76. package/dist/hooks/useCalendarPermissions.d.ts +14 -0
  77. package/dist/hooks/useCalendarPermissions.d.ts.map +1 -0
  78. package/dist/hooks/useCalendarPermissions.js +48 -0
  79. package/dist/hooks/useCalendarPermissions.js.map +1 -0
  80. package/dist/hooks/useEventPermissions.d.ts +15 -0
  81. package/dist/hooks/useEventPermissions.d.ts.map +1 -0
  82. package/dist/hooks/useEventPermissions.js +34 -0
  83. package/dist/hooks/useEventPermissions.js.map +1 -0
  84. package/dist/hooks/useEvents.d.ts +15 -0
  85. package/dist/hooks/useEvents.d.ts.map +1 -0
  86. package/dist/hooks/useEvents.js +199 -0
  87. package/dist/hooks/useEvents.js.map +1 -0
  88. package/dist/hooks/useSafePermissions.d.ts +6 -0
  89. package/dist/hooks/useSafePermissions.d.ts.map +1 -0
  90. package/dist/hooks/useSafePermissions.js +17 -0
  91. package/dist/hooks/useSafePermissions.js.map +1 -0
  92. package/dist/index.d.ts +16 -0
  93. package/dist/index.d.ts.map +1 -0
  94. package/dist/index.js +6 -0
  95. package/dist/pages/CalendarPage.d.ts +5 -0
  96. package/dist/pages/CalendarPage.d.ts.map +1 -0
  97. package/dist/pages/CalendarPage.js +239 -0
  98. package/dist/pages/CalendarPage.js.map +1 -0
  99. package/dist/pages/EventDetailsPage.d.ts +6 -0
  100. package/dist/pages/EventDetailsPage.d.ts.map +1 -0
  101. package/dist/pages/EventDetailsPage.js +625 -0
  102. package/dist/pages/EventDetailsPage.js.map +1 -0
  103. package/dist/pages/ResourcesPage.d.ts +6 -0
  104. package/dist/pages/ResourcesPage.d.ts.map +1 -0
  105. package/dist/pages/ResourcesPage.js +391 -0
  106. package/dist/pages/ResourcesPage.js.map +1 -0
  107. package/dist/pages/SettingsPage.d.ts +2 -0
  108. package/dist/pages/SettingsPage.d.ts.map +1 -0
  109. package/dist/pages/SettingsPage.js +798 -0
  110. package/dist/pages/SettingsPage.js.map +1 -0
  111. package/dist/pages/SubscriptionsPage.d.ts +6 -0
  112. package/dist/pages/SubscriptionsPage.d.ts.map +1 -0
  113. package/dist/pages/SubscriptionsPage.js +170 -0
  114. package/dist/pages/SubscriptionsPage.js.map +1 -0
  115. package/dist/providers/CalendarProvider.d.ts +31 -0
  116. package/dist/providers/CalendarProvider.d.ts.map +1 -0
  117. package/dist/providers/CalendarProvider.js +53 -0
  118. package/dist/providers/CalendarProvider.js.map +1 -0
  119. package/dist/store/calendarStore.d.ts +69 -0
  120. package/dist/store/calendarStore.d.ts.map +1 -0
  121. package/dist/store/calendarStore.js +82 -0
  122. package/dist/store/calendarStore.js.map +1 -0
  123. package/dist/types/index.d.ts +341 -0
  124. package/dist/types/index.d.ts.map +1 -0
  125. package/dist/utils/dateHelpers.d.ts +115 -0
  126. package/dist/utils/dateHelpers.d.ts.map +1 -0
  127. package/dist/utils/dateHelpers.js +86 -0
  128. package/dist/utils/dateHelpers.js.map +1 -0
  129. package/dist/utils/icalHelpers.d.ts +19 -0
  130. package/dist/utils/icalHelpers.d.ts.map +1 -0
  131. package/dist/utils/icalHelpers.js +57 -0
  132. package/dist/utils/icalHelpers.js.map +1 -0
  133. package/dist/utils/nativeBridge.d.ts +3 -0
  134. package/dist/utils/nativeBridge.d.ts.map +1 -0
  135. package/dist/utils/nativeBridge.js +2 -0
  136. package/dist/utils/recurrenceHelpers.d.ts +15 -0
  137. package/dist/utils/recurrenceHelpers.d.ts.map +1 -0
  138. package/dist/utils/timezoneHelpers.d.ts +39 -0
  139. package/dist/utils/timezoneHelpers.d.ts.map +1 -0
  140. package/package.json +109 -0
@@ -0,0 +1,545 @@
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";
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";
6
+ //#region src/components/EventFormModal.tsx
7
+ function h(e) {
8
+ return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
9
+ }
10
+ function g(e) {
11
+ return `${String(e.getHours()).padStart(2, "0")}:${String(e.getMinutes()).padStart(2, "0")}`;
12
+ }
13
+ function _(e, t) {
14
+ return (/* @__PURE__ */ new Date(`${e}T${t}:00`)).toISOString();
15
+ }
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);
19
+ 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 = {
35
+ ZOOM: "Zoom",
36
+ GOOGLE_MEET: "Google Meet",
37
+ MICROSOFT_TEAMS: "Microsoft Teams",
38
+ 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({
45
+ title: "",
46
+ description: "",
47
+ calendarId: "",
48
+ startDate: h(W),
49
+ startTime: g(W),
50
+ endDate: h(G),
51
+ endTime: g(G),
52
+ allDay: !1,
53
+ location: "",
54
+ locationAddress: "",
55
+ locationUrl: "",
56
+ locationType: "PHYSICAL",
57
+ eventType: "MEETING",
58
+ status: "CONFIRMED",
59
+ visibility: "PUBLIC",
60
+ onlineMeetingProvider: "GOOGLE_MEET",
61
+ onlineMeetingUrl: "",
62
+ maxAttendees: "",
63
+ checkInEnabled: !1,
64
+ isRecurring: !1,
65
+ rrule: "",
66
+ tagsText: "",
67
+ timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
68
+ });
69
+ r(() => {
70
+ if (y) {
71
+ let e = y;
72
+ Promise.resolve().then(() => {
73
+ q({
74
+ title: e.title,
75
+ description: e.description ?? "",
76
+ calendarId: e.calendarId,
77
+ startDate: h(e.startTime),
78
+ startTime: g(e.startTime),
79
+ endDate: h(e.endTime),
80
+ endTime: g(e.endTime),
81
+ allDay: e.isAllDay,
82
+ location: e.location ?? "",
83
+ locationAddress: e.locationAddress ?? "",
84
+ locationUrl: e.locationUrl ?? "",
85
+ locationType: e.locationType ?? "PHYSICAL",
86
+ eventType: e.eventType ?? "MEETING",
87
+ status: e.status ?? "CONFIRMED",
88
+ visibility: e.privacy ?? "PUBLIC",
89
+ onlineMeetingProvider: e.onlineMeetingProvider ?? "GOOGLE_MEET",
90
+ onlineMeetingUrl: e.videoCallLink ?? "",
91
+ maxAttendees: e.maxAttendees ? String(e.maxAttendees) : "",
92
+ checkInEnabled: e.checkInEnabled ?? !1,
93
+ isRecurring: e.isRecurring ?? !1,
94
+ rrule: e.rrule ?? "",
95
+ tagsText: e.tags?.join(", ") ?? "",
96
+ timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
97
+ });
98
+ });
99
+ } else {
100
+ let e = N.find((e) => e.isDefault) ?? N[0];
101
+ Promise.resolve().then(() => {
102
+ q((t) => ({
103
+ ...t,
104
+ title: "",
105
+ description: "",
106
+ calendarId: e?.id ?? "",
107
+ location: "",
108
+ locationAddress: "",
109
+ locationUrl: "",
110
+ locationType: "PHYSICAL",
111
+ startDate: h(W),
112
+ startTime: g(W),
113
+ endDate: h(G),
114
+ endTime: g(G),
115
+ allDay: !1,
116
+ status: "CONFIRMED",
117
+ visibility: "PUBLIC",
118
+ onlineMeetingProvider: "GOOGLE_MEET",
119
+ onlineMeetingUrl: "",
120
+ maxAttendees: "",
121
+ checkInEnabled: !1,
122
+ isRecurring: !1,
123
+ rrule: "",
124
+ tagsText: ""
125
+ }));
126
+ });
127
+ }
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) => ({
134
+ ...n,
135
+ [e]: t
136
+ }));
137
+ };
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 }
195
+ } });
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",
422
+ className: "block font-text-sm font-weight-medium text-text-primary mb-1",
423
+ children: D("calendar.meetingProvider", "Meeting provider")
424
+ }), /* @__PURE__ */ p("select", {
425
+ id: "event-meeting-provider",
426
+ value: K.onlineMeetingProvider,
427
+ onChange: (e) => J("onlineMeetingProvider", e.target.value),
428
+ 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", {
430
+ value: e,
431
+ children: t
432
+ }, 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", {
496
+ className: "flex items-center gap-3",
497
+ children: [/* @__PURE__ */ p("input", {
498
+ id: "event-recurring",
499
+ 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",
505
+ className: "font-text-sm text-text-primary",
506
+ children: D("calendar.recurringEvent", "Recurring event")
507
+ })]
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", {
526
+ 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", {
532
+ 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
+ ]
539
+ })
540
+ }) : null;
541
+ };
542
+ //#endregion
543
+ export { v as EventFormModal };
544
+
545
+ //# sourceMappingURL=EventFormModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EventFormModal.js","names":[],"sources":["../../src/components/EventFormModal.tsx"],"sourcesContent":["/**\n * EventFormModal - Create/Edit event modal with full form\n *\n * Uses the generated useCreateEventMutation and useUpdateEventMutation hooks.\n * Fields correspond to CreateEventInput / UpdateEventInput from the GraphQL schema.\n */\n\nimport { useState, useEffect, useRef, type FC, type FormEvent } from 'react';\nimport { X, Calendar as CalendarIcon, Clock, MapPin, AlignLeft, Tag } from 'lucide-react';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n useCreateEventMutation,\n useUpdateEventMutation,\n useGetCalendarsQuery,\n} from '../generated/wspace-operations';\nimport type { CalendarEvent } from '../types';\n\ninterface EventFormModalProps {\n open: boolean;\n event?: CalendarEvent | null;\n defaultDate?: Date;\n defaultStartHour?: number;\n onClose: () => void;\n onSuccess?: () => void;\n}\n\ninterface EventFormData {\n title: string;\n description: string;\n calendarId: string;\n startDate: string;\n startTime: string;\n endDate: string;\n endTime: string;\n allDay: boolean;\n location: string;\n locationAddress: string;\n locationUrl: string;\n locationType: 'PHYSICAL' | 'ONLINE' | 'HYBRID' | 'TBD';\n eventType: 'MEETING' | 'TASK' | 'MILESTONE' | 'PROMPT';\n status: string;\n visibility: 'PUBLIC' | 'PRIVATE' | 'CONFIDENTIAL';\n onlineMeetingProvider: 'ZOOM' | 'GOOGLE_MEET' | 'MICROSOFT_TEAMS' | 'WEBEX' | 'CUSTOM';\n onlineMeetingUrl: string;\n maxAttendees: string;\n checkInEnabled: boolean;\n isRecurring: boolean;\n rrule: string;\n tagsText: string;\n timezone: string;\n}\n\nfunction toDateString(date: Date): string {\n const y = date.getFullYear();\n const m = String(date.getMonth() + 1).padStart(2, '0');\n const d = String(date.getDate()).padStart(2, '0');\n return `${y}-${m}-${d}`;\n}\n\nfunction toTimeString(date: Date): string {\n const h = String(date.getHours()).padStart(2, '0');\n const m = String(date.getMinutes()).padStart(2, '0');\n return `${h}:${m}`;\n}\n\nfunction combineDateAndTime(dateStr: string, timeStr: string): string {\n return new Date(`${dateStr}T${timeStr}:00`).toISOString();\n}\n\nexport const EventFormModal: FC<EventFormModalProps> = ({\n open,\n event,\n defaultDate,\n defaultStartHour,\n onClose,\n onSuccess,\n}) => {\n const dialogRef = useRef<HTMLDialogElement>(null);\n const isEditing = Boolean(event);\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const value = t(key);\n return value === key ? fallback : value;\n };\n const eventTypeLabels: Record<EventFormData['eventType'], string> = {\n MEETING: tr('calendar.meeting', 'Meeting'),\n TASK: tr('calendar.task', 'Task'),\n MILESTONE: tr('calendar.milestone', 'Milestone'),\n PROMPT: tr('calendar.prompt', 'Prompt'),\n };\n const visibilityLabels: Record<EventFormData['visibility'], string> = {\n PUBLIC: tr('calendar.visibilityPublic', 'Public'),\n PRIVATE: tr('calendar.visibilityPrivate', 'Private'),\n CONFIDENTIAL: tr('calendar.visibilityConfidential', 'Confidential'),\n };\n const locationTypeLabels: Record<EventFormData['locationType'], string> = {\n PHYSICAL: tr('calendar.locationPhysical', 'Physical'),\n ONLINE: tr('calendar.locationOnline', 'Online'),\n HYBRID: tr('calendar.locationHybrid', 'Hybrid'),\n TBD: tr('calendar.locationTbd', 'To be decided'),\n };\n const meetingProviderLabels: Record<EventFormData['onlineMeetingProvider'], string> = {\n ZOOM: 'Zoom',\n GOOGLE_MEET: 'Google Meet',\n MICROSOFT_TEAMS: 'Microsoft Teams',\n WEBEX: 'Webex',\n CUSTOM: tr('calendar.customMeetingProvider', 'Custom'),\n };\n\n // Get calendars for the dropdown\n const { data: calendarsData } = useGetCalendarsQuery({\n variables: { pagination: { limit: 50 } },\n });\n const calendars = calendarsData?.calendars?.calendars ?? [];\n\n // Mutations\n const [createEvent, { loading: creating, error: createError }] = useCreateEventMutation();\n const [updateEvent, { loading: updating, error: updateError }] = useUpdateEventMutation();\n\n const loading = creating || updating;\n const error = createError || updateError;\n\n // Form state\n const now = defaultDate ?? new Date();\n const startHour = defaultStartHour ?? now.getHours() + 1;\n const defaultStart = new Date(now);\n defaultStart.setHours(startHour, 0, 0, 0);\n const defaultEnd = new Date(defaultStart);\n defaultEnd.setHours(startHour + 1, 0, 0, 0);\n\n const [form, setForm] = useState<EventFormData>({\n title: '',\n description: '',\n calendarId: '',\n startDate: toDateString(defaultStart),\n startTime: toTimeString(defaultStart),\n endDate: toDateString(defaultEnd),\n endTime: toTimeString(defaultEnd),\n allDay: false,\n location: '',\n locationAddress: '',\n locationUrl: '',\n locationType: 'PHYSICAL',\n eventType: 'MEETING',\n status: 'CONFIRMED',\n visibility: 'PUBLIC',\n onlineMeetingProvider: 'GOOGLE_MEET',\n onlineMeetingUrl: '',\n maxAttendees: '',\n checkInEnabled: false,\n isRecurring: false,\n rrule: '',\n tagsText: '',\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n });\n\n // Populate form when editing — defer the state update to a microtask so\n // setState does not run synchronously inside the effect body\n // (react-hooks/set-state-in-effect).\n useEffect(() => {\n if (event) {\n const snapshot = event;\n void Promise.resolve().then(() => {\n setForm({\n title: snapshot.title,\n description: snapshot.description ?? '',\n calendarId: snapshot.calendarId,\n startDate: toDateString(snapshot.startTime),\n startTime: toTimeString(snapshot.startTime),\n endDate: toDateString(snapshot.endTime),\n endTime: toTimeString(snapshot.endTime),\n allDay: snapshot.isAllDay,\n location: snapshot.location ?? '',\n locationAddress: snapshot.locationAddress ?? '',\n locationUrl: snapshot.locationUrl ?? '',\n locationType: snapshot.locationType ?? 'PHYSICAL',\n eventType: snapshot.eventType ?? 'MEETING',\n status: snapshot.status ?? 'CONFIRMED',\n visibility: snapshot.privacy ?? 'PUBLIC',\n onlineMeetingProvider:\n (snapshot.onlineMeetingProvider as EventFormData['onlineMeetingProvider']) ??\n 'GOOGLE_MEET',\n onlineMeetingUrl: snapshot.videoCallLink ?? '',\n maxAttendees: snapshot.maxAttendees ? String(snapshot.maxAttendees) : '',\n checkInEnabled: snapshot.checkInEnabled ?? false,\n isRecurring: snapshot.isRecurring ?? false,\n rrule: snapshot.rrule ?? '',\n tagsText: snapshot.tags?.join(', ') ?? '',\n timezone: Intl.DateTimeFormat().resolvedOptions().timeZone,\n });\n });\n } else {\n // Reset for create mode\n const defaultCalendar =\n calendars.find((c: { isDefault: boolean }) => c.isDefault) ?? calendars[0];\n void Promise.resolve().then(() => {\n setForm((prev) => ({\n ...prev,\n title: '',\n description: '',\n calendarId: defaultCalendar?.id ?? '',\n location: '',\n locationAddress: '',\n locationUrl: '',\n locationType: 'PHYSICAL',\n startDate: toDateString(defaultStart),\n startTime: toTimeString(defaultStart),\n endDate: toDateString(defaultEnd),\n endTime: toTimeString(defaultEnd),\n allDay: false,\n status: 'CONFIRMED',\n visibility: 'PUBLIC',\n onlineMeetingProvider: 'GOOGLE_MEET',\n onlineMeetingUrl: '',\n maxAttendees: '',\n checkInEnabled: false,\n isRecurring: false,\n rrule: '',\n tagsText: '',\n }));\n });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, calendars.length]);\n\n // Dialog open/close\n useEffect(() => {\n const dialog = dialogRef.current;\n if (!dialog) return;\n if (open && !dialog.open) {\n dialog.showModal();\n } else if (!open && dialog.open) {\n dialog.close();\n }\n }, [open]);\n\n const updateField = <K extends keyof EventFormData>(key: K, value: EventFormData[K]) => {\n setForm((prev) => ({ ...prev, [key]: value }));\n };\n\n const handleSubmit = async (e: FormEvent) => {\n e.preventDefault();\n if (!form.title.trim()) return;\n\n const startTime = form.allDay\n ? new Date(`${form.startDate}T00:00:00`).toISOString()\n : combineDateAndTime(form.startDate, form.startTime);\n const endTime = form.allDay\n ? new Date(`${form.endDate}T23:59:59`).toISOString()\n : combineDateAndTime(form.endDate, form.endTime);\n\n if (isEditing && event) {\n await updateEvent({\n variables: {\n id: event.id,\n input: {\n title: form.title,\n description: form.description || undefined,\n location: form.location || undefined,\n locationAddress: form.locationAddress || undefined,\n locationUrl: form.locationUrl || undefined,\n locationType: form.locationType,\n startTime,\n endTime,\n allDay: form.allDay,\n status: form.status,\n visibility: form.visibility,\n onlineMeetingProvider: form.onlineMeetingProvider,\n onlineMeetingUrl: form.onlineMeetingUrl || undefined,\n maxAttendees: form.maxAttendees ? parseInt(form.maxAttendees, 10) : undefined,\n checkInEnabled: form.checkInEnabled,\n tags: form.tagsText\n .split(',')\n .map((tag) => tag.trim())\n .filter(Boolean),\n rrule: form.isRecurring && form.rrule.trim() ? form.rrule.trim() : undefined,\n timezone: form.timezone,\n },\n },\n });\n } else {\n const createResult = await createEvent({\n variables: {\n input: {\n title: form.title,\n description: form.description || undefined,\n calendarId: form.calendarId,\n location: form.location || undefined,\n locationAddress: form.locationAddress || undefined,\n locationUrl: form.locationUrl || undefined,\n locationType: form.locationType,\n startTime,\n endTime,\n allDay: form.allDay,\n eventType: form.eventType,\n status: form.status,\n onlineMeetingProvider: form.onlineMeetingProvider,\n onlineMeetingUrl: form.onlineMeetingUrl || undefined,\n maxAttendees: form.maxAttendees ? parseInt(form.maxAttendees, 10) : undefined,\n checkInEnabled: form.checkInEnabled,\n isRecurring: form.isRecurring,\n rrule: form.isRecurring && form.rrule.trim() ? form.rrule.trim() : undefined,\n tags: form.tagsText\n .split(',')\n .map((tag) => tag.trim())\n .filter(Boolean),\n timezone: form.timezone,\n },\n },\n });\n\n const createdId = createResult.data?.createEvent.id;\n if (createdId && form.visibility !== 'PUBLIC') {\n await updateEvent({\n variables: {\n id: createdId,\n input: {\n visibility: form.visibility,\n },\n },\n });\n }\n }\n\n onSuccess?.();\n onClose();\n };\n\n if (!open) return null;\n\n return (\n <dialog\n ref={dialogRef}\n 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\"\n onClose={onClose}\n >\n <form onSubmit={handleSubmit} className=\"p-6\">\n {/* Header */}\n <div className=\"flex items-center justify-between mb-6\">\n <h2 className=\"font-heading-md text-text-primary\">\n {isEditing\n ? tr('calendar.editEvent', 'Edit Event')\n : tr('calendar.createEvent', 'Create Event')}\n </h2>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"size-8 inline-flex items-center justify-center rounded-radius-sm hover:bg-bg-elevated text-text-tertiary transition-colors\"\n aria-label={tr('calendar.close', 'Close')}\n >\n <X className=\"size-5\" />\n </button>\n </div>\n\n {/* Error display */}\n {error && (\n <div className=\"mb-4 p-3 rounded-radius-md bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800\">\n <p className=\"font-text-sm text-red-700 dark:text-red-300\">{error.message}</p>\n </div>\n )}\n\n <div className=\"space-y-4\">\n {/* Title */}\n <div>\n <label\n htmlFor=\"event-title\"\n className=\"block font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n {tr('calendar.title', 'Title')} <span className=\"text-red-500\">*</span>\n </label>\n <input\n id=\"event-title\"\n type=\"text\"\n required\n value={form.title}\n onChange={(e) => updateField('title', e.target.value)}\n placeholder={tr('calendar.addTitle', 'Add title')}\n 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\"\n />\n </div>\n\n {/* Calendar selector */}\n {!isEditing && (\n <div>\n <label\n htmlFor=\"event-calendar\"\n className=\"flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n <CalendarIcon className=\"size-4 text-text-secondary\" />\n {tr('calendar.calendar', 'Calendar')}\n </label>\n <select\n id=\"event-calendar\"\n value={form.calendarId}\n onChange={(e) => updateField('calendarId', e.target.value)}\n 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\"\n >\n <option value=\"\">{tr('calendar.selectCalendar', 'Select calendar')}</option>\n {calendars.map((cal: { id: string; name: string }) => (\n <option key={cal.id} value={cal.id}>\n {cal.name}\n </option>\n ))}\n </select>\n </div>\n )}\n\n {/* Event type */}\n {!isEditing && (\n <div>\n <label\n htmlFor=\"event-type\"\n className=\"flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n <Tag className=\"size-4 text-text-secondary\" />\n {tr('calendar.eventType', 'Event Type')}\n </label>\n <select\n id=\"event-type\"\n value={form.eventType}\n onChange={(e) =>\n updateField('eventType', e.target.value as EventFormData['eventType'])\n }\n 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\"\n >\n <option value=\"MEETING\">{eventTypeLabels.MEETING}</option>\n <option value=\"TASK\">{eventTypeLabels.TASK}</option>\n <option value=\"MILESTONE\">{eventTypeLabels.MILESTONE}</option>\n <option value=\"PROMPT\">{eventTypeLabels.PROMPT}</option>\n </select>\n </div>\n )}\n\n {/* Visibility */}\n <div>\n <label\n htmlFor=\"event-visibility\"\n className=\"flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n <Tag className=\"size-4 text-text-secondary\" />\n {tr('calendar.visibility', 'Visibility')}\n </label>\n <select\n id=\"event-visibility\"\n value={form.visibility}\n onChange={(e) =>\n updateField('visibility', e.target.value as EventFormData['visibility'])\n }\n 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\"\n >\n {Object.entries(visibilityLabels).map(([value, label]) => (\n <option key={value} value={value}>\n {label}\n </option>\n ))}\n </select>\n </div>\n\n {/* All day toggle */}\n <div className=\"flex items-center gap-3\">\n <input\n id=\"event-allday\"\n type=\"checkbox\"\n checked={form.allDay}\n onChange={(e) => updateField('allDay', e.target.checked)}\n className=\"size-4 rounded border-border-default\"\n />\n <label htmlFor=\"event-allday\" className=\"font-text-sm text-text-primary\">\n {tr('calendar.allDayEvent', 'All day event')}\n </label>\n </div>\n\n {/* Date/Time */}\n <div className=\"grid grid-cols-2 gap-3\">\n <div>\n <label\n htmlFor=\"event-start-date\"\n className=\"flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n <Clock className=\"size-4 text-text-secondary\" />\n {tr('calendar.start', 'Start')}\n </label>\n <input\n id=\"event-start-date\"\n type=\"date\"\n value={form.startDate}\n onChange={(e) => updateField('startDate', e.target.value)}\n 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\"\n />\n {!form.allDay && (\n <input\n type=\"time\"\n value={form.startTime}\n onChange={(e) => updateField('startTime', e.target.value)}\n 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\"\n />\n )}\n </div>\n <div>\n <label\n htmlFor=\"event-end-date\"\n className=\"font-text-sm font-weight-medium text-text-primary mb-1 block\"\n >\n {tr('calendar.end', 'End')}\n </label>\n <input\n id=\"event-end-date\"\n type=\"date\"\n value={form.endDate}\n onChange={(e) => updateField('endDate', e.target.value)}\n 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\"\n />\n {!form.allDay && (\n <input\n type=\"time\"\n value={form.endTime}\n onChange={(e) => updateField('endTime', e.target.value)}\n 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\"\n />\n )}\n </div>\n </div>\n\n {/* Location */}\n <div className=\"space-y-3\">\n <div>\n <label\n htmlFor=\"event-location\"\n className=\"flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n <MapPin className=\"size-4 text-text-secondary\" />\n {tr('calendar.location', 'Location')}\n </label>\n <input\n id=\"event-location\"\n type=\"text\"\n value={form.location}\n onChange={(e) => updateField('location', e.target.value)}\n placeholder={tr('calendar.addLocation', 'Add location')}\n 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\"\n />\n </div>\n\n <div className=\"grid grid-cols-1 gap-3 @md:grid-cols-2\">\n <div>\n <label\n htmlFor=\"event-location-type\"\n className=\"block font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n {tr('calendar.locationType', 'Location type')}\n </label>\n <select\n id=\"event-location-type\"\n value={form.locationType}\n onChange={(e) =>\n updateField('locationType', e.target.value as EventFormData['locationType'])\n }\n 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\"\n >\n {Object.entries(locationTypeLabels).map(([value, label]) => (\n <option key={value} value={value}>\n {label}\n </option>\n ))}\n </select>\n </div>\n\n <div>\n <label\n htmlFor=\"event-max-attendees\"\n className=\"block font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n {tr('calendar.maxAttendees', 'Max attendees')}\n </label>\n <input\n id=\"event-max-attendees\"\n type=\"number\"\n min=\"1\"\n value={form.maxAttendees}\n onChange={(e) => updateField('maxAttendees', e.target.value)}\n 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\"\n />\n </div>\n </div>\n\n <input\n type=\"text\"\n value={form.locationAddress}\n onChange={(e) => updateField('locationAddress', e.target.value)}\n placeholder={tr('calendar.locationAddress', 'Location address or room details')}\n 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\"\n />\n\n <input\n type=\"url\"\n value={form.locationUrl}\n onChange={(e) => updateField('locationUrl', e.target.value)}\n placeholder={tr('calendar.locationUrl', 'Location URL')}\n 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\"\n />\n </div>\n\n {/* Online meeting */}\n <div className=\"grid grid-cols-1 gap-3 @md:grid-cols-2\">\n <div>\n <label\n htmlFor=\"event-meeting-provider\"\n className=\"block font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n {tr('calendar.meetingProvider', 'Meeting provider')}\n </label>\n <select\n id=\"event-meeting-provider\"\n value={form.onlineMeetingProvider}\n onChange={(e) =>\n updateField(\n 'onlineMeetingProvider',\n e.target.value as EventFormData['onlineMeetingProvider']\n )\n }\n 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\"\n >\n {Object.entries(meetingProviderLabels).map(([value, label]) => (\n <option key={value} value={value}>\n {label}\n </option>\n ))}\n </select>\n </div>\n\n <div>\n <label\n htmlFor=\"event-meeting-url\"\n className=\"block font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n {tr('calendar.meetingUrl', 'Meeting URL')}\n </label>\n <input\n id=\"event-meeting-url\"\n type=\"url\"\n value={form.onlineMeetingUrl}\n onChange={(e) => updateField('onlineMeetingUrl', e.target.value)}\n placeholder={tr('calendar.addMeetingLink', 'Add meeting link')}\n 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\"\n />\n </div>\n </div>\n\n {/* Description */}\n <div>\n <label\n htmlFor=\"event-description\"\n className=\"flex items-center gap-2 font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n <AlignLeft className=\"size-4 text-text-secondary\" />\n {tr('calendar.description', 'Description')}\n </label>\n <textarea\n id=\"event-description\"\n value={form.description}\n onChange={(e) => updateField('description', e.target.value)}\n placeholder={tr('calendar.addDescription', 'Add markdown notes or event description')}\n rows={4}\n 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\"\n />\n <p className=\"mt-1 font-text-xs text-text-tertiary\">\n {tr(\n 'calendar.descriptionMarkdownHint',\n 'Supports markdown-style notes and formatting text.'\n )}\n </p>\n </div>\n\n <div className=\"grid grid-cols-1 gap-3 @md:grid-cols-2\">\n <div>\n <label\n htmlFor=\"event-tags\"\n className=\"block font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n {tr('calendar.tags', 'Tags')}\n </label>\n <input\n id=\"event-tags\"\n type=\"text\"\n value={form.tagsText}\n onChange={(e) => updateField('tagsText', e.target.value)}\n placeholder={tr('calendar.tagsPlaceholder', 'e.g. planning, roadmap, leadership')}\n 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\"\n />\n </div>\n\n <div className=\"flex items-center gap-3 self-end\">\n <input\n id=\"event-checkin-enabled\"\n type=\"checkbox\"\n checked={form.checkInEnabled}\n onChange={(e) => updateField('checkInEnabled', e.target.checked)}\n className=\"size-4 rounded border-border-default\"\n />\n <label htmlFor=\"event-checkin-enabled\" className=\"font-text-sm text-text-primary\">\n {tr('calendar.enableCheckIn', 'Enable attendee check-in')}\n </label>\n </div>\n </div>\n\n <div className=\"space-y-3 rounded-radius-md border border-border-subtle p-3 bg-bg-canvas\">\n <div className=\"flex items-center gap-3\">\n <input\n id=\"event-recurring\"\n type=\"checkbox\"\n checked={form.isRecurring}\n onChange={(e) => updateField('isRecurring', e.target.checked)}\n className=\"size-4 rounded border-border-default\"\n />\n <label htmlFor=\"event-recurring\" className=\"font-text-sm text-text-primary\">\n {tr('calendar.recurringEvent', 'Recurring event')}\n </label>\n </div>\n\n {form.isRecurring && (\n <div>\n <label\n htmlFor=\"event-rrule\"\n className=\"block font-text-sm font-weight-medium text-text-primary mb-1\"\n >\n {tr('calendar.rrule', 'Recurrence rule (RRULE)')}\n </label>\n <input\n id=\"event-rrule\"\n type=\"text\"\n value={form.rrule}\n onChange={(e) => updateField('rrule', e.target.value)}\n placeholder={tr(\n 'calendar.rrulePlaceholder',\n 'FREQ=WEEKLY;BYDAY=MO,TU,WE,TH,FR;INTERVAL=1'\n )}\n 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\"\n />\n </div>\n )}\n </div>\n </div>\n\n {/* Footer */}\n <div className=\"mt-6 flex justify-end gap-3\">\n <button\n type=\"button\"\n onClick={onClose}\n disabled={loading}\n 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\"\n >\n {tr('calendar.cancel', 'Cancel')}\n </button>\n <button\n type=\"submit\"\n disabled={loading || !form.title.trim()}\n 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\"\n >\n {loading\n ? tr('calendar.saving', 'Saving...')\n : isEditing\n ? tr('calendar.updateEvent', 'Update Event')\n : tr('calendar.createEvent', 'Create Event')}\n </button>\n </div>\n </form>\n </dialog>\n );\n};\n"],"mappings":";;;;;;AAoDA,SAAS,EAAa,GAAoB;AAIxC,QAAO,GAHG,EAAK,aAAa,CAGhB,GAFF,OAAO,EAAK,UAAU,GAAG,EAAE,CAAC,SAAS,GAAG,IAAI,CAErC,GADP,OAAO,EAAK,SAAS,CAAC,CAAC,SAAS,GAAG,IAAI;;AAInD,SAAS,EAAa,GAAoB;AAGxC,QAAO,GAFG,OAAO,EAAK,UAAU,CAAC,CAAC,SAAS,GAAG,IAAI,CAEtC,GADF,OAAO,EAAK,YAAY,CAAC,CAAC,SAAS,GAAG,IAAI;;AAItD,SAAS,EAAmB,GAAiB,GAAyB;AACpE,yBAAO,IAAI,KAAK,GAAG,EAAQ,GAAG,EAAQ,KAAK,EAAC,aAAa;;AAG3D,IAAa,KAA2C,EACtD,SACA,UACA,gBACA,qBACA,YACA,mBACI;CACJ,IAAM,IAAY,EAA0B,KAAK,EAC3C,IAAY,EAAQ,GACpB,EAAE,SAA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