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