@burdenoff/microfe-calendar 2026.805.1 → 2026.830.2

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 (64) hide show
  1. package/dist/CalendarRoot.d.ts.map +1 -1
  2. package/dist/CalendarRoot.js +35 -38
  3. package/dist/CalendarRoot.js.map +1 -1
  4. package/dist/CalendarRoutes.d.ts.map +1 -1
  5. package/dist/CalendarRoutes.js +35 -34
  6. package/dist/CalendarRoutes.js.map +1 -1
  7. package/dist/components/AgendaView.d.ts.map +1 -1
  8. package/dist/components/AgendaView.js +33 -36
  9. package/dist/components/AgendaView.js.map +1 -1
  10. package/dist/components/CalendarErrorState.d.ts.map +1 -1
  11. package/dist/components/CalendarErrorState.js +4 -7
  12. package/dist/components/CalendarErrorState.js.map +1 -1
  13. package/dist/components/ConfirmDialog.d.ts.map +1 -1
  14. package/dist/components/ConfirmDialog.js +11 -14
  15. package/dist/components/ConfirmDialog.js.map +1 -1
  16. package/dist/components/DayView.d.ts.map +1 -1
  17. package/dist/components/DayView.js +21 -24
  18. package/dist/components/DayView.js.map +1 -1
  19. package/dist/components/EventFormModal.d.ts.map +1 -1
  20. package/dist/components/EventFormModal.js +184 -187
  21. package/dist/components/EventFormModal.js.map +1 -1
  22. package/dist/components/MiniCalendar.d.ts.map +1 -1
  23. package/dist/components/MiniCalendar.js +38 -37
  24. package/dist/components/MiniCalendar.js.map +1 -1
  25. package/dist/components/MonthView.d.ts.map +1 -1
  26. package/dist/components/MonthView.js +28 -31
  27. package/dist/components/MonthView.js.map +1 -1
  28. package/dist/components/TaskEventDetail.d.ts.map +1 -1
  29. package/dist/components/TaskEventDetail.js +28 -31
  30. package/dist/components/TaskEventDetail.js.map +1 -1
  31. package/dist/components/TimelineView.d.ts.map +1 -1
  32. package/dist/components/TimelineView.js +35 -38
  33. package/dist/components/TimelineView.js.map +1 -1
  34. package/dist/components/ViewSwitcher.d.ts.map +1 -1
  35. package/dist/components/ViewSwitcher.js +13 -16
  36. package/dist/components/ViewSwitcher.js.map +1 -1
  37. package/dist/components/WeekView.d.ts.map +1 -1
  38. package/dist/components/WeekView.js +24 -27
  39. package/dist/components/WeekView.js.map +1 -1
  40. package/dist/components/YearView.d.ts.map +1 -1
  41. package/dist/components/YearView.js +30 -33
  42. package/dist/components/YearView.js.map +1 -1
  43. package/dist/pages/CalendarPage.d.ts.map +1 -1
  44. package/dist/pages/CalendarPage.js +173 -176
  45. package/dist/pages/CalendarPage.js.map +1 -1
  46. package/dist/pages/EventDetailsPage.d.ts.map +1 -1
  47. package/dist/pages/EventDetailsPage.js +88 -85
  48. package/dist/pages/EventDetailsPage.js.map +1 -1
  49. package/dist/pages/ResourcesPage.d.ts.map +1 -1
  50. package/dist/pages/ResourcesPage.js +197 -200
  51. package/dist/pages/ResourcesPage.js.map +1 -1
  52. package/dist/pages/SettingsPage.d.ts.map +1 -1
  53. package/dist/pages/SettingsPage.js +213 -169
  54. package/dist/pages/SettingsPage.js.map +1 -1
  55. package/dist/pages/SubscriptionsPage.d.ts.map +1 -1
  56. package/dist/pages/SubscriptionsPage.js +37 -40
  57. package/dist/pages/SubscriptionsPage.js.map +1 -1
  58. package/dist/shared/hooks/useTr.d.ts +17 -0
  59. package/dist/shared/hooks/useTr.d.ts.map +1 -0
  60. package/dist/shared/hooks/useTr.js +14 -0
  61. package/dist/shared/hooks/useTr.js.map +1 -0
  62. package/dist/translations/en.d.ts +351 -0
  63. package/dist/translations/en.d.ts.map +1 -0
  64. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
- import { useGetCalendarsQuery as e } from "../generated/wspace-operations.js";
2
- import { useCalendarStore as t } from "../store/calendarStore.js";
3
- import { useSafePermissions as n } from "../hooks/useSafePermissions.js";
4
- import { AVAILABILITY_RULES_QUERY as r, BLACKOUT_DATES_QUERY as i, CALENDAR_DETAILS_QUERY as a, CONNECT_EXTERNAL_CALENDAR_MUTATION as ee, CREATE_AVAILABILITY_RULE_MUTATION as te, CREATE_BLACKOUT_DATE_MUTATION as ne, CREATE_BOOKING_PAGE_MUTATION as o, DELETE_AVAILABILITY_RULE_MUTATION as re, DELETE_BLACKOUT_DATE_MUTATION as ie, DELETE_BOOKING_PAGE_MUTATION as ae, DISCONNECT_EXTERNAL_CALENDAR_MUTATION as oe, EXTERNAL_SYNCS_QUERY as se, PAUSE_SYNC_MUTATION as ce, RESUME_SYNC_MUTATION as s, REVOKE_CALENDAR_SHARE_MUTATION as le, SHARE_CALENDAR_MUTATION as ue, TRIGGER_SYNC_MUTATION as de } from "../graphql/calendarDocuments.js";
5
- import { CALENDAR_PERMISSIONS as fe } from "../constants/permissions.js";
6
- import { useMemo as c, useState as l } from "react";
1
+ import { useTr as e } from "../shared/hooks/useTr.js";
2
+ import { useGetCalendarsQuery as t } from "../generated/wspace-operations.js";
3
+ import { useCalendarStore as n } from "../store/calendarStore.js";
4
+ import { useSafePermissions as r } from "../hooks/useSafePermissions.js";
5
+ import { AVAILABILITY_RULES_QUERY as i, BLACKOUT_DATES_QUERY as a, CALENDAR_DETAILS_QUERY as o, CONNECT_EXTERNAL_CALENDAR_MUTATION as ee, CREATE_AVAILABILITY_RULE_MUTATION as te, CREATE_BLACKOUT_DATE_MUTATION as ne, CREATE_BOOKING_PAGE_MUTATION as re, DELETE_AVAILABILITY_RULE_MUTATION as ie, DELETE_BLACKOUT_DATE_MUTATION as ae, DELETE_BOOKING_PAGE_MUTATION as oe, DISCONNECT_EXTERNAL_CALENDAR_MUTATION as se, EXTERNAL_SYNCS_QUERY as ce, PAUSE_SYNC_MUTATION as le, RESUME_SYNC_MUTATION as ue, REVOKE_CALENDAR_SHARE_MUTATION as de, SHARE_CALENDAR_MUTATION as fe, TRIGGER_SYNC_MUTATION as s } from "../graphql/calendarDocuments.js";
6
+ import { CALENDAR_PERMISSIONS as c } from "../constants/permissions.js";
7
+ import { useMemo as l, useState as u } from "react";
7
8
  import { AccessDenied as pe } from "@burdenoff/fe-libs/shared/components";
8
- import { useI18n as me } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
- import { CalendarClock as he, CalendarDays as ge, Clock as u, Link2 as _e, Settings as ve, Shield as ye, Users as be } from "lucide-react";
9
+ import { CalendarClock as me, CalendarDays as he, Clock as ge, Link2 as _e, Settings as ve, Shield as ye, Users as be } from "lucide-react";
10
10
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
11
11
  import { GlassCard as p, GradientText as xe, IllustratedEmptyState as m, NextSteps as Se, PagePurpose as Ce } from "@burdenoff/fe-libs/ui";
12
12
  import { useMutation as h, useQuery as g } from "@apollo/client/react";
@@ -36,17 +36,14 @@ function v(e) {
36
36
  return e ? new Date(e).toLocaleString() : "—";
37
37
  }
38
38
  function y() {
39
- let { hasPermission: p, isLoading: y } = n(), b = t((e) => e.currentView), x = t((e) => e.selectedTimeZone), we = t((e) => e.setTimeZone), Te = t((e) => e.miniCalendarVisible), Ee = t((e) => e.setMiniCalendarVisible), { t: De } = me(), S = (e, t) => {
40
- let n = De(e);
41
- return n === e ? t : n;
42
- }, C = {
39
+ let { hasPermission: p, isLoading: y } = r(), b = n((e) => e.currentView), x = n((e) => e.selectedTimeZone), we = n((e) => e.setTimeZone), Te = n((e) => e.miniCalendarVisible), Ee = n((e) => e.setMiniCalendarVisible), S = e(), De = {
43
40
  day: S("calendar.day", "Day"),
44
41
  week: S("calendar.week", "Week"),
45
42
  month: S("calendar.month", "Month"),
46
43
  year: S("calendar.year", "Year"),
47
44
  agenda: S("calendar.agenda", "Agenda"),
48
45
  timeline: S("calendar.timeline", "Timeline")
49
- }, [w, T] = l(""), [E, D] = l(""), [O, Oe] = l("user"), [k, A] = l("VIEW"), [j, M] = l({
46
+ }, [C, w] = u(""), [T, E] = u(""), [D, Oe] = u("user"), [O, k] = u("VIEW"), [A, j] = u({
50
47
  dayOfWeek: "MONDAY",
51
48
  startTime: "09:00",
52
49
  endTime: "17:00",
@@ -55,11 +52,11 @@ function y() {
55
52
  slotIncrement: "30",
56
53
  minNotice: "60",
57
54
  maxNotice: "43200"
58
- }), [N, P] = l({
55
+ }), [M, N] = u({
59
56
  startDate: "",
60
57
  endDate: "",
61
58
  reason: ""
62
- }), [F, I] = l({
59
+ }), [P, F] = u({
63
60
  name: "",
64
61
  slug: "",
65
62
  pageType: "ONE_ON_ONE",
@@ -67,7 +64,7 @@ function y() {
67
64
  locationType: "ONLINE",
68
65
  maxAttendees: "1",
69
66
  requireApproval: !1
70
- }), [L, R] = l({
67
+ }), [I, L] = u({
71
68
  provider: "GOOGLE_CALENDAR",
72
69
  externalCalendarId: "",
73
70
  externalCalendarName: "",
@@ -75,30 +72,30 @@ function y() {
75
72
  refreshToken: "",
76
73
  syncFrequency: "300",
77
74
  direction: "TWO_WAY"
78
- }), { data: z, loading: ke, refetch: Ae } = e({
75
+ }), { data: R, loading: ke, refetch: Ae } = t({
79
76
  variables: { pagination: { limit: 50 } },
80
77
  skip: y
81
- }), B = c(() => z?.calendars?.calendars ?? [], [z?.calendars?.calendars]), V = c(() => w || ((B.find((e) => e.isDefault) ?? B[0])?.id ?? ""), [B, w]), H = c(() => /* @__PURE__ */ new Date(), []), je = c(() => new Date(H.getFullYear() - 1, H.getMonth(), H.getDate()).toISOString(), [H]), Me = c(() => new Date(H.getFullYear() + 1, H.getMonth(), H.getDate()).toISOString(), [H]), { data: Ne, refetch: Pe } = g(a, {
82
- variables: { id: V },
83
- skip: !V,
78
+ }), z = l(() => R?.calendars?.calendars ?? [], [R?.calendars?.calendars]), B = l(() => C || ((z.find((e) => e.isDefault) ?? z[0])?.id ?? ""), [z, C]), V = l(() => /* @__PURE__ */ new Date(), []), je = l(() => new Date(V.getFullYear() - 1, V.getMonth(), V.getDate()).toISOString(), [V]), Me = l(() => new Date(V.getFullYear() + 1, V.getMonth(), V.getDate()).toISOString(), [V]), { data: Ne, refetch: Pe } = g(o, {
79
+ variables: { id: B },
80
+ skip: !B,
84
81
  fetchPolicy: "cache-and-network"
85
- }), { data: Fe, refetch: Ie } = g(r, {
86
- variables: { calendarId: V },
87
- skip: !V,
82
+ }), { data: Fe, refetch: Ie } = g(i, {
83
+ variables: { calendarId: B },
84
+ skip: !B,
88
85
  fetchPolicy: "cache-and-network"
89
- }), { data: Le, refetch: Re } = g(i, {
86
+ }), { data: Le, refetch: Re } = g(a, {
90
87
  variables: {
91
- calendarId: V,
88
+ calendarId: B,
92
89
  startDate: je,
93
90
  endDate: Me
94
91
  },
95
- skip: !V,
92
+ skip: !B,
96
93
  fetchPolicy: "cache-and-network"
97
- }), { data: ze, refetch: Be } = g(se, {
98
- variables: { calendarId: V },
99
- skip: !V,
94
+ }), { data: ze, refetch: Be } = g(ce, {
95
+ variables: { calendarId: B },
96
+ skip: !B,
100
97
  fetchPolicy: "cache-and-network"
101
- }), [Ve, { loading: U }] = h(ue), [He] = h(le), [Ue, { loading: W }] = h(te), [We] = h(re), [Ge, { loading: G }] = h(ne), [Ke] = h(ie), [qe, { loading: K }] = h(o), [Je] = h(ae), [Ye, { loading: q }] = h(ee), [Xe] = h(ce), [Ze] = h(s), [Qe] = h(de), [$e] = h(oe), J = Ne?.calendar, Y = J?.shares ?? [], X = J?.bookingPages ?? [], Z = Fe?.getAvailabilityRules ?? [], et = Le?.getBlackoutDates ?? [], Q = ze?.getExternalCalendarSyncs ?? [], $ = async () => {
98
+ }), [Ve, { loading: H }] = h(fe), [He] = h(de), [Ue, { loading: U }] = h(te), [We] = h(ie), [Ge, { loading: W }] = h(ne), [Ke] = h(ae), [qe, { loading: G }] = h(re), [Je] = h(oe), [K, { loading: q }] = h(ee), [Ye] = h(le), [Xe] = h(ue), [Ze] = h(s), [Qe] = h(se), J = Ne?.calendar, Y = J?.shares ?? [], X = J?.bookingPages ?? [], Z = Fe?.getAvailabilityRules ?? [], $e = Le?.getBlackoutDates ?? [], Q = ze?.getExternalCalendarSyncs ?? [], $ = async () => {
102
99
  await Promise.all([
103
100
  Ae(),
104
101
  Pe(),
@@ -113,7 +110,7 @@ function y() {
113
110
  className: "font-text-md text-text-secondary",
114
111
  children: S("calendar.loading", "Loading...")
115
112
  })
116
- }) : p(fe.CALENDAR_READ) ? /* @__PURE__ */ f("div", {
113
+ }) : p(c.CALENDAR_READ) ? /* @__PURE__ */ f("div", {
117
114
  className: "@container min-h-screen bg-bg-canvas",
118
115
  children: [/* @__PURE__ */ f("header", {
119
116
  className: "border-b border-border-seam bg-bg-surface px-6 py-3",
@@ -164,12 +161,12 @@ function y() {
164
161
  emphasis: !0,
165
162
  title: S("calendar.activeCalendar", "Active calendar"),
166
163
  description: S("calendar.activeCalendarDescription", "Choose which calendar to manage for availability, shares, booking pages, and syncs."),
167
- icon: ge,
164
+ icon: he,
168
165
  children: /* @__PURE__ */ d("select", {
169
- value: V,
170
- onChange: (e) => T(e.target.value),
166
+ value: B,
167
+ onChange: (e) => w(e.target.value),
171
168
  className: "w-full px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
172
- children: B.map((e) => /* @__PURE__ */ d("option", {
169
+ children: z.map((e) => /* @__PURE__ */ d("option", {
173
170
  value: e.id,
174
171
  children: e.name
175
172
  }, e.id))
@@ -178,7 +175,7 @@ function y() {
178
175
  /* @__PURE__ */ f(_, {
179
176
  title: S("calendar.displayPreferences", "Display preferences"),
180
177
  description: S("calendar.displayPreferencesDescription", "Personalize your default view, sidebar visibility, and timezone rendering."),
181
- icon: u,
178
+ icon: ge,
182
179
  children: [/* @__PURE__ */ f("div", {
183
180
  className: "grid grid-cols-1 gap-4 @md:grid-cols-2",
184
181
  children: [/* @__PURE__ */ f("div", {
@@ -188,7 +185,7 @@ function y() {
188
185
  children: S("calendar.currentView", "Current view")
189
186
  }), /* @__PURE__ */ d("p", {
190
187
  className: "font-text-sm text-text-secondary",
191
- children: C[b] ?? b
188
+ children: De[b] ?? b
192
189
  })]
193
190
  }), /* @__PURE__ */ f("div", {
194
191
  className: "flex items-center justify-between rounded-radius-md border border-border-subtle px-3 py-2 bg-bg-canvas",
@@ -226,19 +223,19 @@ function y() {
226
223
  icon: be,
227
224
  children: [/* @__PURE__ */ f("form", {
228
225
  onSubmit: async (e) => {
229
- e.preventDefault(), !(!V || !E.trim()) && (await Ve({ variables: {
230
- calendarId: V,
231
- userId: O === "user" ? E.trim() : void 0,
232
- teamId: O === "team" ? E.trim() : void 0,
226
+ e.preventDefault(), !(!B || !T.trim()) && (await Ve({ variables: {
227
+ calendarId: B,
228
+ userId: D === "user" ? T.trim() : void 0,
229
+ teamId: D === "team" ? T.trim() : void 0,
233
230
  canView: !0,
234
- canEdit: k !== "VIEW",
235
- canManage: k === "ADMIN"
236
- } }), D(""), A("VIEW"), await $());
231
+ canEdit: O !== "VIEW",
232
+ canManage: O === "ADMIN"
233
+ } }), E(""), k("VIEW"), await $());
237
234
  },
238
235
  className: "grid grid-cols-1 gap-3 @md:grid-cols-4",
239
236
  children: [
240
237
  /* @__PURE__ */ f("select", {
241
- value: O,
238
+ value: D,
242
239
  onChange: (e) => Oe(e.target.value),
243
240
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
244
241
  children: [/* @__PURE__ */ d("option", {
@@ -250,15 +247,15 @@ function y() {
250
247
  })]
251
248
  }),
252
249
  /* @__PURE__ */ d("input", {
253
- value: E,
254
- onChange: (e) => D(e.target.value),
250
+ value: T,
251
+ onChange: (e) => E(e.target.value),
255
252
  placeholder: S("calendar.shareTargetPlaceholder", "User ID or team ID"),
256
253
  "aria-label": S("calendar.shareTarget", "Share target"),
257
254
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm placeholder:text-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-border"
258
255
  }),
259
256
  /* @__PURE__ */ f("select", {
260
- value: k,
261
- onChange: (e) => A(e.target.value),
257
+ value: O,
258
+ onChange: (e) => k(e.target.value),
262
259
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
263
260
  children: [
264
261
  /* @__PURE__ */ d("option", {
@@ -277,9 +274,9 @@ function y() {
277
274
  }),
278
275
  /* @__PURE__ */ d("button", {
279
276
  type: "submit",
280
- disabled: !V || !E.trim() || U,
277
+ disabled: !B || !T.trim() || H,
281
278
  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 disabled:opacity-50",
282
- children: U ? S("calendar.sharing", "Sharing...") : S("calendar.shareCalendar", "Share calendar")
279
+ children: H ? S("calendar.sharing", "Sharing...") : S("calendar.shareCalendar", "Share calendar")
283
280
  })
284
281
  ]
285
282
  }), /* @__PURE__ */ d("div", {
@@ -297,9 +294,9 @@ function y() {
297
294
  }), /* @__PURE__ */ f("p", {
298
295
  className: "font-text-xs text-text-tertiary",
299
296
  children: [
300
- e.canManage ? "ADMIN" : e.canEdit ? "EDIT" : "VIEW",
301
- " •",
297
+ e.canManage ? S("calendar.permissionLevelAdmin", "ADMIN") : e.canEdit ? S("calendar.permissionLevelEdit", "EDIT") : S("calendar.permissionLevelView", "VIEW"),
302
298
  " ",
299
+ "• ",
303
300
  v(e.createdAt)
304
301
  ]
305
302
  })] }), /* @__PURE__ */ d("button", {
@@ -317,50 +314,71 @@ function y() {
317
314
  id: "settings-availability",
318
315
  title: S("calendar.availabilityAndBlocking", "Availability and blocking"),
319
316
  description: S("calendar.availabilityAndBlockingDescription", "Define recurring availability and create manual blackout windows for booking protection."),
320
- icon: he,
317
+ icon: me,
321
318
  children: [
322
319
  /* @__PURE__ */ f("form", {
323
320
  onSubmit: async (e) => {
324
- e.preventDefault(), V && (await Ue({ variables: { input: {
325
- calendarId: V,
326
- dayOfWeek: j.dayOfWeek,
321
+ e.preventDefault(), B && (await Ue({ variables: { input: {
322
+ calendarId: B,
323
+ dayOfWeek: A.dayOfWeek,
327
324
  isAvailable: !0,
328
- startTime: j.startTime,
329
- endTime: j.endTime,
325
+ startTime: A.startTime,
326
+ endTime: A.endTime,
330
327
  timezone: x,
331
- bufferBefore: parseInt(j.bufferBefore, 10),
332
- bufferAfter: parseInt(j.bufferAfter, 10),
333
- slotIncrement: parseInt(j.slotIncrement, 10),
334
- minNotice: parseInt(j.minNotice, 10),
335
- maxNotice: parseInt(j.maxNotice, 10)
328
+ bufferBefore: parseInt(A.bufferBefore, 10),
329
+ bufferAfter: parseInt(A.bufferAfter, 10),
330
+ slotIncrement: parseInt(A.slotIncrement, 10),
331
+ minNotice: parseInt(A.minNotice, 10),
332
+ maxNotice: parseInt(A.maxNotice, 10)
336
333
  } } }), await $());
337
334
  },
338
335
  className: "grid grid-cols-1 gap-3 @md:grid-cols-4",
339
336
  children: [
340
337
  /* @__PURE__ */ d("select", {
341
- value: j.dayOfWeek,
342
- onChange: (e) => M((t) => ({
338
+ value: A.dayOfWeek,
339
+ onChange: (e) => j((t) => ({
343
340
  ...t,
344
341
  dayOfWeek: e.target.value
345
342
  })),
346
343
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
347
344
  children: [
348
- "MONDAY",
349
- "TUESDAY",
350
- "WEDNESDAY",
351
- "THURSDAY",
352
- "FRIDAY",
353
- "SATURDAY",
354
- "SUNDAY"
355
- ].map((e) => /* @__PURE__ */ d("option", {
345
+ {
346
+ value: "MONDAY",
347
+ label: S("calendar.dayOfWeekMonday", "Monday")
348
+ },
349
+ {
350
+ value: "TUESDAY",
351
+ label: S("calendar.dayOfWeekTuesday", "Tuesday")
352
+ },
353
+ {
354
+ value: "WEDNESDAY",
355
+ label: S("calendar.dayOfWeekWednesday", "Wednesday")
356
+ },
357
+ {
358
+ value: "THURSDAY",
359
+ label: S("calendar.dayOfWeekThursday", "Thursday")
360
+ },
361
+ {
362
+ value: "FRIDAY",
363
+ label: S("calendar.dayOfWeekFriday", "Friday")
364
+ },
365
+ {
366
+ value: "SATURDAY",
367
+ label: S("calendar.dayOfWeekSaturday", "Saturday")
368
+ },
369
+ {
370
+ value: "SUNDAY",
371
+ label: S("calendar.dayOfWeekSunday", "Sunday")
372
+ }
373
+ ].map(({ value: e, label: t }) => /* @__PURE__ */ d("option", {
356
374
  value: e,
357
- children: e
375
+ children: t
358
376
  }, e))
359
377
  }),
360
378
  /* @__PURE__ */ d("input", {
361
379
  type: "time",
362
- value: j.startTime,
363
- onChange: (e) => M((t) => ({
380
+ value: A.startTime,
381
+ onChange: (e) => j((t) => ({
364
382
  ...t,
365
383
  startTime: e.target.value
366
384
  })),
@@ -369,8 +387,8 @@ function y() {
369
387
  }),
370
388
  /* @__PURE__ */ d("input", {
371
389
  type: "time",
372
- value: j.endTime,
373
- onChange: (e) => M((t) => ({
390
+ value: A.endTime,
391
+ onChange: (e) => j((t) => ({
374
392
  ...t,
375
393
  endTime: e.target.value
376
394
  })),
@@ -379,9 +397,9 @@ function y() {
379
397
  }),
380
398
  /* @__PURE__ */ d("button", {
381
399
  type: "submit",
382
- disabled: !V || W,
400
+ disabled: !B || U,
383
401
  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 disabled:opacity-50",
384
- children: W ? S("calendar.savingAvailability", "Saving...") : S("calendar.addAvailabilityRule", "Add availability rule")
402
+ children: U ? S("calendar.savingAvailability", "Saving...") : S("calendar.addAvailabilityRule", "Add availability rule")
385
403
  })
386
404
  ]
387
405
  }),
@@ -418,12 +436,12 @@ function y() {
418
436
  }),
419
437
  /* @__PURE__ */ f("form", {
420
438
  onSubmit: async (e) => {
421
- e.preventDefault(), !(!V || !N.startDate || !N.endDate) && (await Ge({ variables: { input: {
422
- calendarId: V,
423
- startDate: new Date(N.startDate).toISOString(),
424
- endDate: new Date(N.endDate).toISOString(),
425
- reason: N.reason || void 0
426
- } } }), P({
439
+ e.preventDefault(), !(!B || !M.startDate || !M.endDate) && (await Ge({ variables: { input: {
440
+ calendarId: B,
441
+ startDate: new Date(M.startDate).toISOString(),
442
+ endDate: new Date(M.endDate).toISOString(),
443
+ reason: M.reason || void 0
444
+ } } }), N({
427
445
  startDate: "",
428
446
  endDate: "",
429
447
  reason: ""
@@ -433,8 +451,8 @@ function y() {
433
451
  children: [
434
452
  /* @__PURE__ */ d("input", {
435
453
  type: "datetime-local",
436
- value: N.startDate,
437
- onChange: (e) => P((t) => ({
454
+ value: M.startDate,
455
+ onChange: (e) => N((t) => ({
438
456
  ...t,
439
457
  startDate: e.target.value
440
458
  })),
@@ -443,8 +461,8 @@ function y() {
443
461
  }),
444
462
  /* @__PURE__ */ d("input", {
445
463
  type: "datetime-local",
446
- value: N.endDate,
447
- onChange: (e) => P((t) => ({
464
+ value: M.endDate,
465
+ onChange: (e) => N((t) => ({
448
466
  ...t,
449
467
  endDate: e.target.value
450
468
  })),
@@ -452,8 +470,8 @@ function y() {
452
470
  "aria-label": S("calendar.blackoutEnd", "Blackout end")
453
471
  }),
454
472
  /* @__PURE__ */ d("input", {
455
- value: N.reason,
456
- onChange: (e) => P((t) => ({
473
+ value: M.reason,
474
+ onChange: (e) => N((t) => ({
457
475
  ...t,
458
476
  reason: e.target.value
459
477
  })),
@@ -463,15 +481,15 @@ function y() {
463
481
  }),
464
482
  /* @__PURE__ */ d("button", {
465
483
  type: "submit",
466
- disabled: !V || G,
484
+ disabled: !B || W,
467
485
  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 disabled:opacity-50",
468
- children: G ? S("calendar.blocking", "Blocking...") : S("calendar.addBlackout", "Add block")
486
+ children: W ? S("calendar.blocking", "Blocking...") : S("calendar.addBlackout", "Add block")
469
487
  })
470
488
  ]
471
489
  }),
472
490
  /* @__PURE__ */ d("div", {
473
491
  className: "space-y-2",
474
- children: et.map((e) => /* @__PURE__ */ f("div", {
492
+ children: $e.map((e) => /* @__PURE__ */ f("div", {
475
493
  className: "flex items-center justify-between rounded-radius-md border border-border-subtle bg-bg-canvas p-3",
476
494
  children: [/* @__PURE__ */ f("div", { children: [/* @__PURE__ */ f("p", {
477
495
  className: "font-text-sm font-weight-medium text-text-primary",
@@ -502,18 +520,18 @@ function y() {
502
520
  icon: _e,
503
521
  children: [/* @__PURE__ */ f("form", {
504
522
  onSubmit: async (e) => {
505
- e.preventDefault(), !(!V || !F.name.trim() || !F.slug.trim()) && (await qe({ variables: { input: {
506
- calendarId: V,
507
- name: F.name.trim(),
508
- slug: F.slug.trim(),
509
- pageType: F.pageType,
510
- eventDuration: parseInt(F.eventDuration, 10),
511
- locationType: F.locationType,
512
- maxAttendees: parseInt(F.maxAttendees, 10),
513
- requireApproval: F.requireApproval,
523
+ e.preventDefault(), !(!B || !P.name.trim() || !P.slug.trim()) && (await qe({ variables: { input: {
524
+ calendarId: B,
525
+ name: P.name.trim(),
526
+ slug: P.slug.trim(),
527
+ pageType: P.pageType,
528
+ eventDuration: parseInt(P.eventDuration, 10),
529
+ locationType: P.locationType,
530
+ maxAttendees: parseInt(P.maxAttendees, 10),
531
+ requireApproval: P.requireApproval,
514
532
  isActive: !0,
515
533
  isPublic: !0
516
- } } }), I({
534
+ } } }), F({
517
535
  name: "",
518
536
  slug: "",
519
537
  pageType: "ONE_ON_ONE",
@@ -527,8 +545,8 @@ function y() {
527
545
  children: [
528
546
  /* @__PURE__ */ d("input", {
529
547
  "aria-label": S("calendar.bookingPageName", "Booking page name"),
530
- value: F.name,
531
- onChange: (e) => I((t) => ({
548
+ value: P.name,
549
+ onChange: (e) => F((t) => ({
532
550
  ...t,
533
551
  name: e.target.value
534
552
  })),
@@ -537,8 +555,8 @@ function y() {
537
555
  }),
538
556
  /* @__PURE__ */ d("input", {
539
557
  "aria-label": S("calendar.bookingPageSlugLabel", "Booking page slug"),
540
- value: F.slug,
541
- onChange: (e) => I((t) => ({
558
+ value: P.slug,
559
+ onChange: (e) => F((t) => ({
542
560
  ...t,
543
561
  slug: e.target.value
544
562
  })),
@@ -550,45 +568,69 @@ function y() {
550
568
  type: "number",
551
569
  min: "15",
552
570
  step: "15",
553
- value: F.eventDuration,
554
- onChange: (e) => I((t) => ({
571
+ value: P.eventDuration,
572
+ onChange: (e) => F((t) => ({
555
573
  ...t,
556
574
  eventDuration: e.target.value
557
575
  })),
558
576
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border"
559
577
  }),
560
578
  /* @__PURE__ */ d("select", {
561
- value: F.pageType,
562
- onChange: (e) => I((t) => ({
579
+ value: P.pageType,
580
+ onChange: (e) => F((t) => ({
563
581
  ...t,
564
582
  pageType: e.target.value
565
583
  })),
566
584
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
567
585
  children: [
568
- "ONE_ON_ONE",
569
- "GROUP",
570
- "ROUND_ROBIN",
571
- "COLLECTIVE"
572
- ].map((e) => /* @__PURE__ */ d("option", {
586
+ {
587
+ value: "ONE_ON_ONE",
588
+ label: S("calendar.pageTypeOneOnOne", "One-on-one")
589
+ },
590
+ {
591
+ value: "GROUP",
592
+ label: S("calendar.pageTypeGroup", "Group")
593
+ },
594
+ {
595
+ value: "ROUND_ROBIN",
596
+ label: S("calendar.pageTypeRoundRobin", "Round-robin")
597
+ },
598
+ {
599
+ value: "COLLECTIVE",
600
+ label: S("calendar.pageTypeCollective", "Collective")
601
+ }
602
+ ].map(({ value: e, label: t }) => /* @__PURE__ */ d("option", {
573
603
  value: e,
574
- children: e
604
+ children: t
575
605
  }, e))
576
606
  }),
577
607
  /* @__PURE__ */ d("select", {
578
- value: F.locationType,
579
- onChange: (e) => I((t) => ({
608
+ value: P.locationType,
609
+ onChange: (e) => F((t) => ({
580
610
  ...t,
581
611
  locationType: e.target.value
582
612
  })),
583
613
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border",
584
614
  children: [
585
- "ONLINE",
586
- "PHYSICAL",
587
- "HYBRID",
588
- "TBD"
589
- ].map((e) => /* @__PURE__ */ d("option", {
615
+ {
616
+ value: "ONLINE",
617
+ label: S("calendar.locationTypeOnline", "Online")
618
+ },
619
+ {
620
+ value: "PHYSICAL",
621
+ label: S("calendar.locationTypePhysical", "Physical")
622
+ },
623
+ {
624
+ value: "HYBRID",
625
+ label: S("calendar.locationTypeHybrid", "Hybrid")
626
+ },
627
+ {
628
+ value: "TBD",
629
+ label: S("calendar.locationTypeTbd", "TBD")
630
+ }
631
+ ].map(({ value: e, label: t }) => /* @__PURE__ */ d("option", {
590
632
  value: e,
591
- children: e
633
+ children: t
592
634
  }, e))
593
635
  }),
594
636
  /* @__PURE__ */ f("div", {
@@ -597,8 +639,8 @@ function y() {
597
639
  id: "booking-page-approval",
598
640
  "aria-label": S("calendar.requireApproval", "Require approval"),
599
641
  type: "checkbox",
600
- checked: F.requireApproval,
601
- onChange: (e) => I((t) => ({
642
+ checked: P.requireApproval,
643
+ onChange: (e) => F((t) => ({
602
644
  ...t,
603
645
  requireApproval: e.target.checked
604
646
  })),
@@ -611,9 +653,9 @@ function y() {
611
653
  }),
612
654
  /* @__PURE__ */ d("button", {
613
655
  type: "submit",
614
- disabled: !V || K,
656
+ disabled: !B || G,
615
657
  className: "@md:col-span-3 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 disabled:opacity-50",
616
- children: K ? S("calendar.creating", "Creating...") : S("calendar.createBookingPage", "Create booking page")
658
+ children: G ? S("calendar.creating", "Creating...") : S("calendar.createBookingPage", "Create booking page")
617
659
  })
618
660
  ]
619
661
  }), /* @__PURE__ */ f("div", {
@@ -637,11 +679,13 @@ function y() {
637
679
  children: [
638
680
  "/book/",
639
681
  e.slug,
640
- " • ",
641
- e.isPublic ? "PUBLIC" : "PRIVATE",
642
682
  " •",
643
683
  " ",
644
- e.isActive ? "ACTIVE" : "INACTIVE"
684
+ e.isPublic ? S("calendar.statusPublic", "PUBLIC") : S("calendar.statusPrivate", "PRIVATE"),
685
+ " ",
686
+ "•",
687
+ " ",
688
+ e.isActive ? S("calendar.statusActive", "ACTIVE") : S("calendar.statusInactive", "INACTIVE")
645
689
  ]
646
690
  })] }), /* @__PURE__ */ d("button", {
647
691
  type: "button",
@@ -661,16 +705,16 @@ function y() {
661
705
  icon: ye,
662
706
  children: [/* @__PURE__ */ f("form", {
663
707
  onSubmit: async (e) => {
664
- e.preventDefault(), !(!V || !L.externalCalendarId.trim() || !L.accessToken.trim()) && (await Ye({ variables: { input: {
665
- calendarId: V,
666
- provider: L.provider,
667
- externalCalendarId: L.externalCalendarId.trim(),
668
- externalCalendarName: L.externalCalendarName.trim() || void 0,
669
- accessToken: L.accessToken.trim(),
670
- refreshToken: L.refreshToken.trim() || void 0,
671
- syncFrequency: parseInt(L.syncFrequency, 10),
672
- direction: L.direction
673
- } } }), R({
708
+ e.preventDefault(), !(!B || !I.externalCalendarId.trim() || !I.accessToken.trim()) && (await K({ variables: { input: {
709
+ calendarId: B,
710
+ provider: I.provider,
711
+ externalCalendarId: I.externalCalendarId.trim(),
712
+ externalCalendarName: I.externalCalendarName.trim() || void 0,
713
+ accessToken: I.accessToken.trim(),
714
+ refreshToken: I.refreshToken.trim() || void 0,
715
+ syncFrequency: parseInt(I.syncFrequency, 10),
716
+ direction: I.direction
717
+ } } }), L({
674
718
  provider: "GOOGLE_CALENDAR",
675
719
  externalCalendarId: "",
676
720
  externalCalendarName: "",
@@ -683,8 +727,8 @@ function y() {
683
727
  className: "grid grid-cols-1 gap-3 @md:grid-cols-3",
684
728
  children: [
685
729
  /* @__PURE__ */ f("select", {
686
- value: L.provider,
687
- onChange: (e) => R((t) => ({
730
+ value: I.provider,
731
+ onChange: (e) => L((t) => ({
688
732
  ...t,
689
733
  provider: e.target.value
690
734
  })),
@@ -692,26 +736,26 @@ function y() {
692
736
  children: [
693
737
  /* @__PURE__ */ d("option", {
694
738
  value: "GOOGLE_CALENDAR",
695
- children: "Google Calendar"
739
+ children: S("calendar.providerGoogleCalendar", "Google Calendar")
696
740
  }),
697
741
  /* @__PURE__ */ d("option", {
698
742
  value: "OUTLOOK_CALENDAR",
699
- children: "Outlook Calendar"
743
+ children: S("calendar.providerOutlookCalendar", "Outlook Calendar")
700
744
  }),
701
745
  /* @__PURE__ */ d("option", {
702
746
  value: "APPLE_ICAL",
703
- children: "Apple Calendar"
747
+ children: S("calendar.providerAppleCalendar", "Apple Calendar")
704
748
  }),
705
749
  /* @__PURE__ */ d("option", {
706
750
  value: "CALDAV",
707
- children: "CalDAV"
751
+ children: S("calendar.providerCalDav", "CalDAV")
708
752
  })
709
753
  ]
710
754
  }),
711
755
  /* @__PURE__ */ d("input", {
712
756
  "aria-label": S("calendar.externalCalendarId", "External calendar ID"),
713
- value: L.externalCalendarId,
714
- onChange: (e) => R((t) => ({
757
+ value: I.externalCalendarId,
758
+ onChange: (e) => L((t) => ({
715
759
  ...t,
716
760
  externalCalendarId: e.target.value
717
761
  })),
@@ -720,8 +764,8 @@ function y() {
720
764
  }),
721
765
  /* @__PURE__ */ d("input", {
722
766
  "aria-label": S("calendar.externalCalendarName", "External calendar name"),
723
- value: L.externalCalendarName,
724
- onChange: (e) => R((t) => ({
767
+ value: I.externalCalendarName,
768
+ onChange: (e) => L((t) => ({
725
769
  ...t,
726
770
  externalCalendarName: e.target.value
727
771
  })),
@@ -730,8 +774,8 @@ function y() {
730
774
  }),
731
775
  /* @__PURE__ */ d("input", {
732
776
  "aria-label": S("calendar.accessToken", "Access token"),
733
- value: L.accessToken,
734
- onChange: (e) => R((t) => ({
777
+ value: I.accessToken,
778
+ onChange: (e) => L((t) => ({
735
779
  ...t,
736
780
  accessToken: e.target.value
737
781
  })),
@@ -740,8 +784,8 @@ function y() {
740
784
  }),
741
785
  /* @__PURE__ */ d("input", {
742
786
  "aria-label": S("calendar.refreshToken", "Refresh token (optional)"),
743
- value: L.refreshToken,
744
- onChange: (e) => R((t) => ({
787
+ value: I.refreshToken,
788
+ onChange: (e) => L((t) => ({
745
789
  ...t,
746
790
  refreshToken: e.target.value
747
791
  })),
@@ -753,16 +797,16 @@ function y() {
753
797
  type: "number",
754
798
  min: "60",
755
799
  step: "60",
756
- value: L.syncFrequency,
757
- onChange: (e) => R((t) => ({
800
+ value: I.syncFrequency,
801
+ onChange: (e) => L((t) => ({
758
802
  ...t,
759
803
  syncFrequency: e.target.value
760
804
  })),
761
805
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-canvas text-text-primary font-text-sm focus:outline-none focus:ring-2 focus:ring-action-primary-border"
762
806
  }),
763
807
  /* @__PURE__ */ f("select", {
764
- value: L.direction,
765
- onChange: (e) => R((t) => ({
808
+ value: I.direction,
809
+ onChange: (e) => L((t) => ({
766
810
  ...t,
767
811
  direction: e.target.value
768
812
  })),
@@ -784,7 +828,7 @@ function y() {
784
828
  }),
785
829
  /* @__PURE__ */ d("button", {
786
830
  type: "submit",
787
- disabled: !V || q,
831
+ disabled: !B || q,
788
832
  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 disabled:opacity-50",
789
833
  children: q ? S("calendar.connecting", "Connecting...") : S("calendar.connectExternalCalendar", "Connect external calendar")
790
834
  })
@@ -813,7 +857,7 @@ function y() {
813
857
  e.status,
814
858
  " •",
815
859
  " ",
816
- S("calendar.everySeconds", "Every {value} seconds").replace("{value}", String(e.syncFrequency))
860
+ S("calendar.everySeconds", "Every {{value}} seconds", { value: e.syncFrequency })
817
861
  ]
818
862
  }),
819
863
  /* @__PURE__ */ f("p", {
@@ -824,7 +868,7 @@ function y() {
824
868
  v(e.lastSyncAt),
825
869
  " •",
826
870
  " ",
827
- e.lastSyncStatus ?? "—"
871
+ e.lastSyncStatus ?? S("calendar.notAvailable", "—")
828
872
  ]
829
873
  }),
830
874
  e.lastSyncError ? /* @__PURE__ */ d("p", {
@@ -837,7 +881,7 @@ function y() {
837
881
  /* @__PURE__ */ d("button", {
838
882
  type: "button",
839
883
  onClick: async () => {
840
- await Qe({ variables: { syncId: e.id } }), await $();
884
+ await Ze({ variables: { syncId: e.id } }), await $();
841
885
  },
842
886
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary font-text-sm",
843
887
  children: S("calendar.triggerSync", "Trigger sync")
@@ -845,7 +889,7 @@ function y() {
845
889
  /* @__PURE__ */ d("button", {
846
890
  type: "button",
847
891
  onClick: async () => {
848
- e.syncEnabled ? await Xe({ variables: { syncId: e.id } }) : await Ze({ variables: { syncId: e.id } }), await $();
892
+ e.syncEnabled ? await Ye({ variables: { syncId: e.id } }) : await Xe({ variables: { syncId: e.id } }), await $();
849
893
  },
850
894
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary font-text-sm",
851
895
  children: e.syncEnabled ? S("calendar.pauseSync", "Pause") : S("calendar.resumeSync", "Resume")
@@ -853,7 +897,7 @@ function y() {
853
897
  /* @__PURE__ */ d("button", {
854
898
  type: "button",
855
899
  onClick: async () => {
856
- await $e({ variables: { syncId: e.id } }), await $();
900
+ await Qe({ variables: { syncId: e.id } }), await $();
857
901
  },
858
902
  className: "px-3 py-2 rounded-radius-md border border-border-default bg-bg-surface hover:bg-bg-elevated text-text-primary font-text-sm",
859
903
  children: S("calendar.disconnect", "Disconnect")