@burdenoff/microfe-calendar 2026.525.3 → 2026.610.1

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