@burdenoff/microfe-eventfullymanaged 2026.625.2 → 2026.703.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.
- package/dist/eventfullymanaged/api/eventApi.js +83 -38
- package/dist/eventfullymanaged/api/eventApi.js.map +1 -1
- package/dist/eventfullymanaged/components/ImageUploadField.js +98 -0
- package/dist/eventfullymanaged/components/ImageUploadField.js.map +1 -0
- package/dist/eventfullymanaged/lib/mutationResult.js +12 -0
- package/dist/eventfullymanaged/lib/mutationResult.js.map +1 -0
- package/dist/eventfullymanaged/lib/toast.js +36 -0
- package/dist/eventfullymanaged/lib/toast.js.map +1 -0
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js +40 -32
- package/dist/eventfullymanaged/pages/modules/AnalyticsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js +71 -45
- package/dist/eventfullymanaged/pages/modules/AttendeeProfilePage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.js +56 -46
- package/dist/eventfullymanaged/pages/modules/CommunicationPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/EventsPage.js +75 -67
- package/dist/eventfullymanaged/pages/modules/EventsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.js +30 -11
- package/dist/eventfullymanaged/pages/modules/NetworkingPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js +35 -13
- package/dist/eventfullymanaged/pages/modules/SponsorDetailsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js +68 -54
- package/dist/eventfullymanaged/pages/modules/WorkflowsPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js +153 -125
- package/dist/eventfullymanaged/pages/sponsors/SponsorFormPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js +107 -62
- package/dist/eventfullymanaged/pages/venues/FloorPlansPage.js.map +1 -1
- package/dist/eventfullymanaged/pages/venues/VenueFormPage.js +144 -135
- package/dist/eventfullymanaged/pages/venues/VenueFormPage.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/context/ApolloContext.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/internal/useDeepMemo.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/internal/useIsomorphicLayoutEffect.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/internal/wrapHook.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useApolloClient.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useMutation.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useQuery.js.map +1 -1
- package/dist/node_modules/@apollo/client/react/hooks/useSyncExternalStore.js.map +1 -1
- package/dist/node_modules/sonner/dist/index.js +163 -0
- package/dist/node_modules/sonner/dist/index.js.map +1 -0
- package/package.json +1 -1
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { useEventfullyManaged as e } from "../../context/EventfullyManagedContext.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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
|
|
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
|
|
23
|
-
let { t:
|
|
24
|
-
let n =
|
|
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:
|
|
27
|
-
|
|
28
|
-
!
|
|
29
|
-
name:
|
|
30
|
-
description:
|
|
31
|
-
addressLine1:
|
|
32
|
-
city:
|
|
33
|
-
state:
|
|
34
|
-
country:
|
|
35
|
-
postalCode:
|
|
36
|
-
capacity:
|
|
37
|
-
amenities: (
|
|
38
|
-
status:
|
|
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
|
-
}, [
|
|
41
|
-
let
|
|
42
|
-
|
|
42
|
+
}, [D, T]);
|
|
43
|
+
let P = (e, t) => {
|
|
44
|
+
N((n) => ({
|
|
43
45
|
...n,
|
|
44
46
|
[e]: t
|
|
45
47
|
}));
|
|
46
|
-
},
|
|
48
|
+
}, F = async (e) => {
|
|
47
49
|
e.preventDefault();
|
|
48
|
-
let
|
|
49
|
-
name:
|
|
50
|
-
description:
|
|
51
|
-
addressLine1:
|
|
52
|
-
city:
|
|
53
|
-
state:
|
|
54
|
-
country:
|
|
55
|
-
postalCode:
|
|
56
|
-
capacity:
|
|
57
|
-
amenities:
|
|
58
|
-
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
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
71
|
-
|
|
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__ */
|
|
77
|
-
/* @__PURE__ */
|
|
85
|
+
/* @__PURE__ */ f("div", { children: [
|
|
86
|
+
/* @__PURE__ */ f(g, {
|
|
78
87
|
type: "button",
|
|
79
88
|
variant: "ghost",
|
|
80
89
|
size: "sm",
|
|
81
|
-
onClick: () =>
|
|
82
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
93
|
+
/* @__PURE__ */ d("h1", {
|
|
85
94
|
className: "mt-3 text-2xl font-bold text-text-primary",
|
|
86
|
-
children:
|
|
95
|
+
children: T ? C("eventfullymanaged.venues.form.editTitle", "Edit Venue") : C("eventfullymanaged.venues.form.createTitle", "Create Venue")
|
|
87
96
|
}),
|
|
88
|
-
/* @__PURE__ */
|
|
97
|
+
/* @__PURE__ */ d("p", {
|
|
89
98
|
className: "mt-1 text-sm text-text-secondary",
|
|
90
|
-
children:
|
|
99
|
+
children: C("eventfullymanaged.venues.form.description", "Manage venue details with live backend persistence.")
|
|
91
100
|
})
|
|
92
101
|
] }),
|
|
93
|
-
/* @__PURE__ */
|
|
94
|
-
/* @__PURE__ */
|
|
95
|
-
onSubmit:
|
|
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__ */
|
|
107
|
+
/* @__PURE__ */ f("div", {
|
|
99
108
|
className: "grid grid-cols-1 gap-4 md:grid-cols-2",
|
|
100
|
-
children: [/* @__PURE__ */
|
|
109
|
+
children: [/* @__PURE__ */ f("label", {
|
|
101
110
|
className: "space-y-1 text-sm",
|
|
102
|
-
children: [/* @__PURE__ */
|
|
111
|
+
children: [/* @__PURE__ */ d("span", {
|
|
103
112
|
className: "font-medium text-text-primary",
|
|
104
|
-
children:
|
|
105
|
-
}), /* @__PURE__ */
|
|
106
|
-
value:
|
|
107
|
-
onChange: (e) =>
|
|
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__ */
|
|
119
|
+
}), /* @__PURE__ */ f("label", {
|
|
111
120
|
className: "space-y-1 text-sm",
|
|
112
|
-
children: [/* @__PURE__ */
|
|
121
|
+
children: [/* @__PURE__ */ d("span", {
|
|
113
122
|
className: "font-medium text-text-primary",
|
|
114
|
-
children:
|
|
115
|
-
}), /* @__PURE__ */
|
|
116
|
-
value:
|
|
117
|
-
onChange: (e) =>
|
|
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__ */
|
|
132
|
+
/* @__PURE__ */ f("label", {
|
|
124
133
|
className: "block space-y-1 text-sm",
|
|
125
|
-
children: [/* @__PURE__ */
|
|
134
|
+
children: [/* @__PURE__ */ d("span", {
|
|
126
135
|
className: "font-medium text-text-primary",
|
|
127
|
-
children:
|
|
128
|
-
}), /* @__PURE__ */
|
|
129
|
-
value:
|
|
130
|
-
onChange: (e) =>
|
|
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__ */
|
|
143
|
+
/* @__PURE__ */ f("div", {
|
|
135
144
|
className: "grid grid-cols-1 gap-4 md:grid-cols-4",
|
|
136
145
|
children: [
|
|
137
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ f("label", {
|
|
138
147
|
className: "space-y-1 text-sm md:col-span-2",
|
|
139
|
-
children: [/* @__PURE__ */
|
|
148
|
+
children: [/* @__PURE__ */ d("span", {
|
|
140
149
|
className: "font-medium text-text-primary",
|
|
141
|
-
children:
|
|
142
|
-
}), /* @__PURE__ */
|
|
143
|
-
value:
|
|
144
|
-
onChange: (e) =>
|
|
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__ */
|
|
156
|
+
/* @__PURE__ */ f("label", {
|
|
148
157
|
className: "space-y-1 text-sm",
|
|
149
|
-
children: [/* @__PURE__ */
|
|
158
|
+
children: [/* @__PURE__ */ d("span", {
|
|
150
159
|
className: "font-medium text-text-primary",
|
|
151
|
-
children:
|
|
152
|
-
}), /* @__PURE__ */
|
|
153
|
-
value:
|
|
154
|
-
onChange: (e) =>
|
|
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__ */
|
|
166
|
+
/* @__PURE__ */ f("label", {
|
|
158
167
|
className: "space-y-1 text-sm",
|
|
159
|
-
children: [/* @__PURE__ */
|
|
168
|
+
children: [/* @__PURE__ */ d("span", {
|
|
160
169
|
className: "font-medium text-text-primary",
|
|
161
|
-
children:
|
|
162
|
-
}), /* @__PURE__ */
|
|
163
|
-
value:
|
|
164
|
-
onChange: (e) =>
|
|
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__ */
|
|
178
|
+
/* @__PURE__ */ f("div", {
|
|
170
179
|
className: "grid grid-cols-1 gap-4 md:grid-cols-3",
|
|
171
180
|
children: [
|
|
172
|
-
/* @__PURE__ */
|
|
181
|
+
/* @__PURE__ */ f("label", {
|
|
173
182
|
className: "space-y-1 text-sm",
|
|
174
|
-
children: [/* @__PURE__ */
|
|
183
|
+
children: [/* @__PURE__ */ d("span", {
|
|
175
184
|
className: "font-medium text-text-primary",
|
|
176
|
-
children:
|
|
177
|
-
}), /* @__PURE__ */
|
|
178
|
-
value:
|
|
179
|
-
onChange: (e) =>
|
|
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__ */
|
|
191
|
+
/* @__PURE__ */ f("label", {
|
|
183
192
|
className: "space-y-1 text-sm",
|
|
184
|
-
children: [/* @__PURE__ */
|
|
193
|
+
children: [/* @__PURE__ */ d("span", {
|
|
185
194
|
className: "font-medium text-text-primary",
|
|
186
|
-
children:
|
|
187
|
-
}), /* @__PURE__ */
|
|
188
|
-
value:
|
|
189
|
-
onChange: (e) =>
|
|
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__ */
|
|
201
|
+
/* @__PURE__ */ f("label", {
|
|
193
202
|
className: "space-y-1 text-sm",
|
|
194
|
-
children: [/* @__PURE__ */
|
|
203
|
+
children: [/* @__PURE__ */ d("span", {
|
|
195
204
|
className: "font-medium text-text-primary",
|
|
196
|
-
children:
|
|
197
|
-
}), /* @__PURE__ */
|
|
198
|
-
value:
|
|
199
|
-
onChange: (e) =>
|
|
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__ */
|
|
211
|
+
/* @__PURE__ */ d("option", {
|
|
203
212
|
value: "ACTIVE",
|
|
204
|
-
children:
|
|
213
|
+
children: C("eventfullymanaged.venues.form.statusOptions.active", "Active")
|
|
205
214
|
}),
|
|
206
|
-
/* @__PURE__ */
|
|
215
|
+
/* @__PURE__ */ d("option", {
|
|
207
216
|
value: "INACTIVE",
|
|
208
|
-
children:
|
|
217
|
+
children: C("eventfullymanaged.venues.form.statusOptions.inactive", "Inactive")
|
|
209
218
|
}),
|
|
210
|
-
/* @__PURE__ */
|
|
219
|
+
/* @__PURE__ */ d("option", {
|
|
211
220
|
value: "MAINTENANCE",
|
|
212
|
-
children:
|
|
221
|
+
children: C("eventfullymanaged.venues.form.statusOptions.maintenance", "Maintenance")
|
|
213
222
|
})
|
|
214
223
|
]
|
|
215
224
|
})]
|
|
216
225
|
})
|
|
217
226
|
]
|
|
218
227
|
}),
|
|
219
|
-
/* @__PURE__ */
|
|
228
|
+
/* @__PURE__ */ f("label", {
|
|
220
229
|
className: "block space-y-1 text-sm",
|
|
221
|
-
children: [/* @__PURE__ */
|
|
230
|
+
children: [/* @__PURE__ */ d("span", {
|
|
222
231
|
className: "font-medium text-text-primary",
|
|
223
|
-
children:
|
|
224
|
-
}), /* @__PURE__ */
|
|
225
|
-
value:
|
|
226
|
-
onChange: (e) =>
|
|
227
|
-
placeholder:
|
|
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__ */
|
|
239
|
+
/* @__PURE__ */ d("div", {
|
|
231
240
|
className: "flex justify-end",
|
|
232
|
-
children: /* @__PURE__ */
|
|
241
|
+
children: /* @__PURE__ */ f(g, {
|
|
233
242
|
type: "submit",
|
|
234
|
-
disabled:
|
|
235
|
-
children: [/* @__PURE__ */
|
|
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 {
|
|
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,I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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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,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 +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,
|
|
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,
|
|
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"}
|
package/dist/node_modules/@apollo/client/react/hooks/internal/useIsomorphicLayoutEffect.js.map
CHANGED
|
@@ -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,
|
|
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,
|
|
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,
|
|
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,
|
|
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,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