@burdenoff/microfe-eventfullymanaged 2026.625.2 → 2026.703.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 (43) hide show
  1. package/dist/eventfullymanaged/api/eventApi.js +83 -39
  2. package/dist/eventfullymanaged/api/eventApi.js.map +1 -1
  3. package/dist/eventfullymanaged/components/ImageUploadField.js +98 -0
  4. package/dist/eventfullymanaged/components/ImageUploadField.js.map +1 -0
  5. package/dist/eventfullymanaged/lib/mutationResult.js +12 -0
  6. package/dist/eventfullymanaged/lib/mutationResult.js.map +1 -0
  7. package/dist/eventfullymanaged/lib/toast.js +36 -0
  8. package/dist/eventfullymanaged/lib/toast.js.map +1 -0
  9. package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js +40 -32
  10. package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js.map +1 -1
  11. package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js +71 -45
  12. package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js.map +1 -1
  13. package/dist/eventfullymanaged/pages/modules/CommunicationPage.js +56 -46
  14. package/dist/eventfullymanaged/pages/modules/CommunicationPage.js.map +1 -1
  15. package/dist/eventfullymanaged/pages/modules/EventsPage.js +75 -67
  16. package/dist/eventfullymanaged/pages/modules/EventsPage.js.map +1 -1
  17. package/dist/eventfullymanaged/pages/modules/KioskPage.js.map +1 -1
  18. package/dist/eventfullymanaged/pages/modules/NetworkingPage.js +30 -11
  19. package/dist/eventfullymanaged/pages/modules/NetworkingPage.js.map +1 -1
  20. package/dist/eventfullymanaged/pages/modules/OperationsHubPage.js.map +1 -1
  21. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js +35 -13
  22. package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js.map +1 -1
  23. package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js +68 -54
  24. package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js.map +1 -1
  25. package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js +153 -125
  26. package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js.map +1 -1
  27. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js +107 -62
  28. package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js.map +1 -1
  29. package/dist/eventfullymanaged/pages/venues/VenueDetailPage.js.map +1 -1
  30. package/dist/eventfullymanaged/pages/venues/VenueFormPage.js +144 -135
  31. package/dist/eventfullymanaged/pages/venues/VenueFormPage.js.map +1 -1
  32. package/dist/eventfullymanaged/pages/venues/VenueListPage.js.map +1 -1
  33. package/dist/node_modules/@apollo/client/react/context/ApolloContext.js.map +1 -1
  34. package/dist/node_modules/@apollo/client/react/hooks/internal/useDeepMemo.js.map +1 -1
  35. package/dist/node_modules/@apollo/client/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
  36. package/dist/node_modules/@apollo/client/react/hooks/internal/wrapHook.js.map +1 -1
  37. package/dist/node_modules/@apollo/client/react/hooks/useApolloClient.js.map +1 -1
  38. package/dist/node_modules/@apollo/client/react/hooks/useMutation.js.map +1 -1
  39. package/dist/node_modules/@apollo/client/react/hooks/useQuery.js.map +1 -1
  40. package/dist/node_modules/@apollo/client/react/hooks/useSyncExternalStore.js.map +1 -1
  41. package/dist/node_modules/sonner/dist/index.js +163 -0
  42. package/dist/node_modules/sonner/dist/index.js.map +1 -0
  43. package/package.json +1 -1
@@ -1,13 +1,15 @@
1
1
  import { useEventfullyManaged as e } from "../../context/EventfullyManagedContext.js";
2
- import { useCreateVenueMutation as t, useUpdateVenueMutation as n, useVenueQuery as r } from "../../api/eventApi.js";
3
- import { useEffect as i, useMemo as a, useState as o } from "react";
4
- import { useParams as s } from "react-router-dom";
5
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
- import { ArrowLeft as u, Save as d } from "lucide-react";
7
- import { useI18n as f } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
8
- import { Button as p, EmphasisPanel as m, Input as h, PagePurpose as g, Textarea as _ } from "@burdenoff/fe-libs/ui";
2
+ import { notify as t } from "../../lib/toast.js";
3
+ import { useCreateVenueMutation as n, useUpdateVenueMutation as r, useVenueQuery as i } from "../../api/eventApi.js";
4
+ import { describeError as a, mutationSucceeded as o } from "../../lib/mutationResult.js";
5
+ import { useEffect as s, useMemo as c, useState as l } from "react";
6
+ import { useParams as u } from "react-router-dom";
7
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
8
+ import { ArrowLeft as p, Save as m } from "lucide-react";
9
+ import { useI18n as h } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
10
+ import { Button as g, EmphasisPanel as _, Input as v, PagePurpose as y, Textarea as b } from "@burdenoff/fe-libs/ui";
9
11
  //#region src/eventfullymanaged/pages/venues/VenueFormPage.tsx
10
- var v = {
12
+ var x = {
11
13
  name: "",
12
14
  description: "",
13
15
  addressLine1: "",
@@ -19,220 +21,227 @@ var v = {
19
21
  amenities: "",
20
22
  status: "ACTIVE"
21
23
  };
22
- function y() {
23
- let { t: y } = f(), b = (e, t) => {
24
- let n = y(e);
24
+ function S() {
25
+ let { t: S } = h(), C = (e, t) => {
26
+ let n = S(e);
25
27
  return n === e ? t : n;
26
- }, { id: x = "" } = s(), S = a(() => !!x, [x]), { navigate: C } = e(), { data: w } = r(x), [T, { loading: E }] = t(), [D, { loading: O }] = n(), [k, A] = o(v);
27
- i(() => {
28
- !S || !w?.venue || A({
29
- name: w.venue.name ?? "",
30
- description: w.venue.description ?? "",
31
- addressLine1: w.venue.addressLine1 ?? "",
32
- city: w.venue.city ?? "",
33
- state: w.venue.state ?? "",
34
- country: w.venue.country ?? "India",
35
- postalCode: w.venue.postalCode ?? "",
36
- capacity: w.venue.capacity ? String(w.venue.capacity) : "",
37
- amenities: (w.venue.amenities ?? []).join(", "),
38
- status: w.venue.status ?? "ACTIVE"
28
+ }, { id: w = "" } = u(), T = c(() => !!w, [w]), { navigate: E } = e(), { data: D } = i(w), [O, { loading: k }] = n(), [A, { loading: j }] = r(), [M, N] = l(x);
29
+ s(() => {
30
+ !T || !D?.venue || N({
31
+ name: D.venue.name ?? "",
32
+ description: D.venue.description ?? "",
33
+ addressLine1: D.venue.addressLine1 ?? "",
34
+ city: D.venue.city ?? "",
35
+ state: D.venue.state ?? "",
36
+ country: D.venue.country ?? "India",
37
+ postalCode: D.venue.postalCode ?? "",
38
+ capacity: D.venue.capacity ? String(D.venue.capacity) : "",
39
+ amenities: (D.venue.amenities ?? []).join(", "),
40
+ status: D.venue.status ?? "ACTIVE"
39
41
  });
40
- }, [w, S]);
41
- let j = (e, t) => {
42
- A((n) => ({
42
+ }, [D, T]);
43
+ let P = (e, t) => {
44
+ N((n) => ({
43
45
  ...n,
44
46
  [e]: t
45
47
  }));
46
- }, M = async (e) => {
48
+ }, F = async (e) => {
47
49
  e.preventDefault();
48
- let t = {
49
- name: k.name,
50
- description: k.description,
51
- addressLine1: k.addressLine1,
52
- city: k.city,
53
- state: k.state,
54
- country: k.country,
55
- postalCode: k.postalCode,
56
- capacity: k.capacity ? Number(k.capacity) : null,
57
- amenities: k.amenities.split(",").map((e) => e.trim()).filter(Boolean),
58
- status: k.status,
50
+ let n = {
51
+ name: M.name,
52
+ description: M.description,
53
+ addressLine1: M.addressLine1,
54
+ city: M.city,
55
+ state: M.state,
56
+ country: M.country,
57
+ postalCode: M.postalCode,
58
+ capacity: M.capacity ? Number(M.capacity) : null,
59
+ amenities: M.amenities.split(",").map((e) => e.trim()).filter(Boolean),
60
+ status: M.status,
59
61
  pricing: {},
60
62
  openingHours: {},
61
63
  metadata: {}
62
64
  };
63
- if (S) {
64
- await D({ variables: {
65
- id: x,
66
- input: t
67
- } }), C(`/venues/${x}`);
68
- return;
65
+ try {
66
+ if (T) {
67
+ let e = await A({ variables: {
68
+ id: w,
69
+ input: n
70
+ } });
71
+ if (!o(e, e.data?.updateVenue?.id, "Could not update venue")) return;
72
+ E(`/venues/${w}`);
73
+ return;
74
+ }
75
+ let e = await O({ variables: { input: n } }), t = e.data?.createVenue?.id;
76
+ if (!o(e, t, "Could not create venue")) return;
77
+ E(`/venues/${t}`);
78
+ } catch (e) {
79
+ t.error("Could not save venue", a(e));
69
80
  }
70
- let n = (await T({ variables: { input: t } })).data?.createVenue?.id;
71
- C(n ? `/venues/${n}` : "/venues");
72
- }, N = E || O;
73
- return /* @__PURE__ */ l("div", {
81
+ }, I = k || j;
82
+ return /* @__PURE__ */ f("div", {
74
83
  className: "space-y-6 p-6",
75
84
  children: [
76
- /* @__PURE__ */ l("div", { children: [
77
- /* @__PURE__ */ l(p, {
85
+ /* @__PURE__ */ f("div", { children: [
86
+ /* @__PURE__ */ f(g, {
78
87
  type: "button",
79
88
  variant: "ghost",
80
89
  size: "sm",
81
- onClick: () => C("/venues"),
82
- children: [/* @__PURE__ */ c(u, { className: "h-4 w-4" }), b("eventfullymanaged.venues.form.backToVenues", "Back to Venues")]
90
+ onClick: () => E("/venues"),
91
+ children: [/* @__PURE__ */ d(p, { className: "h-4 w-4" }), C("eventfullymanaged.venues.form.backToVenues", "Back to Venues")]
83
92
  }),
84
- /* @__PURE__ */ c("h1", {
93
+ /* @__PURE__ */ d("h1", {
85
94
  className: "mt-3 text-2xl font-bold text-text-primary",
86
- children: S ? b("eventfullymanaged.venues.form.editTitle", "Edit Venue") : b("eventfullymanaged.venues.form.createTitle", "Create Venue")
95
+ children: T ? C("eventfullymanaged.venues.form.editTitle", "Edit Venue") : C("eventfullymanaged.venues.form.createTitle", "Create Venue")
87
96
  }),
88
- /* @__PURE__ */ c("p", {
97
+ /* @__PURE__ */ d("p", {
89
98
  className: "mt-1 text-sm text-text-secondary",
90
- children: b("eventfullymanaged.venues.form.description", "Manage venue details with live backend persistence.")
99
+ children: C("eventfullymanaged.venues.form.description", "Manage venue details with live backend persistence.")
91
100
  })
92
101
  ] }),
93
- /* @__PURE__ */ c(g, { children: b("eventfullymanaged.venues.form.purpose", "Describe a space so you can reuse it across events. Capacity drives how many attendees you can register, the address helps people find it, and amenities tell organizers what is already provided. Fill this in once and every future event can simply point at this venue.") }),
94
- /* @__PURE__ */ c(m, { children: /* @__PURE__ */ l("form", {
95
- onSubmit: M,
102
+ /* @__PURE__ */ d(y, { children: C("eventfullymanaged.venues.form.purpose", "Describe a space so you can reuse it across events. Capacity drives how many attendees you can register, the address helps people find it, and amenities tell organizers what is already provided. Fill this in once and every future event can simply point at this venue.") }),
103
+ /* @__PURE__ */ d(_, { children: /* @__PURE__ */ f("form", {
104
+ onSubmit: F,
96
105
  className: "space-y-4",
97
106
  children: [
98
- /* @__PURE__ */ l("div", {
107
+ /* @__PURE__ */ f("div", {
99
108
  className: "grid grid-cols-1 gap-4 md:grid-cols-2",
100
- children: [/* @__PURE__ */ l("label", {
109
+ children: [/* @__PURE__ */ f("label", {
101
110
  className: "space-y-1 text-sm",
102
- children: [/* @__PURE__ */ c("span", {
111
+ children: [/* @__PURE__ */ d("span", {
103
112
  className: "font-medium text-text-primary",
104
- children: b("eventfullymanaged.venues.form.fields.name", "Name")
105
- }), /* @__PURE__ */ c(h, {
106
- value: k.name,
107
- onChange: (e) => j("name", e.target.value),
113
+ children: C("eventfullymanaged.venues.form.fields.name", "Name")
114
+ }), /* @__PURE__ */ d(v, {
115
+ value: M.name,
116
+ onChange: (e) => P("name", e.target.value),
108
117
  required: !0
109
118
  })]
110
- }), /* @__PURE__ */ l("label", {
119
+ }), /* @__PURE__ */ f("label", {
111
120
  className: "space-y-1 text-sm",
112
- children: [/* @__PURE__ */ c("span", {
121
+ children: [/* @__PURE__ */ d("span", {
113
122
  className: "font-medium text-text-primary",
114
- children: b("eventfullymanaged.venues.form.fields.capacity", "Capacity")
115
- }), /* @__PURE__ */ c(h, {
116
- value: k.capacity,
117
- onChange: (e) => j("capacity", e.target.value),
123
+ children: C("eventfullymanaged.venues.form.fields.capacity", "Capacity")
124
+ }), /* @__PURE__ */ d(v, {
125
+ value: M.capacity,
126
+ onChange: (e) => P("capacity", e.target.value),
118
127
  type: "number",
119
128
  min: "0"
120
129
  })]
121
130
  })]
122
131
  }),
123
- /* @__PURE__ */ l("label", {
132
+ /* @__PURE__ */ f("label", {
124
133
  className: "block space-y-1 text-sm",
125
- children: [/* @__PURE__ */ c("span", {
134
+ children: [/* @__PURE__ */ d("span", {
126
135
  className: "font-medium text-text-primary",
127
- children: b("eventfullymanaged.venues.form.fields.description", "Description")
128
- }), /* @__PURE__ */ c(_, {
129
- value: k.description,
130
- onChange: (e) => j("description", e.target.value),
136
+ children: C("eventfullymanaged.venues.form.fields.description", "Description")
137
+ }), /* @__PURE__ */ d(b, {
138
+ value: M.description,
139
+ onChange: (e) => P("description", e.target.value),
131
140
  rows: 3
132
141
  })]
133
142
  }),
134
- /* @__PURE__ */ l("div", {
143
+ /* @__PURE__ */ f("div", {
135
144
  className: "grid grid-cols-1 gap-4 md:grid-cols-4",
136
145
  children: [
137
- /* @__PURE__ */ l("label", {
146
+ /* @__PURE__ */ f("label", {
138
147
  className: "space-y-1 text-sm md:col-span-2",
139
- children: [/* @__PURE__ */ c("span", {
148
+ children: [/* @__PURE__ */ d("span", {
140
149
  className: "font-medium text-text-primary",
141
- children: b("eventfullymanaged.venues.form.fields.address", "Address")
142
- }), /* @__PURE__ */ c(h, {
143
- value: k.addressLine1,
144
- onChange: (e) => j("addressLine1", e.target.value)
150
+ children: C("eventfullymanaged.venues.form.fields.address", "Address")
151
+ }), /* @__PURE__ */ d(v, {
152
+ value: M.addressLine1,
153
+ onChange: (e) => P("addressLine1", e.target.value)
145
154
  })]
146
155
  }),
147
- /* @__PURE__ */ l("label", {
156
+ /* @__PURE__ */ f("label", {
148
157
  className: "space-y-1 text-sm",
149
- children: [/* @__PURE__ */ c("span", {
158
+ children: [/* @__PURE__ */ d("span", {
150
159
  className: "font-medium text-text-primary",
151
- children: b("eventfullymanaged.venues.form.fields.city", "City")
152
- }), /* @__PURE__ */ c(h, {
153
- value: k.city,
154
- onChange: (e) => j("city", e.target.value)
160
+ children: C("eventfullymanaged.venues.form.fields.city", "City")
161
+ }), /* @__PURE__ */ d(v, {
162
+ value: M.city,
163
+ onChange: (e) => P("city", e.target.value)
155
164
  })]
156
165
  }),
157
- /* @__PURE__ */ l("label", {
166
+ /* @__PURE__ */ f("label", {
158
167
  className: "space-y-1 text-sm",
159
- children: [/* @__PURE__ */ c("span", {
168
+ children: [/* @__PURE__ */ d("span", {
160
169
  className: "font-medium text-text-primary",
161
- children: b("eventfullymanaged.venues.form.fields.state", "State")
162
- }), /* @__PURE__ */ c(h, {
163
- value: k.state,
164
- onChange: (e) => j("state", e.target.value)
170
+ children: C("eventfullymanaged.venues.form.fields.state", "State")
171
+ }), /* @__PURE__ */ d(v, {
172
+ value: M.state,
173
+ onChange: (e) => P("state", e.target.value)
165
174
  })]
166
175
  })
167
176
  ]
168
177
  }),
169
- /* @__PURE__ */ l("div", {
178
+ /* @__PURE__ */ f("div", {
170
179
  className: "grid grid-cols-1 gap-4 md:grid-cols-3",
171
180
  children: [
172
- /* @__PURE__ */ l("label", {
181
+ /* @__PURE__ */ f("label", {
173
182
  className: "space-y-1 text-sm",
174
- children: [/* @__PURE__ */ c("span", {
183
+ children: [/* @__PURE__ */ d("span", {
175
184
  className: "font-medium text-text-primary",
176
- children: b("eventfullymanaged.venues.form.fields.country", "Country")
177
- }), /* @__PURE__ */ c(h, {
178
- value: k.country,
179
- onChange: (e) => j("country", e.target.value)
185
+ children: C("eventfullymanaged.venues.form.fields.country", "Country")
186
+ }), /* @__PURE__ */ d(v, {
187
+ value: M.country,
188
+ onChange: (e) => P("country", e.target.value)
180
189
  })]
181
190
  }),
182
- /* @__PURE__ */ l("label", {
191
+ /* @__PURE__ */ f("label", {
183
192
  className: "space-y-1 text-sm",
184
- children: [/* @__PURE__ */ c("span", {
193
+ children: [/* @__PURE__ */ d("span", {
185
194
  className: "font-medium text-text-primary",
186
- children: b("eventfullymanaged.venues.form.fields.postalCode", "Postal Code")
187
- }), /* @__PURE__ */ c(h, {
188
- value: k.postalCode,
189
- onChange: (e) => j("postalCode", e.target.value)
195
+ children: C("eventfullymanaged.venues.form.fields.postalCode", "Postal Code")
196
+ }), /* @__PURE__ */ d(v, {
197
+ value: M.postalCode,
198
+ onChange: (e) => P("postalCode", e.target.value)
190
199
  })]
191
200
  }),
192
- /* @__PURE__ */ l("label", {
201
+ /* @__PURE__ */ f("label", {
193
202
  className: "space-y-1 text-sm",
194
- children: [/* @__PURE__ */ c("span", {
203
+ children: [/* @__PURE__ */ d("span", {
195
204
  className: "font-medium text-text-primary",
196
- children: b("eventfullymanaged.venues.form.fields.status", "Status")
197
- }), /* @__PURE__ */ l("select", {
198
- value: k.status,
199
- onChange: (e) => j("status", e.target.value),
205
+ children: C("eventfullymanaged.venues.form.fields.status", "Status")
206
+ }), /* @__PURE__ */ f("select", {
207
+ value: M.status,
208
+ onChange: (e) => P("status", e.target.value),
200
209
  className: "w-full rounded-input border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary transition-colors focus-visible:border-border-focus focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus)] focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]",
201
210
  children: [
202
- /* @__PURE__ */ c("option", {
211
+ /* @__PURE__ */ d("option", {
203
212
  value: "ACTIVE",
204
- children: b("eventfullymanaged.venues.form.statusOptions.active", "Active")
213
+ children: C("eventfullymanaged.venues.form.statusOptions.active", "Active")
205
214
  }),
206
- /* @__PURE__ */ c("option", {
215
+ /* @__PURE__ */ d("option", {
207
216
  value: "INACTIVE",
208
- children: b("eventfullymanaged.venues.form.statusOptions.inactive", "Inactive")
217
+ children: C("eventfullymanaged.venues.form.statusOptions.inactive", "Inactive")
209
218
  }),
210
- /* @__PURE__ */ c("option", {
219
+ /* @__PURE__ */ d("option", {
211
220
  value: "MAINTENANCE",
212
- children: b("eventfullymanaged.venues.form.statusOptions.maintenance", "Maintenance")
221
+ children: C("eventfullymanaged.venues.form.statusOptions.maintenance", "Maintenance")
213
222
  })
214
223
  ]
215
224
  })]
216
225
  })
217
226
  ]
218
227
  }),
219
- /* @__PURE__ */ l("label", {
228
+ /* @__PURE__ */ f("label", {
220
229
  className: "block space-y-1 text-sm",
221
- children: [/* @__PURE__ */ c("span", {
230
+ children: [/* @__PURE__ */ d("span", {
222
231
  className: "font-medium text-text-primary",
223
- children: b("eventfullymanaged.venues.form.fields.amenities", "Amenities (comma separated)")
224
- }), /* @__PURE__ */ c(h, {
225
- value: k.amenities,
226
- onChange: (e) => j("amenities", e.target.value),
227
- placeholder: b("eventfullymanaged.venues.form.amenitiesPlaceholder", "wifi, parking, catering")
232
+ children: C("eventfullymanaged.venues.form.fields.amenities", "Amenities (comma separated)")
233
+ }), /* @__PURE__ */ d(v, {
234
+ value: M.amenities,
235
+ onChange: (e) => P("amenities", e.target.value),
236
+ placeholder: C("eventfullymanaged.venues.form.amenitiesPlaceholder", "wifi, parking, catering")
228
237
  })]
229
238
  }),
230
- /* @__PURE__ */ c("div", {
239
+ /* @__PURE__ */ d("div", {
231
240
  className: "flex justify-end",
232
- children: /* @__PURE__ */ l(p, {
241
+ children: /* @__PURE__ */ f(g, {
233
242
  type: "submit",
234
- disabled: N,
235
- children: [/* @__PURE__ */ c(d, { className: "h-4 w-4" }), N ? b("eventfullymanaged.venues.form.actions.saving", "Saving...") : b("eventfullymanaged.venues.form.actions.save", "Save Venue")]
243
+ disabled: I,
244
+ children: [/* @__PURE__ */ d(m, { className: "h-4 w-4" }), I ? C("eventfullymanaged.venues.form.actions.saving", "Saving...") : C("eventfullymanaged.venues.form.actions.save", "Save Venue")]
236
245
  })
237
246
  })
238
247
  ]
@@ -241,6 +250,6 @@ function y() {
241
250
  });
242
251
  }
243
252
  //#endregion
244
- export { y as default };
253
+ export { S as default };
245
254
 
246
255
  //# sourceMappingURL=VenueFormPage.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"VenueFormPage.js","names":[],"sources":["../../../../src/eventfullymanaged/pages/venues/VenueFormPage.tsx"],"sourcesContent":["/* eslint-disable react-hooks/set-state-in-effect */\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { ArrowLeft, Save } from 'lucide-react';\nimport { Button, EmphasisPanel, Input, PagePurpose, Textarea } from '@burdenoff/fe-libs/ui';\nimport { useEffect, useMemo, useState } from 'react';\nimport { useParams } from 'react-router-dom';\n\nimport { useCreateVenueMutation, useUpdateVenueMutation, useVenueQuery } from '../../api/eventApi';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\n\ntype VenueFormState = {\n name: string;\n description: string;\n addressLine1: string;\n city: string;\n state: string;\n country: string;\n postalCode: string;\n capacity: string;\n amenities: string;\n status: string;\n};\n\nconst initialState: VenueFormState = {\n name: '',\n description: '',\n addressLine1: '',\n city: '',\n state: '',\n country: 'India',\n postalCode: '',\n capacity: '',\n amenities: '',\n status: 'ACTIVE',\n};\n\nexport default function VenueFormPage() {\n const { t: translate } = useI18n();\n const t = (key: string, fallback: string) => {\n const value = translate(key);\n return value === key ? fallback : value;\n };\n const { id = '' } = useParams<{ id: string }>();\n const isEdit = useMemo(() => Boolean(id), [id]);\n const { navigate } = useEventfullyManaged();\n const { data } = useVenueQuery(id);\n const [createVenue, { loading: creating }] = useCreateVenueMutation();\n const [updateVenue, { loading: updating }] = useUpdateVenueMutation();\n const [form, setForm] = useState<VenueFormState>(initialState);\n\n useEffect(() => {\n if (!isEdit || !data?.venue) {\n return;\n }\n setForm({\n name: data.venue.name ?? '',\n description: data.venue.description ?? '',\n addressLine1: data.venue.addressLine1 ?? '',\n city: data.venue.city ?? '',\n state: data.venue.state ?? '',\n country: data.venue.country ?? 'India',\n postalCode: data.venue.postalCode ?? '',\n capacity: data.venue.capacity ? String(data.venue.capacity) : '',\n amenities: (data.venue.amenities ?? []).join(', '),\n status: data.venue.status ?? 'ACTIVE',\n });\n }, [data, isEdit]);\n\n const onChange = (field: keyof VenueFormState, value: string) => {\n setForm((prev) => ({ ...prev, [field]: value }));\n };\n\n const onSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n const payload = {\n name: form.name,\n description: form.description,\n addressLine1: form.addressLine1,\n city: form.city,\n state: form.state,\n country: form.country,\n postalCode: form.postalCode,\n capacity: form.capacity ? Number(form.capacity) : null,\n amenities: form.amenities\n .split(',')\n .map((item) => item.trim())\n .filter(Boolean),\n status: form.status,\n pricing: {},\n openingHours: {},\n metadata: {},\n };\n\n if (isEdit) {\n await updateVenue({ variables: { id, input: payload } });\n navigate(`/venues/${id}`);\n return;\n }\n\n const response = await createVenue({ variables: { input: payload } });\n const createdId = response.data?.createVenue?.id;\n navigate(createdId ? `/venues/${createdId}` : '/venues');\n };\n\n const isSaving = creating || updating;\n const selectClass =\n 'w-full rounded-input border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary transition-colors focus-visible:border-border-focus focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus)] focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]';\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={() => navigate('/venues')}>\n <ArrowLeft className=\"h-4 w-4\" />\n {t('eventfullymanaged.venues.form.backToVenues', 'Back to Venues')}\n </Button>\n <h1 className=\"mt-3 text-2xl font-bold text-text-primary\">\n {isEdit\n ? t('eventfullymanaged.venues.form.editTitle', 'Edit Venue')\n : t('eventfullymanaged.venues.form.createTitle', 'Create Venue')}\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {t('eventfullymanaged.venues.form.description', 'Manage venue details with live backend persistence.')}\n </p>\n </div>\n\n <PagePurpose>\n {t(\n 'eventfullymanaged.venues.form.purpose',\n 'Describe a space so you can reuse it across events. Capacity drives how many attendees you can register, the address helps people find it, and amenities tell organizers what is already provided. Fill this in once and every future event can simply point at this venue.'\n )}\n </PagePurpose>\n\n <EmphasisPanel>\n <form onSubmit={onSubmit} className=\"space-y-4\">\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.name', 'Name')}\n </span>\n <Input value={form.name} onChange={(e) => onChange('name', e.target.value)} required />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.capacity', 'Capacity')}\n </span>\n <Input\n value={form.capacity}\n onChange={(e) => onChange('capacity', e.target.value)}\n type=\"number\"\n min=\"0\"\n />\n </label>\n </div>\n\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.description', 'Description')}\n </span>\n <Textarea value={form.description} onChange={(e) => onChange('description', e.target.value)} rows={3} />\n </label>\n\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-4\">\n <label className=\"space-y-1 text-sm md:col-span-2\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.address', 'Address')}\n </span>\n <Input value={form.addressLine1} onChange={(e) => onChange('addressLine1', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.city', 'City')}\n </span>\n <Input value={form.city} onChange={(e) => onChange('city', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.state', 'State')}\n </span>\n <Input value={form.state} onChange={(e) => onChange('state', e.target.value)} />\n </label>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-3\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.country', 'Country')}\n </span>\n <Input value={form.country} onChange={(e) => onChange('country', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.postalCode', 'Postal Code')}\n </span>\n <Input value={form.postalCode} onChange={(e) => onChange('postalCode', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.status', 'Status')}\n </span>\n <select value={form.status} onChange={(e) => onChange('status', e.target.value)} className={selectClass}>\n <option value=\"ACTIVE\">{t('eventfullymanaged.venues.form.statusOptions.active', 'Active')}</option>\n <option value=\"INACTIVE\">\n {t('eventfullymanaged.venues.form.statusOptions.inactive', 'Inactive')}\n </option>\n <option value=\"MAINTENANCE\">\n {t('eventfullymanaged.venues.form.statusOptions.maintenance', 'Maintenance')}\n </option>\n </select>\n </label>\n </div>\n\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.amenities', 'Amenities (comma separated)')}\n </span>\n <Input\n value={form.amenities}\n onChange={(e) => onChange('amenities', e.target.value)}\n placeholder={t('eventfullymanaged.venues.form.amenitiesPlaceholder', 'wifi, parking, catering')}\n />\n </label>\n\n <div className=\"flex justify-end\">\n <Button type=\"submit\" disabled={isSaving}>\n <Save className=\"h-4 w-4\" />\n {isSaving\n ? t('eventfullymanaged.venues.form.actions.saving', 'Saving...')\n : t('eventfullymanaged.venues.form.actions.save', 'Save Venue')}\n </Button>\n </div>\n </form>\n </EmphasisPanel>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAuBA,IAAM,IAA+B;CACnC,MAAM;CACN,aAAa;CACb,cAAc;CACd,MAAM;CACN,OAAO;CACP,SAAS;CACT,YAAY;CACZ,UAAU;CACV,WAAW;CACX,QAAQ;CACT;AAED,SAAwB,IAAgB;CACtC,IAAM,EAAE,GAAG,MAAc,GAAS,EAC5B,KAAK,GAAa,MAAqB;EAC3C,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAE9B,EAAE,QAAK,OAAO,GAA2B,EACzC,IAAS,QAAc,EAAQ,GAAK,CAAC,EAAG,CAAC,EACzC,EAAE,gBAAa,GAAsB,EACrC,EAAE,YAAS,EAAc,EAAG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,EAAK;SAAY,WAAW,MAAM,EAAS,cAAc,EAAE,OAAO,MAAM;SAAI,CAAA,CACpF;;OACR,kBAAC,SAAD;QAAO,WAAU;kBAAjB,CACE,kBAAC,QAAD;SAAM,WAAU;mBACb,EAAE,+CAA+C,SAAS;SACtD,CAAA,EACP,kBAAC,UAAD;SAAQ,OAAO,EAAK;SAAQ,WAAW,MAAM,EAAS,UAAU,EAAE,OAAO,MAAM;SAAE,WA7F3F;mBA6FU;UACE,kBAAC,UAAD;WAAQ,OAAM;qBAAU,EAAE,sDAAsD,SAAS;WAAU,CAAA;UACnG,kBAAC,UAAD;WAAQ,OAAM;qBACX,EAAE,wDAAwD,WAAW;WAC/D,CAAA;UACT,kBAAC,UAAD;WAAQ,OAAM;qBACX,EAAE,2DAA2D,cAAc;WACrE,CAAA;UACF;WACH;;OACJ;;KAEN,kBAAC,SAAD;MAAO,WAAU;gBAAjB,CACE,kBAAC,QAAD;OAAM,WAAU;iBACb,EAAE,kDAAkD,8BAA8B;OAC9E,CAAA,EACP,kBAAC,GAAD;OACE,OAAO,EAAK;OACZ,WAAW,MAAM,EAAS,aAAa,EAAE,OAAO,MAAM;OACtD,aAAa,EAAE,sDAAsD,0BAA0B;OAC/F,CAAA,CACI;;KAER,kBAAC,OAAD;MAAK,WAAU;gBACb,kBAAC,GAAD;OAAQ,MAAK;OAAS,UAAU;iBAAhC,CACE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA,EAC3B,IACG,EAAE,gDAAgD,YAAY,GAC9D,EAAE,8CAA8C,aAAa,CAC1D;;MACL,CAAA;KACD;OACO,CAAA;GACZ"}
1
+ {"version":3,"file":"VenueFormPage.js","names":[],"sources":["../../../../src/eventfullymanaged/pages/venues/VenueFormPage.tsx"],"sourcesContent":["/* eslint-disable react-hooks/set-state-in-effect */\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport { ArrowLeft, Save } from 'lucide-react';\nimport { Button, EmphasisPanel, Input, PagePurpose, Textarea } from '@burdenoff/fe-libs/ui';\nimport { useEffect, useMemo, useState } from 'react';\nimport { useParams } from 'react-router-dom';\n\nimport { useCreateVenueMutation, useUpdateVenueMutation, useVenueQuery } from '../../api/eventApi';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\nimport { describeError, mutationSucceeded } from '../../lib/mutationResult';\nimport { notify } from '../../lib/toast';\n\ntype VenueFormState = {\n name: string;\n description: string;\n addressLine1: string;\n city: string;\n state: string;\n country: string;\n postalCode: string;\n capacity: string;\n amenities: string;\n status: string;\n};\n\nconst initialState: VenueFormState = {\n name: '',\n description: '',\n addressLine1: '',\n city: '',\n state: '',\n country: 'India',\n postalCode: '',\n capacity: '',\n amenities: '',\n status: 'ACTIVE',\n};\n\nexport default function VenueFormPage() {\n const { t: translate } = useI18n();\n const t = (key: string, fallback: string) => {\n const value = translate(key);\n return value === key ? fallback : value;\n };\n const { id = '' } = useParams<{ id: string }>();\n const isEdit = useMemo(() => Boolean(id), [id]);\n const { navigate } = useEventfullyManaged();\n const { data } = useVenueQuery(id);\n const [createVenue, { loading: creating }] = useCreateVenueMutation();\n const [updateVenue, { loading: updating }] = useUpdateVenueMutation();\n const [form, setForm] = useState<VenueFormState>(initialState);\n\n useEffect(() => {\n if (!isEdit || !data?.venue) {\n return;\n }\n setForm({\n name: data.venue.name ?? '',\n description: data.venue.description ?? '',\n addressLine1: data.venue.addressLine1 ?? '',\n city: data.venue.city ?? '',\n state: data.venue.state ?? '',\n country: data.venue.country ?? 'India',\n postalCode: data.venue.postalCode ?? '',\n capacity: data.venue.capacity ? String(data.venue.capacity) : '',\n amenities: (data.venue.amenities ?? []).join(', '),\n status: data.venue.status ?? 'ACTIVE',\n });\n }, [data, isEdit]);\n\n const onChange = (field: keyof VenueFormState, value: string) => {\n setForm((prev) => ({ ...prev, [field]: value }));\n };\n\n const onSubmit = async (event: React.FormEvent<HTMLFormElement>) => {\n event.preventDefault();\n const payload = {\n name: form.name,\n description: form.description,\n addressLine1: form.addressLine1,\n city: form.city,\n state: form.state,\n country: form.country,\n postalCode: form.postalCode,\n capacity: form.capacity ? Number(form.capacity) : null,\n amenities: form.amenities\n .split(',')\n .map((item) => item.trim())\n .filter(Boolean),\n status: form.status,\n pricing: {},\n openingHours: {},\n metadata: {},\n };\n\n try {\n if (isEdit) {\n const response = await updateVenue({ variables: { id, input: payload } });\n if (!mutationSucceeded(response, response.data?.updateVenue?.id, 'Could not update venue')) {\n return;\n }\n navigate(`/venues/${id}`);\n return;\n }\n\n const response = await createVenue({ variables: { input: payload } });\n const createdId = response.data?.createVenue?.id;\n if (!mutationSucceeded(response, createdId, 'Could not create venue')) {\n return;\n }\n navigate(`/venues/${createdId}`);\n } catch (error) {\n notify.error('Could not save venue', describeError(error));\n }\n };\n\n const isSaving = creating || updating;\n const selectClass =\n 'w-full rounded-input border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary transition-colors focus-visible:border-border-focus focus-visible:outline-none focus-visible:shadow-[var(--shadow-focus)] focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]';\n\n return (\n <div className=\"space-y-6 p-6\">\n <div>\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={() => navigate('/venues')}>\n <ArrowLeft className=\"h-4 w-4\" />\n {t('eventfullymanaged.venues.form.backToVenues', 'Back to Venues')}\n </Button>\n <h1 className=\"mt-3 text-2xl font-bold text-text-primary\">\n {isEdit\n ? t('eventfullymanaged.venues.form.editTitle', 'Edit Venue')\n : t('eventfullymanaged.venues.form.createTitle', 'Create Venue')}\n </h1>\n <p className=\"mt-1 text-sm text-text-secondary\">\n {t('eventfullymanaged.venues.form.description', 'Manage venue details with live backend persistence.')}\n </p>\n </div>\n\n <PagePurpose>\n {t(\n 'eventfullymanaged.venues.form.purpose',\n 'Describe a space so you can reuse it across events. Capacity drives how many attendees you can register, the address helps people find it, and amenities tell organizers what is already provided. Fill this in once and every future event can simply point at this venue.'\n )}\n </PagePurpose>\n\n <EmphasisPanel>\n <form onSubmit={onSubmit} className=\"space-y-4\">\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-2\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.name', 'Name')}\n </span>\n <Input value={form.name} onChange={(e) => onChange('name', e.target.value)} required />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.capacity', 'Capacity')}\n </span>\n <Input\n value={form.capacity}\n onChange={(e) => onChange('capacity', e.target.value)}\n type=\"number\"\n min=\"0\"\n />\n </label>\n </div>\n\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.description', 'Description')}\n </span>\n <Textarea value={form.description} onChange={(e) => onChange('description', e.target.value)} rows={3} />\n </label>\n\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-4\">\n <label className=\"space-y-1 text-sm md:col-span-2\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.address', 'Address')}\n </span>\n <Input value={form.addressLine1} onChange={(e) => onChange('addressLine1', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.city', 'City')}\n </span>\n <Input value={form.city} onChange={(e) => onChange('city', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.state', 'State')}\n </span>\n <Input value={form.state} onChange={(e) => onChange('state', e.target.value)} />\n </label>\n </div>\n\n <div className=\"grid grid-cols-1 gap-4 md:grid-cols-3\">\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.country', 'Country')}\n </span>\n <Input value={form.country} onChange={(e) => onChange('country', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.postalCode', 'Postal Code')}\n </span>\n <Input value={form.postalCode} onChange={(e) => onChange('postalCode', e.target.value)} />\n </label>\n <label className=\"space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.status', 'Status')}\n </span>\n <select value={form.status} onChange={(e) => onChange('status', e.target.value)} className={selectClass}>\n <option value=\"ACTIVE\">{t('eventfullymanaged.venues.form.statusOptions.active', 'Active')}</option>\n <option value=\"INACTIVE\">\n {t('eventfullymanaged.venues.form.statusOptions.inactive', 'Inactive')}\n </option>\n <option value=\"MAINTENANCE\">\n {t('eventfullymanaged.venues.form.statusOptions.maintenance', 'Maintenance')}\n </option>\n </select>\n </label>\n </div>\n\n <label className=\"block space-y-1 text-sm\">\n <span className=\"font-medium text-text-primary\">\n {t('eventfullymanaged.venues.form.fields.amenities', 'Amenities (comma separated)')}\n </span>\n <Input\n value={form.amenities}\n onChange={(e) => onChange('amenities', e.target.value)}\n placeholder={t('eventfullymanaged.venues.form.amenitiesPlaceholder', 'wifi, parking, catering')}\n />\n </label>\n\n <div className=\"flex justify-end\">\n <Button type=\"submit\" disabled={isSaving}>\n <Save className=\"h-4 w-4\" />\n {isSaving\n ? t('eventfullymanaged.venues.form.actions.saving', 'Saving...')\n : t('eventfullymanaged.venues.form.actions.save', 'Save Venue')}\n </Button>\n </div>\n </form>\n </EmphasisPanel>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAyBA,IAAM,IAA+B;CACnC,MAAM;CACN,aAAa;CACb,cAAc;CACd,MAAM;CACN,OAAO;CACP,SAAS;CACT,YAAY;CACZ,UAAU;CACV,WAAW;CACX,QAAQ;CACT;AAED,SAAwB,IAAgB;CACtC,IAAM,EAAE,GAAG,MAAc,GAAS,EAC5B,KAAK,GAAa,MAAqB;EAC3C,IAAM,IAAQ,EAAU,EAAI;AAC5B,SAAO,MAAU,IAAM,IAAW;IAE9B,EAAE,QAAK,OAAO,GAA2B,EACzC,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AAE,8CAA8C,aAAa,CAC1D;;MACL,CAAA;KACD;OACO,CAAA;GACZ"}
@@ -1 +1 @@
1
- {"version":3,"file":"VenueListPage.js","names":[],"sources":["../../../../src/eventfullymanaged/pages/venues/VenueListPage.tsx"],"sourcesContent":["import { Building2, MapPin, Plus, Search, Users } from 'lucide-react';\nimport { Badge, Button, EmphasisPanel, GlassCard, IllustratedEmptyState, Input, PagePurpose } from '@burdenoff/fe-libs/ui';\nimport { useMemo, useState } from 'react';\n\nimport { useVenuesQuery } from '../../api/eventApi';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\n\ntype VenueItem = {\n id: string;\n name: string;\n description?: string | null;\n city?: string | null;\n state?: string | null;\n country?: string | null;\n capacity?: number | null;\n status: string;\n amenities: string[];\n};\n\nexport default function VenueListPage() {\n const { navigate } = useEventfullyManaged();\n const [search, setSearch] = useState('');\n const { data, loading } = useVenuesQuery({ search, limit: 100, offset: 0 });\n\n const venues = useMemo(() => (data?.venues?.items ?? []) as VenueItem[], [data]);\n\n return (\n <div className=\"space-y-6 p-6\">\n <PagePurpose>\n Venues are the physical (or virtual) spaces where your events happen. Catalog them once — with capacity,\n location, amenities and floor plans — and reuse them across events. Start here when you are scouting or\n onboarding a new space to host an event.\n </PagePurpose>\n\n <EmphasisPanel className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Venues</h1>\n <p className=\"mt-1 text-sm text-text-secondary\">Browse and manage event venues using live backend data.</p>\n </div>\n <Button type=\"button\" onClick={() => navigate('/venues/create')}>\n <Plus className=\"h-4 w-4\" />\n Add Venue\n </Button>\n </EmphasisPanel>\n\n <div className=\"relative\">\n <Search className=\"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted\" />\n <Input\n type=\"text\"\n value={search}\n onChange={(event) => setSearch(event.target.value)}\n placeholder=\"Search venues by name or location\"\n aria-label=\"Search venues by name or location\"\n className=\"pl-10\"\n />\n </div>\n\n {loading ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-8 text-center text-sm text-text-secondary\">\n Loading venues...\n </GlassCard>\n ) : venues.length === 0 ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam\">\n <IllustratedEmptyState\n illustration={search ? 'empty-search' : 'empty-data'}\n title={search ? 'No venues match your search.' : 'No venues yet.'}\n description={\n search ? 'Try a different name or location.' : 'Add your first venue to start mapping events to spaces.'\n }\n action={\n !search ? (\n <Button type=\"button\" onClick={() => navigate('/venues/create')}>\n <Plus className=\"h-4 w-4\" />\n Add Venue\n </Button>\n ) : undefined\n }\n />\n </GlassCard>\n ) : (\n <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\n {venues.map((venue) => (\n <GlassCard\n key={venue.id}\n treatment=\"plain\"\n role=\"button\"\n tabIndex={0}\n aria-label={`Open ${venue.name}`}\n onClick={() => navigate(`/venues/${venue.id}`)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n navigate(`/venues/${venue.id}`);\n }\n }}\n className=\"cursor-pointer border-border-seam p-5 text-left outline-none focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]\"\n >\n <div className=\"flex items-start justify-between gap-4\">\n <div className=\"min-w-0\">\n <h2 className=\"text-lg font-semibold text-text-primary\">{venue.name}</h2>\n <p className=\"mt-1 line-clamp-2 text-sm text-text-secondary\">\n {venue.description ?? 'No description available.'}\n </p>\n </div>\n <Badge variant=\"secondary\" className=\"shrink-0 uppercase\">\n {venue.status}\n </Badge>\n </div>\n\n <div className=\"mt-4 grid grid-cols-1 gap-2 text-sm text-text-secondary sm:grid-cols-3\">\n <div className=\"flex items-center gap-2\">\n <MapPin className=\"h-4 w-4\" />\n <span>\n {[venue.city, venue.state, venue.country].filter(Boolean).join(', ') || 'Location not set'}\n </span>\n </div>\n <div className=\"flex items-center gap-2\">\n <Users className=\"h-4 w-4\" />\n <span className=\"tabular-nums\">{venue.capacity ?? 0} capacity</span>\n </div>\n <div className=\"flex items-center gap-2\">\n <Building2 className=\"h-4 w-4\" />\n <span className=\"tabular-nums\">{venue.amenities.length} amenities</span>\n </div>\n </div>\n </GlassCard>\n ))}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;AAmBA,SAAwB,IAAgB;CACtC,IAAM,EAAE,gBAAa,GAAsB,EACrC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,EAAE,SAAM,eAAY,EAAe;EAAE;EAAQ,OAAO;EAAK,QAAQ;EAAG,CAAC,EAErE,IAAS,QAAe,GAAM,QAAQ,SAAS,EAAE,EAAkB,CAAC,EAAK,CAAC;AAEhF,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,GAAD,EAAA,UAAa,6PAIC,CAAA;GAEd,kBAAC,GAAD;IAAe,WAAU;cAAzB,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eAAuC;KAAW,CAAA,EAChE,kBAAC,KAAD;KAAG,WAAU;eAAmC;KAA2D,CAAA,CACvG,EAAA,CAAA,EACN,kBAAC,GAAD;KAAQ,MAAK;KAAS,eAAe,EAAS,iBAAiB;eAA/D,CACE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA,EAAA,YAErB;OACK;;GAEhB,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAQ,WAAU,wFAAyF,CAAA,EAC3G,kBAAC,GAAD;KACE,MAAK;KACL,OAAO;KACP,WAAW,MAAU,EAAU,EAAM,OAAO,MAAM;KAClD,aAAY;KACZ,cAAW;KACX,WAAU;KACV,CAAA,CACE;;GAEL,IACC,kBAAC,GAAD;IAAW,WAAU;IAAQ,WAAU;cAAiE;IAE5F,CAAA,GACV,EAAO,WAAW,IACpB,kBAAC,GAAD;IAAW,WAAU;IAAQ,WAAU;cACrC,kBAAC,GAAD;KACE,cAAc,IAAS,iBAAiB;KACxC,OAAO,IAAS,i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,kBAAC,GAAD,EAAW,WAAU,WAAY,CAAA,EACjC,kBAAC,QAAD;SAAM,WAAU;mBAAhB,CAAgC,EAAM,UAAU,QAAO,aAAiB;WACpE;;OACF;QACI;OA1CL,EAAM,GA0CD,CACZ;IACE,CAAA;GAEJ"}
1
+ {"version":3,"file":"VenueListPage.js","names":[],"sources":["../../../../src/eventfullymanaged/pages/venues/VenueListPage.tsx"],"sourcesContent":["import { Building2, MapPin, Plus, Search, Users } from 'lucide-react';\nimport {\n Badge,\n Button,\n EmphasisPanel,\n GlassCard,\n IllustratedEmptyState,\n Input,\n PagePurpose,\n} from '@burdenoff/fe-libs/ui';\nimport { useMemo, useState } from 'react';\n\nimport { useVenuesQuery } from '../../api/eventApi';\nimport { useEventfullyManaged } from '../../context/EventfullyManagedContext';\n\ntype VenueItem = {\n id: string;\n name: string;\n description?: string | null;\n city?: string | null;\n state?: string | null;\n country?: string | null;\n capacity?: number | null;\n status: string;\n amenities: string[];\n};\n\nexport default function VenueListPage() {\n const { navigate } = useEventfullyManaged();\n const [search, setSearch] = useState('');\n const { data, loading } = useVenuesQuery({ search, limit: 100, offset: 0 });\n\n const venues = useMemo(() => (data?.venues?.items ?? []) as VenueItem[], [data]);\n\n return (\n <div className=\"space-y-6 p-6\">\n <PagePurpose>\n Venues are the physical (or virtual) spaces where your events happen. Catalog them once — with capacity,\n location, amenities and floor plans — and reuse them across events. Start here when you are scouting or\n onboarding a new space to host an event.\n </PagePurpose>\n\n <EmphasisPanel className=\"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between\">\n <div>\n <h1 className=\"text-2xl font-bold text-text-primary\">Venues</h1>\n <p className=\"mt-1 text-sm text-text-secondary\">Browse and manage event venues using live backend data.</p>\n </div>\n <Button type=\"button\" onClick={() => navigate('/venues/create')}>\n <Plus className=\"h-4 w-4\" />\n Add Venue\n </Button>\n </EmphasisPanel>\n\n <div className=\"relative\">\n <Search className=\"pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-muted\" />\n <Input\n type=\"text\"\n value={search}\n onChange={(event) => setSearch(event.target.value)}\n placeholder=\"Search venues by name or location\"\n aria-label=\"Search venues by name or location\"\n className=\"pl-10\"\n />\n </div>\n\n {loading ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam p-8 text-center text-sm text-text-secondary\">\n Loading venues...\n </GlassCard>\n ) : venues.length === 0 ? (\n <GlassCard treatment=\"plain\" className=\"border-border-seam\">\n <IllustratedEmptyState\n illustration={search ? 'empty-search' : 'empty-data'}\n title={search ? 'No venues match your search.' : 'No venues yet.'}\n description={\n search ? 'Try a different name or location.' : 'Add your first venue to start mapping events to spaces.'\n }\n action={\n !search ? (\n <Button type=\"button\" onClick={() => navigate('/venues/create')}>\n <Plus className=\"h-4 w-4\" />\n Add Venue\n </Button>\n ) : undefined\n }\n />\n </GlassCard>\n ) : (\n <div className=\"grid grid-cols-1 gap-4 lg:grid-cols-2\">\n {venues.map((venue) => (\n <GlassCard\n key={venue.id}\n treatment=\"plain\"\n role=\"button\"\n tabIndex={0}\n aria-label={`Open ${venue.name}`}\n onClick={() => navigate(`/venues/${venue.id}`)}\n onKeyDown={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n navigate(`/venues/${venue.id}`);\n }\n }}\n className=\"cursor-pointer border-border-seam p-5 text-left outline-none focus-visible:ring-1 focus-visible:ring-[var(--color-focus-ring)]\"\n >\n <div className=\"flex items-start justify-between gap-4\">\n <div className=\"min-w-0\">\n <h2 className=\"text-lg font-semibold text-text-primary\">{venue.name}</h2>\n <p className=\"mt-1 line-clamp-2 text-sm text-text-secondary\">\n {venue.description ?? 'No description available.'}\n </p>\n </div>\n <Badge variant=\"secondary\" className=\"shrink-0 uppercase\">\n {venue.status}\n </Badge>\n </div>\n\n <div className=\"mt-4 grid grid-cols-1 gap-2 text-sm text-text-secondary sm:grid-cols-3\">\n <div className=\"flex items-center gap-2\">\n <MapPin className=\"h-4 w-4\" />\n <span>\n {[venue.city, venue.state, venue.country].filter(Boolean).join(', ') || 'Location not set'}\n </span>\n </div>\n <div className=\"flex items-center gap-2\">\n <Users className=\"h-4 w-4\" />\n <span className=\"tabular-nums\">{venue.capacity ?? 0} capacity</span>\n </div>\n <div className=\"flex items-center gap-2\">\n <Building2 className=\"h-4 w-4\" />\n <span className=\"tabular-nums\">{venue.amenities.length} amenities</span>\n </div>\n </div>\n </GlassCard>\n ))}\n </div>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;AA2BA,SAAwB,IAAgB;CACtC,IAAM,EAAE,gBAAa,GAAsB,EACrC,CAAC,GAAQ,KAAa,EAAS,GAAG,EAClC,EAAE,SAAM,eAAY,EAAe;EAAE;EAAQ,OAAO;EAAK,QAAQ;EAAG,CAAC,EAErE,IAAS,QAAe,GAAM,QAAQ,SAAS,EAAE,EAAkB,CAAC,EAAK,CAAC;AAEhF,QACE,kBAAC,OAAD;EAAK,WAAU;YAAf;GACE,kBAAC,GAAD,EAAA,UAAa,6PAIC,CAAA;GAEd,kBAAC,GAAD;IAAe,WAAU;cAAzB,CACE,kBAAC,OAAD,EAAA,UAAA,CACE,kBAAC,MAAD;KAAI,WAAU;eAAuC;KAAW,CAAA,EAChE,kBAAC,KAAD;KAAG,WAAU;eAAmC;KAA2D,CAAA,CACvG,EAAA,CAAA,EACN,kBAAC,GAAD;KAAQ,MAAK;KAAS,eAAe,EAAS,iBAAiB;eAA/D,CACE,kBAAC,GAAD,EAAM,WAAU,WAAY,CAAA,EAAA,YAErB;OACK;;GAEhB,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD,EAAQ,WAAU,wFAAyF,CAAA,EAC3G,kBAAC,GAAD;KACE,MAAK;KACL,OAAO;KACP,WAAW,MAAU,EAAU,EAAM,OAAO,MAAM;KAClD,aAAY;KACZ,cAAW;KACX,WAAU;KACV,CAAA,CACE;;GAEL,IACC,kBAAC,GAAD;IAAW,WAAU;IAAQ,WAAU;cAAiE;IAE5F,CAAA,GACV,E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C7B,kBAAC,QAAD;SAAM,WAAU;mBAAhB,CAAgC,EAAM,YAAY,GAAE,YAAgB;WAChE;;OACN,kBAAC,OAAD;QAAK,WAAU;kBAAf,CACE,kBAAC,GAAD,EAAW,WAAU,WAAY,CAAA,EACjC,kBAAC,QAAD;SAAM,WAAU;mBAAhB,CAAgC,EAAM,UAAU,QAAO,aAAiB;WACpE;;OACF;QACI;OA1CL,EAAM,GA0CD,CACZ;IACE,CAAA;GAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"ApolloContext.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/react/context/ApolloContext.js"],"sourcesContent":["import * as React from \"react\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n// To make sure Apollo Client doesn't create more than one React context\n// (which can lead to problems like having an Apollo Client instance added\n// in one context, then attempting to retrieve it from another different\n// context), a single Apollo context is created and tracked in global state.\nconst contextKey = Symbol.for(\"__APOLLO_CONTEXT__\");\nexport function getApolloContext() {\n invariant(\"createContext\" in React, 37);\n let context = React.createContext[contextKey];\n if (!context) {\n Object.defineProperty(React.createContext, contextKey, {\n value: (context = React.createContext({})),\n enumerable: false,\n writable: false,\n configurable: true,\n });\n context.displayName = \"ApolloContext\";\n }\n return context;\n}\n//# sourceMappingURL=ApolloContext.js.map\n"],"x_google_ignoreList":[0],"mappings":";;;AAMA,IAAM,IAAa,OAAO,IAAI,qBAAqB;AACnD,SAAgB,IAAmB;AAC/B,GAAU,mBAAmB,GAAO,GAAG;CACvC,IAAI,IAAU,EAAM,cAAc;AAUlC,QATK,MACD,OAAO,eAAe,EAAM,eAAe,GAAY;EACnD,OAAQ,IAAU,EAAM,cAAc,EAAE,CAAC;EACzC,YAAY;EACZ,UAAU;EACV,cAAc;EACjB,CAAC,EACF,EAAQ,cAAc,kBAEnB"}
1
+ {"version":3,"file":"ApolloContext.js","names":["React"],"sources":["../../../../../../node_modules/@apollo/client/react/context/ApolloContext.js"],"sourcesContent":["import * as React from \"react\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\n// To make sure Apollo Client doesn't create more than one React context\n// (which can lead to problems like having an Apollo Client instance added\n// in one context, then attempting to retrieve it from another different\n// context), a single Apollo context is created and tracked in global state.\nconst contextKey = Symbol.for(\"__APOLLO_CONTEXT__\");\nexport function getApolloContext() {\n invariant(\"createContext\" in React, 37);\n let context = React.createContext[contextKey];\n if (!context) {\n Object.defineProperty(React.createContext, contextKey, {\n value: (context = React.createContext({})),\n enumerable: false,\n writable: false,\n configurable: true,\n });\n context.displayName = \"ApolloContext\";\n }\n return context;\n}\n//# sourceMappingURL=ApolloContext.js.map\n"],"x_google_ignoreList":[0],"mappings":";;;AAMA,IAAM,IAAa,OAAO,IAAI,qBAAqB;AACnD,SAAgB,IAAmB;AAC/B,GAAU,mBAAmBA,GAAO,GAAG;CACvC,IAAI,IAAUA,EAAM,cAAc;AAUlC,QATK,MACD,OAAO,eAAeA,EAAM,eAAe,GAAY;EACnD,OAAQ,IAAUA,EAAM,cAAc,EAAE,CAAC;EACzC,YAAY;EACZ,UAAU;EACV,cAAc;EACjB,CAAC,EACF,EAAQ,cAAc,kBAEnB"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDeepMemo.js","names":[],"sources":["../../../../../../../node_modules/@apollo/client/react/hooks/internal/useDeepMemo.js"],"sourcesContent":["import { equal } from \"@wry/equality\";\nimport * as React from \"react\";\nexport function useDeepMemo(memoFn, deps) {\n const ref = React.useRef(void 0);\n // eslint-disable-next-line react-hooks/refs\n if (!ref.current || !equal(ref.current.deps, deps)) {\n ref.current = { value: memoFn(), deps };\n }\n // eslint-disable-next-line react-hooks/refs\n return ref.current.value;\n}\n//# sourceMappingURL=useDeepMemo.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAEA,SAAgB,EAAY,GAAQ,GAAM;CACtC,IAAM,IAAM,EAAM,OAAO,KAAK,EAAE;AAMhC,SAJI,CAAC,EAAI,WAAW,CAAC,EAAM,EAAI,QAAQ,MAAM,EAAK,MAC9C,EAAI,UAAU;EAAE,OAAO,GAAQ;EAAE;EAAM,GAGpC,EAAI,QAAQ"}
1
+ {"version":3,"file":"useDeepMemo.js","names":["React"],"sources":["../../../../../../../node_modules/@apollo/client/react/hooks/internal/useDeepMemo.js"],"sourcesContent":["import { equal } from \"@wry/equality\";\nimport * as React from \"react\";\nexport function useDeepMemo(memoFn, deps) {\n const ref = React.useRef(void 0);\n // eslint-disable-next-line react-hooks/refs\n if (!ref.current || !equal(ref.current.deps, deps)) {\n ref.current = { value: memoFn(), deps };\n }\n // eslint-disable-next-line react-hooks/refs\n return ref.current.value;\n}\n//# sourceMappingURL=useDeepMemo.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAEA,SAAgB,EAAY,GAAQ,GAAM;CACtC,IAAM,IAAMA,EAAM,OAAO,KAAK,EAAE;AAMhC,SAJI,CAAC,EAAI,WAAW,CAAC,EAAM,EAAI,QAAQ,MAAM,EAAK,MAC9C,EAAI,UAAU;EAAE,OAAO,GAAQ;EAAE;EAAM,GAGpC,EAAI,QAAQ"}
@@ -1 +1 @@
1
- {"version":3,"file":"useIsomorphicLayoutEffect.js","names":[],"sources":["../../../../../../../node_modules/@apollo/client/react/hooks/internal/useIsomorphicLayoutEffect.js"],"sourcesContent":["import * as React from \"react\";\nimport { canUseDOM } from \"@apollo/client/utilities/internal\";\n// use canUseDOM here instead of canUseLayoutEffect because we want to be able\n// to use useLayoutEffect in our jest tests. useLayoutEffect seems to work fine\n// in useSuspenseQuery tests, but to honor the original comment about the\n// warnings for useSyncExternalStore implementation, canUseLayoutEffect is left\n// alone.\nexport const useIsomorphicLayoutEffect = canUseDOM ? React.useLayoutEffect : React.useEffect;\n//# sourceMappingURL=useIsomorphicLayoutEffect.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAOA,IAAa,IAA4B,IAAY,EAAM,kBAAkB,EAAM"}
1
+ {"version":3,"file":"useIsomorphicLayoutEffect.js","names":["React"],"sources":["../../../../../../../node_modules/@apollo/client/react/hooks/internal/useIsomorphicLayoutEffect.js"],"sourcesContent":["import * as React from \"react\";\nimport { canUseDOM } from \"@apollo/client/utilities/internal\";\n// use canUseDOM here instead of canUseLayoutEffect because we want to be able\n// to use useLayoutEffect in our jest tests. useLayoutEffect seems to work fine\n// in useSuspenseQuery tests, but to honor the original comment about the\n// warnings for useSyncExternalStore implementation, canUseLayoutEffect is left\n// alone.\nexport const useIsomorphicLayoutEffect = canUseDOM ? React.useLayoutEffect : React.useEffect;\n//# sourceMappingURL=useIsomorphicLayoutEffect.js.map"],"x_google_ignoreList":[0],"mappings":";;;AAOA,IAAa,IAA4B,IAAYA,EAAM,kBAAkBA,EAAM"}
@@ -1 +1 @@
1
- {"version":3,"file":"wrapHook.js","names":[],"sources":["../../../../../../../node_modules/@apollo/client/react/hooks/internal/wrapHook.js"],"sourcesContent":["import * as React from \"react\";\nimport { wrapperSymbol } from \"@apollo/client/react/internal\";\n// direct import to avoid circular dependency\nimport { getApolloContext } from \"../../context/ApolloContext.js\";\n/**\n* @internal\n*\n* Makes an Apollo Client hook \"wrappable\".\n* That means that the Apollo Client instance can expose a \"wrapper\" that will be\n* used to wrap the original hook implementation with additional logic.\n* @example\n*\n* ```tsx\n* // this is already done in `@apollo/client` for all wrappable hooks (see `WrappableHooks`)\n* // following this pattern\n* function useQuery() {\n* return wrapHook('useQuery', _useQuery, options.client)(query, options);\n* }\n* function _useQuery(query, options) {\n* // original implementation\n* }\n*\n* // this is what a library like `@apollo/client-react-streaming` would do\n* class ApolloClientWithStreaming extends ApolloClient {\n* constructor(options) {\n* super(options);\n* this.queryManager[Symbol.for(\"apollo.hook.wrappers\")] = {\n* useQuery: (original) => (query, options) => {\n* console.log(\"useQuery was called with options\", options);\n* return original(query, options);\n* }\n* }\n* }\n* }\n*\n* // this will now log the options and then call the original `useQuery`\n* const client = new ApolloClientWithStreaming({ ... });\n* useQuery(query, { client });\n* ```\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function wrapHook(hookName, useHook, clientOrObsQuery) {\n // Priority-wise, the later entries in this array wrap\n // previous entries and could prevent them (and in the end,\n // even the original hook) from running\n const wrapperSources = [\n clientOrObsQuery[\"queryManager\"],\n // if we are a hook (not `preloadQuery`), we are guaranteed to be inside of\n // a React render and can use context\n hookName.startsWith(\"use\") ?\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useContext(getApolloContext())\n : undefined,\n ];\n let wrapped = useHook;\n for (const source of wrapperSources) {\n const wrapper = source?.[wrapperSymbol]?.[hookName];\n if (wrapper) {\n wrapped = wrapper(wrapped);\n }\n }\n return wrapped;\n}\n//# sourceMappingURL=wrapHook.js.map\n"],"x_google_ignoreList":[0],"mappings":";;;;AA0CA,SAAgB,EAAS,GAAU,GAAS,GAAkB;CAI1D,IAAM,IAAiB,CACnB,EAAiB,cAGjB,EAAS,WAAW,MAAM,GAEtB,EAAM,WAAW,GAAkB,CAAC,GAClC,KAAA,EACT,EACG,IAAU;AACd,MAAK,IAAM,KAAU,GAAgB;EACjC,IAAM,IAAU,IAAS,KAAiB;AAC1C,EAAI,MACA,IAAU,EAAQ,EAAQ;;AAGlC,QAAO"}
1
+ {"version":3,"file":"wrapHook.js","names":["React"],"sources":["../../../../../../../node_modules/@apollo/client/react/hooks/internal/wrapHook.js"],"sourcesContent":["import * as React from \"react\";\nimport { wrapperSymbol } from \"@apollo/client/react/internal\";\n// direct import to avoid circular dependency\nimport { getApolloContext } from \"../../context/ApolloContext.js\";\n/**\n* @internal\n*\n* Makes an Apollo Client hook \"wrappable\".\n* That means that the Apollo Client instance can expose a \"wrapper\" that will be\n* used to wrap the original hook implementation with additional logic.\n* @example\n*\n* ```tsx\n* // this is already done in `@apollo/client` for all wrappable hooks (see `WrappableHooks`)\n* // following this pattern\n* function useQuery() {\n* return wrapHook('useQuery', _useQuery, options.client)(query, options);\n* }\n* function _useQuery(query, options) {\n* // original implementation\n* }\n*\n* // this is what a library like `@apollo/client-react-streaming` would do\n* class ApolloClientWithStreaming extends ApolloClient {\n* constructor(options) {\n* super(options);\n* this.queryManager[Symbol.for(\"apollo.hook.wrappers\")] = {\n* useQuery: (original) => (query, options) => {\n* console.log(\"useQuery was called with options\", options);\n* return original(query, options);\n* }\n* }\n* }\n* }\n*\n* // this will now log the options and then call the original `useQuery`\n* const client = new ApolloClientWithStreaming({ ... });\n* useQuery(query, { client });\n* ```\n* \n* @deprecated This is an internal API and should not be used directly. This can be removed or changed at any time.\n*/\nexport function wrapHook(hookName, useHook, clientOrObsQuery) {\n // Priority-wise, the later entries in this array wrap\n // previous entries and could prevent them (and in the end,\n // even the original hook) from running\n const wrapperSources = [\n clientOrObsQuery[\"queryManager\"],\n // if we are a hook (not `preloadQuery`), we are guaranteed to be inside of\n // a React render and can use context\n hookName.startsWith(\"use\") ?\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useContext(getApolloContext())\n : undefined,\n ];\n let wrapped = useHook;\n for (const source of wrapperSources) {\n const wrapper = source?.[wrapperSymbol]?.[hookName];\n if (wrapper) {\n wrapped = wrapper(wrapped);\n }\n }\n return wrapped;\n}\n//# sourceMappingURL=wrapHook.js.map\n"],"x_google_ignoreList":[0],"mappings":";;;;AA0CA,SAAgB,EAAS,GAAU,GAAS,GAAkB;CAI1D,IAAM,IAAiB,CACnB,EAAiB,cAGjB,EAAS,WAAW,MAAM,GAEtBA,EAAM,WAAW,GAAkB,CAAC,GAClC,KAAA,EACT,EACG,IAAU;AACd,MAAK,IAAM,KAAU,GAAgB;EACjC,IAAM,IAAU,IAAS,KAAiB;AAC1C,EAAI,MACA,IAAU,EAAQ,EAAQ;;AAGlC,QAAO"}
@@ -1 +1 @@
1
- {"version":3,"file":"useApolloClient.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/react/hooks/useApolloClient.js"],"sourcesContent":["import * as React from \"react\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nimport { getApolloContext } from \"../context/ApolloContext.js\";\n/**\n * @example\n *\n * ```jsx\n * import { useApolloClient } from \"@apollo/client/react\";\n *\n * function SomeComponent() {\n * const client = useApolloClient();\n * // `client` is now set to the `ApolloClient` instance being used by the\n * // application (that was configured using something like `ApolloProvider`)\n * }\n * ```\n *\n * @returns The `ApolloClient` instance being used by the application.\n */\nexport function useApolloClient(override) {\n const context = React.useContext(getApolloContext());\n const client = override || context.client;\n invariant(!!client, 28);\n return client;\n}\n//# sourceMappingURL=useApolloClient.js.map\n"],"x_google_ignoreList":[0],"mappings":";;;;AAkBA,SAAgB,EAAgB,GAAU;CACtC,IAAM,IAAU,EAAM,WAAW,GAAkB,CAAC,EAC9C,IAAS,KAAY,EAAQ;AAEnC,QADA,EAAU,CAAC,CAAC,GAAQ,GAAG,EAChB"}
1
+ {"version":3,"file":"useApolloClient.js","names":["React"],"sources":["../../../../../../node_modules/@apollo/client/react/hooks/useApolloClient.js"],"sourcesContent":["import * as React from \"react\";\nimport { invariant } from \"@apollo/client/utilities/invariant\";\nimport { getApolloContext } from \"../context/ApolloContext.js\";\n/**\n * @example\n *\n * ```jsx\n * import { useApolloClient } from \"@apollo/client/react\";\n *\n * function SomeComponent() {\n * const client = useApolloClient();\n * // `client` is now set to the `ApolloClient` instance being used by the\n * // application (that was configured using something like `ApolloProvider`)\n * }\n * ```\n *\n * @returns The `ApolloClient` instance being used by the application.\n */\nexport function useApolloClient(override) {\n const context = React.useContext(getApolloContext());\n const client = override || context.client;\n invariant(!!client, 28);\n return client;\n}\n//# sourceMappingURL=useApolloClient.js.map\n"],"x_google_ignoreList":[0],"mappings":";;;;AAkBA,SAAgB,EAAgB,GAAU;CACtC,IAAM,IAAUA,EAAM,WAAW,GAAkB,CAAC,EAC9C,IAAS,KAAY,EAAQ;AAEnC,QADA,EAAU,CAAC,CAAC,GAAQ,GAAG,EAChB"}
@@ -1 +1 @@
1
- {"version":3,"file":"useMutation.js","names":[],"sources":["../../../../../../node_modules/@apollo/client/react/hooks/useMutation.js"],"sourcesContent":["import { equal } from \"@wry/equality\";\nimport * as React from \"react\";\nimport { mergeOptions, preventUnhandledRejection, } from \"@apollo/client/utilities/internal\";\nimport { useIsomorphicLayoutEffect } from \"./internal/useIsomorphicLayoutEffect.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n/**\n * > Refer to the [Mutations](https://www.apollographql.com/docs/react/data/mutations/) section for a more in-depth overview of `useMutation`.\n *\n * @example\n *\n * ```jsx\n * import { gql, useMutation } from \"@apollo/client\";\n *\n * const ADD_TODO = gql`\n * mutation AddTodo($type: String!) {\n * addTodo(type: $type) {\n * id\n * type\n * }\n * }\n * `;\n *\n * function AddTodo() {\n * let input;\n * const [addTodo, { data }] = useMutation(ADD_TODO);\n *\n * return (\n * <div>\n * <form\n * onSubmit={(e) => {\n * e.preventDefault();\n * addTodo({ variables: { type: input.value } });\n * input.value = \"\";\n * }}\n * >\n * <input\n * ref={(node) => {\n * input = node;\n * }}\n * />\n * <button type=\"submit\">Add Todo</button>\n * </form>\n * </div>\n * );\n * }\n * ```\n *\n * @param mutation - A GraphQL mutation document parsed into an AST by `gql`.\n * @param options - Options to control how the mutation is executed.\n * @returns A tuple in the form of `[mutate, result]`\n */\nexport function useMutation(mutation, options) {\n const client = useApolloClient(options?.client);\n const [result, setResult] = React.useState(() => createInitialResult(client));\n const ref = React.useRef({\n result,\n mutationId: 0,\n isMounted: true,\n client,\n mutation,\n options,\n });\n useIsomorphicLayoutEffect(() => {\n Object.assign(ref.current, { client, options, mutation });\n });\n const execute = React.useCallback((executeOptions = {}) => {\n const { options, mutation } = ref.current;\n const baseOptions = { ...options, mutation };\n const client = executeOptions.client || ref.current.client;\n const context = typeof executeOptions.context === \"function\" ?\n executeOptions.context(options?.context)\n : executeOptions.context;\n if (!ref.current.result.loading && ref.current.isMounted) {\n setResult((ref.current.result = {\n loading: true,\n error: undefined,\n data: undefined,\n called: true,\n client,\n }));\n }\n const mutationId = ++ref.current.mutationId;\n const clientOptions = mergeOptions(baseOptions, {\n ...executeOptions,\n context,\n });\n return preventUnhandledRejection(client\n .mutate(clientOptions)\n .then((response) => {\n const { data, error } = response;\n const onError = executeOptions.onError || ref.current.options?.onError;\n if (error && onError) {\n onError(error, clientOptions);\n }\n if (mutationId === ref.current.mutationId) {\n const result = {\n called: true,\n loading: false,\n data,\n error,\n client,\n };\n if (ref.current.isMounted &&\n !equal(ref.current.result, result)) {\n setResult((ref.current.result = result));\n }\n }\n const onCompleted = executeOptions.onCompleted || ref.current.options?.onCompleted;\n if (!error) {\n onCompleted?.(response.data, clientOptions);\n }\n return response;\n }, (error) => {\n if (mutationId === ref.current.mutationId &&\n ref.current.isMounted) {\n const result = {\n loading: false,\n error,\n data: void 0,\n called: true,\n client,\n };\n if (!equal(ref.current.result, result)) {\n setResult((ref.current.result = result));\n }\n }\n const onError = executeOptions.onError || ref.current.options?.onError;\n if (onError) {\n onError(error, clientOptions);\n }\n throw error;\n }));\n }, []);\n const reset = React.useCallback(() => {\n if (ref.current.isMounted) {\n const result = createInitialResult(ref.current.client);\n Object.assign(ref.current, { mutationId: 0, result });\n setResult(result);\n }\n }, []);\n React.useEffect(() => {\n const current = ref.current;\n current.isMounted = true;\n return () => {\n current.isMounted = false;\n };\n }, []);\n return [execute, { reset, ...result }];\n}\nfunction createInitialResult(client) {\n return {\n data: undefined,\n error: undefined,\n called: false,\n loading: false,\n client,\n };\n}\n//# sourceMappingURL=useMutation.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AAmDA,SAAgB,EAAY,GAAU,GAAS;CAC3C,IAAM,IAAS,EAAgB,GAAS,OAAO,EACzC,CAAC,GAAQ,KAAa,EAAM,eAAe,EAAoB,EAAO,CAAC,EACvE,IAAM,EAAM,OAAO;EACrB;EACA,YAAY;EACZ,WAAW;EACX;EACA;EACA;EACH,CAAC;AACF,SAAgC;AAC5B,SAAO,OAAO,EAAI,SAAS;GAAE;GAAQ;GAAS;GAAU,CAAC;GAC3D;CACF,IAAM,IAAU,EAAM,aAAa,IAAiB,EAAE,KAAK;EACvD,IAAM,EAAE,YAAS,gBAAa,EAAI,SAC5B,IAAc;GAAE,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;AAClC,MAAI,EAAI,QAAQ,WAAW;GACvB,IAAM,IAAS,EAAoB,EAAI,QAAQ,OAAO;AAEtD,GADA,OAAO,OAAO,EAAI,SAAS;IAAE,YAAY;IAAG;IAAQ,CAAC,EACrD,EAAU,EAAO;;IAEtB,EAAE,CAAC;AAQN,QAPA,EAAM,gBAAgB;EAClB,IAAM,IAAU,EAAI;AAEpB,SADA,EAAQ,YAAY,UACP;AACT,KAAQ,YAAY;;IAEzB,EAAE,CAAC,EACC,CAAC,GAAS;EAAE;EAAO,GAAG;EAAQ,CAAC;;AAE1C,SAAS,EAAoB,GAAQ;AACjC,QAAO;EACH,MAAM,KAAA;EACN,OAAO,KAAA;EACP,QAAQ;EACR,SAAS;EACT;EACH"}
1
+ {"version":3,"file":"useMutation.js","names":["React"],"sources":["../../../../../../node_modules/@apollo/client/react/hooks/useMutation.js"],"sourcesContent":["import { equal } from \"@wry/equality\";\nimport * as React from \"react\";\nimport { mergeOptions, preventUnhandledRejection, } from \"@apollo/client/utilities/internal\";\nimport { useIsomorphicLayoutEffect } from \"./internal/useIsomorphicLayoutEffect.js\";\nimport { useApolloClient } from \"./useApolloClient.js\";\n/**\n * > Refer to the [Mutations](https://www.apollographql.com/docs/react/data/mutations/) section for a more in-depth overview of `useMutation`.\n *\n * @example\n *\n * ```jsx\n * import { gql, useMutation } from \"@apollo/client\";\n *\n * const ADD_TODO = gql`\n * mutation AddTodo($type: String!) {\n * addTodo(type: $type) {\n * id\n * type\n * }\n * }\n * `;\n *\n * function AddTodo() {\n * let input;\n * const [addTodo, { data }] = useMutation(ADD_TODO);\n *\n * return (\n * <div>\n * <form\n * onSubmit={(e) => {\n * e.preventDefault();\n * addTodo({ variables: { type: input.value } });\n * input.value = \"\";\n * }}\n * >\n * <input\n * ref={(node) => {\n * input = node;\n * }}\n * />\n * <button type=\"submit\">Add Todo</button>\n * </form>\n * </div>\n * );\n * }\n * ```\n *\n * @param mutation - A GraphQL mutation document parsed into an AST by `gql`.\n * @param options - Options to control how the mutation is executed.\n * @returns A tuple in the form of `[mutate, result]`\n */\nexport function useMutation(mutation, options) {\n const client = useApolloClient(options?.client);\n const [result, setResult] = React.useState(() => createInitialResult(client));\n const ref = React.useRef({\n result,\n mutationId: 0,\n isMounted: true,\n client,\n mutation,\n options,\n });\n useIsomorphicLayoutEffect(() => {\n Object.assign(ref.current, { client, options, mutation });\n });\n const execute = React.useCallback((executeOptions = {}) => {\n const { options, mutation } = ref.current;\n const baseOptions = { ...options, mutation };\n const client = executeOptions.client || ref.current.client;\n const context = typeof executeOptions.context === \"function\" ?\n executeOptions.context(options?.context)\n : executeOptions.context;\n if (!ref.current.result.loading && ref.current.isMounted) {\n setResult((ref.current.result = {\n loading: true,\n error: undefined,\n data: undefined,\n called: true,\n client,\n }));\n }\n const mutationId = ++ref.current.mutationId;\n const clientOptions = mergeOptions(baseOptions, {\n ...executeOptions,\n context,\n });\n return preventUnhandledRejection(client\n .mutate(clientOptions)\n .then((response) => {\n const { data, error } = response;\n const onError = executeOptions.onError || ref.current.options?.onError;\n if (error && onError) {\n onError(error, clientOptions);\n }\n if (mutationId === ref.current.mutationId) {\n const result = {\n called: true,\n loading: false,\n data,\n error,\n client,\n };\n if (ref.current.isMounted &&\n !equal(ref.current.result, result)) {\n setResult((ref.current.result = result));\n }\n }\n const onCompleted = executeOptions.onCompleted || ref.current.options?.onCompleted;\n if (!error) {\n onCompleted?.(response.data, clientOptions);\n }\n return response;\n }, (error) => {\n if (mutationId === ref.current.mutationId &&\n ref.current.isMounted) {\n const result = {\n loading: false,\n error,\n data: void 0,\n called: true,\n client,\n };\n if (!equal(ref.current.result, result)) {\n setResult((ref.current.result = result));\n }\n }\n const onError = executeOptions.onError || ref.current.options?.onError;\n if (onError) {\n onError(error, clientOptions);\n }\n throw error;\n }));\n }, []);\n const reset = React.useCallback(() => {\n if (ref.current.isMounted) {\n const result = createInitialResult(ref.current.client);\n Object.assign(ref.current, { mutationId: 0, result });\n setResult(result);\n }\n }, []);\n React.useEffect(() => {\n const current = ref.current;\n current.isMounted = true;\n return () => {\n current.isMounted = false;\n };\n }, []);\n return [execute, { reset, ...result }];\n}\nfunction createInitialResult(client) {\n return {\n data: undefined,\n error: undefined,\n called: false,\n loading: false,\n client,\n };\n}\n//# sourceMappingURL=useMutation.js.map"],"x_google_ignoreList":[0],"mappings":";;;;;;;AAmDA,SAAgB,EAAY,GAAU,GAAS;CAC3C,IAAM,IAAS,EAAgB,GAAS,OAAO,EACzC,CAAC,GAAQ,KAAaA,EAAM,eAAe,EAAoB,EAAO,CAAC,EACvE,IAAMA,EAAM,OAAO;EACrB;EACA,YAAY;EACZ,WAAW;EACX;EACA;EACA;EACH,CAAC;AACF,SAAgC;AAC5B,SAAO,OAAO,EAAI,SAAS;GAAE;GAAQ;GAAS;GAAU,CAAC;GAC3D;CACF,IAAM,IAAUA,EAAM,aAAa,IAAiB,EAAE,KAAK;EACvD,IAAM,EAAE,YAAS,gBAAa,EAAI,SAC5B,IAAc;GAAE,GAAG;GAAS;GAAU,EACtC,IAAS,EAAe,UAAU,EAAI,QAAQ,QAC9C,IAAU,OAAO,EAAe,WAAY,aAC9C,EAAe,QAAQ,GAAS,QAAQ,GACtC,EAAe;AACrB,EAAI,CAAC,EAAI,QAAQ,OAAO,WAAW,EAAI,QAAQ,aAC3C,EAAW,EAAI,QAAQ,SAAS;GAC5B,SAAS;GACT,OAAO,KAAA;GACP,MAAM,KAAA;GACN,QAAQ;GACR;GACH,CAAE;EAEP,IAAM,IAAa,EAAE,EAAI,QAAQ,YAC3B,IAAgB,EAAa,GAAa;GAC5C,GAAG;GACH;GACH,CAAC;AACF,SAAO,EAA0B,EAC5B,OAAO,EAAc,CACrB,MAAM,MAAa;GACpB,IAAM,EAAE,SAAM,aAAU,GAClB,IAAU,EAAe,WAAW,EAAI,QAAQ,SAAS;AAI/D,OAHI,KAAS,KACT,EAAQ,GAAO,EAAc,EAE7B,MAAe,EAAI,QAAQ,YAAY;IACvC,IAAM,IAAS;KACX,QAAQ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