@burdenoff/microfe-calendar 2026.830.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,31 +1,28 @@
1
- import { useCreateCalendarResourceMutation as e, useDeleteCalendarResourceMutation as t, useGetCalendarResourcesQuery as n } from "../generated/wspace-operations.js";
2
- import { useSafePermissions as r } from "../hooks/useSafePermissions.js";
3
- import { CALENDAR_PERMISSIONS as i } from "../constants/permissions.js";
4
- import { ConfirmDialog as a } from "../components/ConfirmDialog.js";
5
- import { nativeConfirm as o, nativeNotify as s } from "../utils/nativeBridge.js";
6
- import { useCallback as c, useMemo as l, useState as u } from "react";
1
+ import { useTr as e } from "../shared/hooks/useTr.js";
2
+ import { useCreateCalendarResourceMutation as t, useDeleteCalendarResourceMutation as n, useGetCalendarResourcesQuery as r } from "../generated/wspace-operations.js";
3
+ import { useSafePermissions as i } from "../hooks/useSafePermissions.js";
4
+ import { CALENDAR_PERMISSIONS as a } from "../constants/permissions.js";
5
+ import { ConfirmDialog as o } from "../components/ConfirmDialog.js";
6
+ import { nativeConfirm as s, nativeNotify as c } from "../utils/nativeBridge.js";
7
+ import { useMemo as l, useState as u } from "react";
7
8
  import { AccessDenied as d } from "@burdenoff/fe-libs/shared/components";
8
- import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
- import { Car as p, DoorOpen as m, MapPin as h, Monitor as g, Package as _, Plus as v, Users as y, X as b } from "lucide-react";
10
- import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
11
- import { EmphasisPanel as w, GlassCard as T, GradientText as E, IllustratedEmptyState as D, PagePurpose as O } from "@burdenoff/fe-libs/ui";
9
+ import { Car as f, DoorOpen as p, MapPin as m, Monitor as h, Package as g, Plus as _, Users as v, X as y } from "lucide-react";
10
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
11
+ import { EmphasisPanel as C, GlassCard as w, GradientText as T, IllustratedEmptyState as E, PagePurpose as D } from "@burdenoff/fe-libs/ui";
12
12
  //#region src/pages/ResourcesPage.tsx
13
- var k = {
14
- ROOM: m,
15
- EQUIPMENT: g,
16
- VEHICLE: p,
17
- DESK: _,
18
- PARKING_SPOT: p,
19
- OTHER: _
13
+ var O = {
14
+ ROOM: p,
15
+ EQUIPMENT: h,
16
+ VEHICLE: f,
17
+ DESK: g,
18
+ PARKING_SPOT: f,
19
+ OTHER: g
20
20
  };
21
- function A() {
22
- let { hasPermission: p, isLoading: g } = r(), { t: A } = f(), j = c((e, t) => {
23
- let n = A(e);
24
- return n === e ? t : n;
25
- }, [A]), [M, N] = u(!1), [P, F] = u(null), I = p(i.CALENDAR_RESOURCE_READ), { data: L, loading: R, error: z, refetch: B } = n({
21
+ function k() {
22
+ let { hasPermission: f, isLoading: h } = i(), k = e(), [A, j] = u(!1), [M, N] = u(null), P = f(a.CALENDAR_RESOURCE_READ), { data: F, loading: I, error: L, refetch: R } = r({
26
23
  fetchPolicy: "cache-and-network",
27
- skip: g || !I
28
- }), V = L?.getCalendarResources ?? [], [H, { loading: U, error: W }] = e(), [G, { loading: K }] = t(), [q, J] = u({
24
+ skip: h || !P
25
+ }), z = F?.getCalendarResources ?? [], [B, { loading: V, error: H }] = t(), [U, { loading: W }] = n(), [G, K] = u({
29
26
  name: "",
30
27
  description: "",
31
28
  resourceType: "ROOM",
@@ -35,154 +32,154 @@ function A() {
35
32
  floor: "",
36
33
  room: "",
37
34
  requireApproval: !1
38
- }), Y = l(() => ({
39
- ROOM: j("calendar.room", "Room"),
40
- EQUIPMENT: j("calendar.equipment", "Equipment"),
41
- VEHICLE: j("calendar.vehicle", "Vehicle"),
42
- DESK: j("calendar.desk", "Desk"),
43
- PARKING_SPOT: j("calendar.parkingSpot", "Parking Spot"),
44
- OTHER: j("calendar.other", "Other")
45
- }), [j]), X = (e, t) => {
46
- J((n) => ({
35
+ }), q = l(() => ({
36
+ ROOM: k("calendar.room", "Room"),
37
+ EQUIPMENT: k("calendar.equipment", "Equipment"),
38
+ VEHICLE: k("calendar.vehicle", "Vehicle"),
39
+ DESK: k("calendar.desk", "Desk"),
40
+ PARKING_SPOT: k("calendar.parkingSpot", "Parking Spot"),
41
+ OTHER: k("calendar.other", "Other")
42
+ }), [k]), J = (e, t) => {
43
+ K((n) => ({
47
44
  ...n,
48
45
  [e]: t
49
46
  }));
50
47
  };
51
- return g || R && !L ? /* @__PURE__ */ S("div", {
48
+ return h || I && !F ? /* @__PURE__ */ x("div", {
52
49
  className: "@container min-h-screen bg-bg-canvas flex items-center justify-center",
53
- children: /* @__PURE__ */ S("p", {
50
+ children: /* @__PURE__ */ x("p", {
54
51
  className: "font-text-md text-text-secondary",
55
- children: j("calendar.loading", "Loading...")
52
+ children: k("calendar.loading", "Loading...")
56
53
  })
57
- }) : I ? /* @__PURE__ */ C("div", {
54
+ }) : P ? /* @__PURE__ */ S("div", {
58
55
  className: "@container min-h-screen bg-bg-canvas",
59
56
  children: [
60
- /* @__PURE__ */ S("header", {
57
+ /* @__PURE__ */ x("header", {
61
58
  className: "border-b border-border-seam bg-bg-surface px-page-padding py-element-padding",
62
- children: /* @__PURE__ */ C("div", {
59
+ children: /* @__PURE__ */ S("div", {
63
60
  className: "flex flex-col @lg:flex-row @lg:items-center @lg:justify-between gap-stack-gap",
64
- children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h1", {
61
+ children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h1", {
65
62
  className: "font-heading-lg text-text-primary mb-stack-gap-sm",
66
- children: /* @__PURE__ */ S(E, { children: j("calendar.resources", "Resources") })
67
- }), /* @__PURE__ */ S(O, {
63
+ children: /* @__PURE__ */ x(T, { children: k("calendar.resources", "Resources") })
64
+ }), /* @__PURE__ */ x(D, {
68
65
  className: "max-w-2xl",
69
- children: j("calendar.resourcesPagePurpose", "A shared inventory of bookable rooms, equipment, vehicles, and desks. Add a resource here, then attach it to an event so it is reserved for that time — capacity, location, and approval rules keep double-bookings out.")
70
- })] }), p(i.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ C("button", {
66
+ children: k("calendar.resourcesPagePurpose", "A shared inventory of bookable rooms, equipment, vehicles, and desks. Add a resource here, then attach it to an event so it is reserved for that time — capacity, location, and approval rules keep double-bookings out.")
67
+ })] }), f(a.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ S("button", {
71
68
  type: "button",
72
- onClick: () => N(!0),
69
+ onClick: () => j(!0),
73
70
  className: "inline-flex items-center gap-inline-gap-sm px-element-padding py-element-padding-sm 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",
74
- children: [/* @__PURE__ */ S(v, { className: "size-4" }), j("calendar.addResource", "Add Resource")]
71
+ children: [/* @__PURE__ */ x(_, { className: "size-4" }), k("calendar.addResource", "Add Resource")]
75
72
  }) : null]
76
73
  })
77
74
  }),
78
- /* @__PURE__ */ C("div", {
75
+ /* @__PURE__ */ S("div", {
79
76
  className: "p-page-padding",
80
77
  children: [
81
- R && V.length === 0 && /* @__PURE__ */ S("div", {
78
+ I && z.length === 0 && /* @__PURE__ */ x("div", {
82
79
  className: "text-center py-12",
83
- children: /* @__PURE__ */ S("p", {
80
+ children: /* @__PURE__ */ x("p", {
84
81
  className: "font-text-md text-text-secondary",
85
- children: j("calendar.loadingResources", "Loading resources...")
82
+ children: k("calendar.loadingResources", "Loading resources...")
86
83
  })
87
84
  }),
88
- z && /* @__PURE__ */ S("div", {
85
+ L && /* @__PURE__ */ x("div", {
89
86
  className: "text-center py-12",
90
- children: /* @__PURE__ */ C("p", {
87
+ children: /* @__PURE__ */ S("p", {
91
88
  className: "font-text-md text-red-600 dark:text-red-400",
92
89
  children: [
93
- j("calendar.failedToLoadResources", "Failed to load resources:"),
90
+ k("calendar.failedToLoadResources", "Failed to load resources:"),
94
91
  " ",
95
- z.message
92
+ L.message
96
93
  ]
97
94
  })
98
95
  }),
99
- !R && !z && V.length === 0 && /* @__PURE__ */ S(D, {
96
+ !I && !L && z.length === 0 && /* @__PURE__ */ x(E, {
100
97
  illustration: "empty-data",
101
- title: j("calendar.noResourcesYet", "No resources yet"),
102
- description: j("calendar.bookConferenceRooms", "Book conference rooms, equipment, and other workspace resources"),
103
- action: p(i.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ C("button", {
98
+ title: k("calendar.noResourcesYet", "No resources yet"),
99
+ description: k("calendar.bookConferenceRooms", "Book conference rooms, equipment, and other workspace resources"),
100
+ action: f(a.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ S("button", {
104
101
  type: "button",
105
- onClick: () => N(!0),
102
+ onClick: () => j(!0),
106
103
  className: "inline-flex min-h-11 items-center gap-inline-gap-sm px-element-padding py-element-padding-sm 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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border",
107
- children: [/* @__PURE__ */ S(v, { className: "size-4" }), j("calendar.addYourFirstResource", "Add your first resource")]
104
+ children: [/* @__PURE__ */ x(_, { className: "size-4" }), k("calendar.addYourFirstResource", "Add your first resource")]
108
105
  }) : void 0
109
106
  }),
110
- V.length > 0 && /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C(w, {
107
+ z.length > 0 && /* @__PURE__ */ S(b, { children: [/* @__PURE__ */ S(C, {
111
108
  className: "mb-section-gap flex flex-wrap items-center justify-between gap-stack-gap",
112
- children: [/* @__PURE__ */ C("div", {
109
+ children: [/* @__PURE__ */ S("div", {
113
110
  className: "flex items-start gap-3",
114
- children: [/* @__PURE__ */ S(m, { className: "size-5 text-action-primary-bg shrink-0 mt-0.5" }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("p", {
111
+ children: [/* @__PURE__ */ x(p, { className: "size-5 text-action-primary-bg shrink-0 mt-0.5" }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
115
112
  className: "font-text-sm font-weight-semibold text-text-primary mb-0.5",
116
- children: j("calendar.bookableResources", "Bookable resources")
117
- }), /* @__PURE__ */ S("p", {
113
+ children: k("calendar.bookableResources", "Bookable resources")
114
+ }), /* @__PURE__ */ x("p", {
118
115
  className: "font-text-sm text-text-secondary",
119
- children: j("calendar.resourcesSummary", "{count} resources ready to attach to your events. Open an event and add a resource to reserve it.").replace("{count}", String(V.length))
116
+ children: k("calendar.resourcesSummary", "{{count}} resources ready to attach to your events. Open an event and add a resource to reserve it.", { count: z.length })
120
117
  })] })]
121
- }), p(i.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ C("button", {
118
+ }), f(a.CALENDAR_RESOURCE_CREATE) ? /* @__PURE__ */ S("button", {
122
119
  type: "button",
123
- onClick: () => N(!0),
120
+ onClick: () => j(!0),
124
121
  className: "inline-flex items-center gap-inline-gap-sm px-element-padding py-element-padding-sm 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 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border",
125
- children: [/* @__PURE__ */ S(v, { className: "size-4" }), j("calendar.addResource", "Add Resource")]
122
+ children: [/* @__PURE__ */ x(_, { className: "size-4" }), k("calendar.addResource", "Add Resource")]
126
123
  }) : null]
127
- }), /* @__PURE__ */ S("div", {
124
+ }), /* @__PURE__ */ x("div", {
128
125
  className: "grid gap-grid-gap",
129
126
  style: { gridTemplateColumns: "repeat(auto-fit, minmax(18rem, 1fr))" },
130
- children: V.map((e) => /* @__PURE__ */ S(T, {
127
+ children: z.map((e) => /* @__PURE__ */ x(w, {
131
128
  treatment: "metric",
132
129
  className: "@container p-card-padding",
133
- children: /* @__PURE__ */ C("div", {
130
+ children: /* @__PURE__ */ S("div", {
134
131
  className: "flex items-start gap-inline-gap",
135
- children: [/* @__PURE__ */ S("div", {
132
+ children: [/* @__PURE__ */ x("div", {
136
133
  className: "size-10 inline-flex items-center justify-center rounded-radius-md bg-bg-neutral text-text-secondary shrink-0",
137
- children: /* @__PURE__ */ S(k[e.resourceType] ?? _, { className: "size-5" })
138
- }), /* @__PURE__ */ C("div", {
134
+ children: /* @__PURE__ */ x(O[e.resourceType] ?? g, { className: "size-5" })
135
+ }), /* @__PURE__ */ S("div", {
139
136
  className: "min-w-0 flex-1",
140
137
  children: [
141
- /* @__PURE__ */ C("div", {
138
+ /* @__PURE__ */ S("div", {
142
139
  className: "flex items-start justify-between",
143
- children: [/* @__PURE__ */ S("h3", {
140
+ children: [/* @__PURE__ */ x("h3", {
144
141
  className: "font-heading-sm text-text-primary mb-1",
145
142
  children: e.name
146
- }), p(i.CALENDAR_RESOURCE_DELETE) && /* @__PURE__ */ S("button", {
143
+ }), f(a.CALENDAR_RESOURCE_DELETE) && /* @__PURE__ */ x("button", {
147
144
  type: "button",
148
- onClick: () => F({
145
+ onClick: () => N({
149
146
  id: e.id,
150
147
  name: e.name
151
148
  }),
152
149
  className: "size-6 inline-flex items-center justify-center rounded-radius-sm hover:bg-red-50 dark:hover:bg-red-950/20 text-text-tertiary hover:text-red-600 transition-colors shrink-0",
153
- "aria-label": `${j("calendar.deleteResource", "Delete Resource")} ${e.name}`,
154
- children: /* @__PURE__ */ S(b, { className: "size-3.5" })
150
+ "aria-label": `${k("calendar.deleteResource", "Delete Resource")} ${e.name}`,
151
+ children: /* @__PURE__ */ x(y, { className: "size-3.5" })
155
152
  })]
156
153
  }),
157
- e.description && /* @__PURE__ */ S("p", {
154
+ e.description && /* @__PURE__ */ x("p", {
158
155
  className: "font-text-sm text-text-secondary mb-2 line-clamp-2",
159
156
  children: e.description
160
157
  }),
161
- /* @__PURE__ */ C("div", {
158
+ /* @__PURE__ */ S("div", {
162
159
  className: "flex flex-wrap items-center gap-2",
163
160
  children: [
164
- /* @__PURE__ */ S("span", {
161
+ /* @__PURE__ */ x("span", {
165
162
  className: "font-text-xs px-2 py-0.5 rounded-radius-sm bg-bg-neutral text-text-secondary",
166
- children: Y[e.resourceType] ?? e.resourceType
163
+ children: q[e.resourceType] ?? e.resourceType
167
164
  }),
168
- e.capacity && /* @__PURE__ */ C("span", {
165
+ e.capacity && /* @__PURE__ */ S("span", {
169
166
  className: "inline-flex items-center gap-1 font-text-xs text-text-tertiary",
170
- children: [/* @__PURE__ */ S(y, { className: "size-3" }), e.capacity]
167
+ children: [/* @__PURE__ */ x(v, { className: "size-3" }), e.capacity]
171
168
  }),
172
- e.location && /* @__PURE__ */ C("span", {
169
+ e.location && /* @__PURE__ */ S("span", {
173
170
  className: "inline-flex items-center gap-1 font-text-xs text-text-tertiary",
174
- children: [/* @__PURE__ */ S(h, { className: "size-3" }), e.location]
171
+ children: [/* @__PURE__ */ x(m, { className: "size-3" }), e.location]
175
172
  })
176
173
  ]
177
174
  }),
178
- /* @__PURE__ */ C("div", {
175
+ /* @__PURE__ */ S("div", {
179
176
  className: "mt-2 flex items-center gap-2",
180
- children: [/* @__PURE__ */ S("span", {
177
+ children: [/* @__PURE__ */ x("span", {
181
178
  className: `font-text-xs px-2 py-0.5 rounded-radius-sm ${e.isActive ? "bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-300" : "bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400"}`,
182
- children: e.isActive ? j("calendar.active", "Active") : j("calendar.inactive", "Inactive")
183
- }), e.requireApproval && /* @__PURE__ */ S("span", {
179
+ children: e.isActive ? k("calendar.active", "Active") : k("calendar.inactive", "Inactive")
180
+ }), e.requireApproval && /* @__PURE__ */ x("span", {
184
181
  className: "font-text-xs px-2 py-0.5 rounded-radius-sm bg-amber-100 dark:bg-amber-900/30 text-amber-700 dark:text-amber-300",
185
- children: j("calendar.requiresApproval", "Requires Approval")
182
+ children: k("calendar.requiresApproval", "Requires Approval")
186
183
  })]
187
184
  })
188
185
  ]
@@ -192,28 +189,28 @@ function A() {
192
189
  })] })
193
190
  ]
194
191
  }),
195
- M && /* @__PURE__ */ C("dialog", {
192
+ A && /* @__PURE__ */ S("dialog", {
196
193
  open: !0,
197
194
  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",
198
195
  style: { position: "fixed" },
199
- children: [/* @__PURE__ */ S("button", {
196
+ children: [/* @__PURE__ */ x("button", {
200
197
  type: "button",
201
- "aria-label": j("calendar.closeDialog", "Close dialog"),
198
+ "aria-label": k("calendar.closeDialog", "Close dialog"),
202
199
  className: "fixed inset-0 bg-black/50",
203
- onClick: () => N(!1)
204
- }), /* @__PURE__ */ C("form", {
200
+ onClick: () => j(!1)
201
+ }), /* @__PURE__ */ S("form", {
205
202
  onSubmit: async (e) => {
206
- e.preventDefault(), q.name.trim() && (await H({ variables: { input: {
207
- name: q.name,
208
- description: q.description || void 0,
209
- resourceType: q.resourceType,
210
- capacity: q.capacity ? parseInt(q.capacity, 10) : void 0,
211
- location: q.location || void 0,
212
- building: q.building || void 0,
213
- floor: q.floor || void 0,
214
- room: q.room || void 0,
215
- requireApproval: q.requireApproval
216
- } } }), J({
203
+ e.preventDefault(), G.name.trim() && (await B({ variables: { input: {
204
+ name: G.name,
205
+ description: G.description || void 0,
206
+ resourceType: G.resourceType,
207
+ capacity: G.capacity ? parseInt(G.capacity, 10) : void 0,
208
+ location: G.location || void 0,
209
+ building: G.building || void 0,
210
+ floor: G.floor || void 0,
211
+ room: G.room || void 0,
212
+ requireApproval: G.requireApproval
213
+ } } }), K({
217
214
  name: "",
218
215
  description: "",
219
216
  resourceType: "ROOM",
@@ -223,193 +220,193 @@ function A() {
223
220
  floor: "",
224
221
  room: "",
225
222
  requireApproval: !1
226
- }), N(!1), B());
223
+ }), j(!1), R());
227
224
  },
228
225
  className: "relative z-10 bg-bg-surface rounded-radius-lg p-6 max-w-lg w-full mx-auto mt-20 border border-border-default shadow-lg",
229
226
  children: [
230
- /* @__PURE__ */ C("div", {
227
+ /* @__PURE__ */ S("div", {
231
228
  className: "flex items-center justify-between mb-6",
232
- children: [/* @__PURE__ */ S("h2", {
229
+ children: [/* @__PURE__ */ x("h2", {
233
230
  className: "font-heading-md text-text-primary",
234
- children: j("calendar.addResource", "Add Resource")
235
- }), /* @__PURE__ */ S("button", {
231
+ children: k("calendar.addResource", "Add Resource")
232
+ }), /* @__PURE__ */ x("button", {
236
233
  type: "button",
237
- onClick: () => N(!1),
234
+ onClick: () => j(!1),
238
235
  className: "size-8 inline-flex items-center justify-center rounded-radius-sm hover:bg-bg-elevated text-text-tertiary",
239
- children: /* @__PURE__ */ S(b, { className: "size-5" })
236
+ children: /* @__PURE__ */ x(y, { className: "size-5" })
240
237
  })]
241
238
  }),
242
- W && /* @__PURE__ */ S("div", {
239
+ H && /* @__PURE__ */ x("div", {
243
240
  className: "mb-4 p-3 rounded-radius-md bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800",
244
- children: /* @__PURE__ */ S("p", {
241
+ children: /* @__PURE__ */ x("p", {
245
242
  className: "font-text-sm text-red-700 dark:text-red-300",
246
- children: W.message
243
+ children: H.message
247
244
  })
248
245
  }),
249
- /* @__PURE__ */ C("div", {
246
+ /* @__PURE__ */ S("div", {
250
247
  className: "space-y-4",
251
248
  children: [
252
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ C("label", {
249
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ S("label", {
253
250
  htmlFor: "resource-name",
254
251
  className: "block font-text-sm font-weight-medium text-text-primary mb-1",
255
252
  children: [
256
- j("calendar.name", "Name"),
253
+ k("calendar.name", "Name"),
257
254
  " ",
258
- /* @__PURE__ */ S("span", {
255
+ /* @__PURE__ */ x("span", {
259
256
  className: "text-red-500",
260
257
  children: "*"
261
258
  })
262
259
  ]
263
- }), /* @__PURE__ */ S("input", {
260
+ }), /* @__PURE__ */ x("input", {
264
261
  id: "resource-name",
265
262
  type: "text",
266
263
  required: !0,
267
- value: q.name,
268
- onChange: (e) => X("name", e.target.value),
269
- placeholder: j("calendar.resourceNameExample", "e.g. Conference Room A"),
264
+ value: G.name,
265
+ onChange: (e) => J("name", e.target.value),
266
+ placeholder: k("calendar.resourceNameExample", "e.g. Conference Room A"),
270
267
  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",
271
- "aria-label": j("calendar.name", "Name")
268
+ "aria-label": k("calendar.name", "Name")
272
269
  })] }),
273
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
270
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
274
271
  htmlFor: "resource-type",
275
272
  className: "block font-text-sm font-weight-medium text-text-primary mb-1",
276
- children: j("calendar.type", "Type")
277
- }), /* @__PURE__ */ C("select", {
273
+ children: k("calendar.type", "Type")
274
+ }), /* @__PURE__ */ S("select", {
278
275
  id: "resource-type",
279
- value: q.resourceType,
280
- onChange: (e) => X("resourceType", e.target.value),
276
+ value: G.resourceType,
277
+ onChange: (e) => J("resourceType", e.target.value),
281
278
  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",
282
279
  children: [
283
- /* @__PURE__ */ S("option", {
280
+ /* @__PURE__ */ x("option", {
284
281
  value: "ROOM",
285
- children: j("calendar.room", "Room")
282
+ children: k("calendar.room", "Room")
286
283
  }),
287
- /* @__PURE__ */ S("option", {
284
+ /* @__PURE__ */ x("option", {
288
285
  value: "EQUIPMENT",
289
- children: j("calendar.equipment", "Equipment")
286
+ children: k("calendar.equipment", "Equipment")
290
287
  }),
291
- /* @__PURE__ */ S("option", {
288
+ /* @__PURE__ */ x("option", {
292
289
  value: "DESK",
293
- children: j("calendar.desk", "Desk")
290
+ children: k("calendar.desk", "Desk")
294
291
  }),
295
- /* @__PURE__ */ S("option", {
292
+ /* @__PURE__ */ x("option", {
296
293
  value: "VEHICLE",
297
- children: j("calendar.vehicle", "Vehicle")
294
+ children: k("calendar.vehicle", "Vehicle")
298
295
  }),
299
- /* @__PURE__ */ S("option", {
296
+ /* @__PURE__ */ x("option", {
300
297
  value: "PARKING_SPOT",
301
- children: j("calendar.parkingSpot", "Parking Spot")
298
+ children: k("calendar.parkingSpot", "Parking Spot")
302
299
  }),
303
- /* @__PURE__ */ S("option", {
300
+ /* @__PURE__ */ x("option", {
304
301
  value: "OTHER",
305
- children: j("calendar.other", "Other")
302
+ children: k("calendar.other", "Other")
306
303
  })
307
304
  ]
308
305
  })] }),
309
- /* @__PURE__ */ C("div", {
306
+ /* @__PURE__ */ S("div", {
310
307
  className: "grid grid-cols-2 gap-3",
311
- children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
308
+ children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
312
309
  htmlFor: "resource-capacity",
313
310
  className: "block font-text-sm font-weight-medium text-text-primary mb-1",
314
- children: j("calendar.capacity", "Capacity")
315
- }), /* @__PURE__ */ S("input", {
311
+ children: k("calendar.capacity", "Capacity")
312
+ }), /* @__PURE__ */ x("input", {
316
313
  id: "resource-capacity",
317
314
  type: "number",
318
315
  min: "1",
319
- value: q.capacity,
320
- onChange: (e) => X("capacity", e.target.value),
321
- placeholder: j("calendar.resourceCapacityExample", "e.g. 12"),
316
+ value: G.capacity,
317
+ onChange: (e) => J("capacity", e.target.value),
318
+ placeholder: k("calendar.resourceCapacityExample", "e.g. 12"),
322
319
  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",
323
- "aria-label": j("calendar.capacity", "Capacity")
324
- })] }), /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
320
+ "aria-label": k("calendar.capacity", "Capacity")
321
+ })] }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
325
322
  htmlFor: "resource-location",
326
323
  className: "block font-text-sm font-weight-medium text-text-primary mb-1",
327
- children: j("calendar.location", "Location")
328
- }), /* @__PURE__ */ S("input", {
324
+ children: k("calendar.location", "Location")
325
+ }), /* @__PURE__ */ x("input", {
329
326
  id: "resource-location",
330
327
  type: "text",
331
- value: q.location,
332
- onChange: (e) => X("location", e.target.value),
333
- placeholder: j("calendar.resourceLocationExample", "e.g. Building A"),
334
- "aria-label": j("calendar.location", "Location"),
328
+ value: G.location,
329
+ onChange: (e) => J("location", e.target.value),
330
+ placeholder: k("calendar.resourceLocationExample", "e.g. Building A"),
331
+ "aria-label": k("calendar.location", "Location"),
335
332
  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"
336
333
  })] })]
337
334
  }),
338
- /* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("label", {
335
+ /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("label", {
339
336
  htmlFor: "resource-description",
340
337
  className: "block font-text-sm font-weight-medium text-text-primary mb-1",
341
- children: j("calendar.description", "Description")
342
- }), /* @__PURE__ */ S("textarea", {
338
+ children: k("calendar.description", "Description")
339
+ }), /* @__PURE__ */ x("textarea", {
343
340
  id: "resource-description",
344
- value: q.description,
345
- onChange: (e) => X("description", e.target.value),
346
- placeholder: j("calendar.addDescription", "Add a description"),
341
+ value: G.description,
342
+ onChange: (e) => J("description", e.target.value),
343
+ placeholder: k("calendar.addDescription", "Add a description"),
347
344
  rows: 2,
348
- "aria-label": j("calendar.description", "Description"),
345
+ "aria-label": k("calendar.description", "Description"),
349
346
  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"
350
347
  })] }),
351
- /* @__PURE__ */ C("div", {
348
+ /* @__PURE__ */ S("div", {
352
349
  className: "flex items-center gap-3",
353
- children: [/* @__PURE__ */ S("input", {
350
+ children: [/* @__PURE__ */ x("input", {
354
351
  id: "resource-approval",
355
352
  type: "checkbox",
356
- checked: q.requireApproval,
357
- onChange: (e) => X("requireApproval", e.target.checked),
353
+ checked: G.requireApproval,
354
+ onChange: (e) => J("requireApproval", e.target.checked),
358
355
  className: "size-4 rounded border-border-default",
359
- "aria-label": j("calendar.requireApprovalForBookings", "Require approval for bookings")
360
- }), /* @__PURE__ */ S("label", {
356
+ "aria-label": k("calendar.requireApprovalForBookings", "Require approval for bookings")
357
+ }), /* @__PURE__ */ x("label", {
361
358
  htmlFor: "resource-approval",
362
359
  className: "font-text-sm text-text-primary",
363
- children: j("calendar.requireApprovalForBookings", "Require approval for bookings")
360
+ children: k("calendar.requireApprovalForBookings", "Require approval for bookings")
364
361
  })]
365
362
  })
366
363
  ]
367
364
  }),
368
- /* @__PURE__ */ C("div", {
365
+ /* @__PURE__ */ S("div", {
369
366
  className: "mt-6 flex justify-end gap-3",
370
- children: [/* @__PURE__ */ S("button", {
367
+ children: [/* @__PURE__ */ x("button", {
371
368
  type: "button",
372
- onClick: () => N(!1),
373
- disabled: U,
369
+ onClick: () => j(!1),
370
+ disabled: V,
374
371
  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",
375
- children: j("calendar.cancel", "Cancel")
376
- }), /* @__PURE__ */ S("button", {
372
+ children: k("calendar.cancel", "Cancel")
373
+ }), /* @__PURE__ */ x("button", {
377
374
  type: "submit",
378
- disabled: U || !q.name.trim(),
375
+ disabled: V || !G.name.trim(),
379
376
  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",
380
- children: U ? j("calendar.creating", "Creating...") : j("calendar.createResource", "Create Resource")
377
+ children: V ? k("calendar.creating", "Creating...") : k("calendar.createResource", "Create Resource")
381
378
  })]
382
379
  })
383
380
  ]
384
381
  })]
385
382
  }),
386
- /* @__PURE__ */ S(a, {
387
- open: !!P,
388
- title: j("calendar.deleteResource", "Delete Resource"),
389
- message: j("calendar.deleteResourceConfirmation", "Are you sure you want to delete \"{name}\"? This will also cancel all future bookings.").replace("{name}", P?.name ?? ""),
390
- confirmLabel: j("calendar.delete", "Delete"),
383
+ /* @__PURE__ */ x(o, {
384
+ open: !!M,
385
+ title: k("calendar.deleteResource", "Delete Resource"),
386
+ message: k("calendar.deleteResourceConfirmation", "Are you sure you want to delete \"{{name}}\"? This will also cancel all future bookings.", { name: M?.name ?? "" }),
387
+ confirmLabel: k("calendar.delete", "Delete"),
391
388
  variant: "danger",
392
- loading: K,
389
+ loading: W,
393
390
  onConfirm: async () => {
394
- if (P && await o({
395
- title: j("calendar.deleteResource", "Delete Resource"),
396
- message: j("calendar.deleteResourceConfirmation", "Are you sure you want to delete \"{name}\"? This will also cancel all future bookings.").replace("{name}", P.name),
397
- okButtonTitle: j("calendar.delete", "Delete")
391
+ if (M && await s({
392
+ title: k("calendar.deleteResource", "Delete Resource"),
393
+ message: k("calendar.deleteResourceConfirmation", "Are you sure you want to delete \"{{name}}\"? This will also cancel all future bookings.", { name: M.name }),
394
+ okButtonTitle: k("calendar.delete", "Delete")
398
395
  }) !== !1) try {
399
- await G({ variables: { id: P.id } }), s("success"), F(null), B();
396
+ await U({ variables: { id: M.id } }), c("success"), N(null), R();
400
397
  } catch (e) {
401
- throw s("error"), e;
398
+ throw c("error"), e;
402
399
  }
403
400
  },
404
- onCancel: () => F(null)
401
+ onCancel: () => N(null)
405
402
  })
406
403
  ]
407
- }) : /* @__PURE__ */ S(d, {
408
- title: j("calendar.accessDenied", "Access Denied"),
409
- description: j("calendar.noPermissionViewResources", "You don't have permission to view resources.")
404
+ }) : /* @__PURE__ */ x(d, {
405
+ title: k("calendar.accessDenied", "Access Denied"),
406
+ description: k("calendar.noPermissionViewResources", "You don't have permission to view resources.")
410
407
  });
411
408
  }
412
409
  //#endregion
413
- export { A as ResourcesPage };
410
+ export { k as ResourcesPage };
414
411
 
415
412
  //# sourceMappingURL=ResourcesPage.js.map