@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,8 +1,11 @@
|
|
|
1
1
|
import { gql as e } from "../../node_modules/graphql-tag/lib/index.js";
|
|
2
2
|
import { useMutation as t } from "../../node_modules/@apollo/client/react/hooks/useMutation.js";
|
|
3
3
|
import { useQuery as n } from "../../node_modules/@apollo/client/react/hooks/useQuery.js";
|
|
4
|
+
import { notify as r } from "../lib/toast.js";
|
|
4
5
|
//#region src/eventfullymanaged/api/eventApi.ts
|
|
5
|
-
var
|
|
6
|
+
var i = (e) => {
|
|
7
|
+
r.error("Something went wrong", e.message || "Please try again.");
|
|
8
|
+
}, a = e`
|
|
6
9
|
query EventfullymanagedDashboardSummary {
|
|
7
10
|
dashboardSummary: eventfullyManagedDashboardSummary {
|
|
8
11
|
totalEvents
|
|
@@ -14,7 +17,7 @@ var r = e`
|
|
|
14
17
|
upcomingSessions
|
|
15
18
|
}
|
|
16
19
|
}
|
|
17
|
-
`,
|
|
20
|
+
`, o = e`
|
|
18
21
|
query EventfullymanagedEvents($search: String, $limit: Int, $offset: Int) {
|
|
19
22
|
events: eventfullyManagedEvents(search: $search, limit: $limit, offset: $offset) {
|
|
20
23
|
total
|
|
@@ -34,7 +37,7 @@ var r = e`
|
|
|
34
37
|
}
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
|
-
`,
|
|
40
|
+
`, s = e`
|
|
38
41
|
query EventfullymanagedVenues($search: String, $limit: Int, $offset: Int) {
|
|
39
42
|
venues: eventfullyManagedVenues(search: $search, limit: $limit, offset: $offset) {
|
|
40
43
|
total
|
|
@@ -57,7 +60,7 @@ var r = e`
|
|
|
57
60
|
}
|
|
58
61
|
}
|
|
59
62
|
}
|
|
60
|
-
`,
|
|
63
|
+
`, c = e`
|
|
61
64
|
query EventfullymanagedVenue($id: ID!) {
|
|
62
65
|
venue: eventfullyManagedVenue(id: $id) {
|
|
63
66
|
id
|
|
@@ -90,7 +93,7 @@ var r = e`
|
|
|
90
93
|
}
|
|
91
94
|
}
|
|
92
95
|
}
|
|
93
|
-
`,
|
|
96
|
+
`, l = e`
|
|
94
97
|
query EventfullymanagedSponsors($search: String, $limit: Int, $offset: Int) {
|
|
95
98
|
sponsors: eventfullyManagedSponsors(search: $search, limit: $limit, offset: $offset) {
|
|
96
99
|
total
|
|
@@ -110,7 +113,7 @@ var r = e`
|
|
|
110
113
|
}
|
|
111
114
|
}
|
|
112
115
|
}
|
|
113
|
-
`,
|
|
116
|
+
`, u = e`
|
|
114
117
|
query EventfullymanagedRegistrations($eventId: ID, $limit: Int, $offset: Int) {
|
|
115
118
|
registrations: eventfullyManagedRegistrations(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
116
119
|
total
|
|
@@ -128,7 +131,7 @@ var r = e`
|
|
|
128
131
|
}
|
|
129
132
|
}
|
|
130
133
|
}
|
|
131
|
-
`,
|
|
134
|
+
`, d = e`
|
|
132
135
|
query EventfullymanagedAttendees($eventId: ID, $limit: Int, $offset: Int) {
|
|
133
136
|
attendees: eventfullyManagedAttendees(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
134
137
|
total
|
|
@@ -145,7 +148,7 @@ var r = e`
|
|
|
145
148
|
}
|
|
146
149
|
}
|
|
147
150
|
}
|
|
148
|
-
`,
|
|
151
|
+
`, ee = e`
|
|
149
152
|
query EventfullymanagedEventSessions($eventId: ID, $limit: Int, $offset: Int) {
|
|
150
153
|
eventSessions: eventfullyManagedEventSessions(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
151
154
|
total
|
|
@@ -177,7 +180,7 @@ e`
|
|
|
177
180
|
}
|
|
178
181
|
}
|
|
179
182
|
`;
|
|
180
|
-
var
|
|
183
|
+
var f = e`
|
|
181
184
|
query EventfullymanagedTicketTypes($eventId: ID, $search: String, $limit: Int, $offset: Int) {
|
|
182
185
|
ticketTypes: eventfullyManagedTicketTypes(eventId: $eventId, search: $search, limit: $limit, offset: $offset) {
|
|
183
186
|
total
|
|
@@ -197,7 +200,7 @@ var ee = e`
|
|
|
197
200
|
}
|
|
198
201
|
}
|
|
199
202
|
}
|
|
200
|
-
`,
|
|
203
|
+
`, p = e`
|
|
201
204
|
query EventfullymanagedPromoCodes($eventId: ID, $search: String, $limit: Int, $offset: Int) {
|
|
202
205
|
promoCodes: eventfullyManagedPromoCodes(eventId: $eventId, search: $search, limit: $limit, offset: $offset) {
|
|
203
206
|
total
|
|
@@ -217,7 +220,7 @@ var ee = e`
|
|
|
217
220
|
}
|
|
218
221
|
}
|
|
219
222
|
}
|
|
220
|
-
`,
|
|
223
|
+
`, m = e`
|
|
221
224
|
query EventfullymanagedExhibitors($eventId: ID, $search: String, $limit: Int, $offset: Int) {
|
|
222
225
|
exhibitors: eventfullyManagedExhibitors(eventId: $eventId, search: $search, limit: $limit, offset: $offset) {
|
|
223
226
|
total
|
|
@@ -234,7 +237,7 @@ var ee = e`
|
|
|
234
237
|
}
|
|
235
238
|
}
|
|
236
239
|
}
|
|
237
|
-
`,
|
|
240
|
+
`, h = e`
|
|
238
241
|
query EventfullymanagedLeads($eventId: ID, $search: String, $limit: Int, $offset: Int) {
|
|
239
242
|
leads: eventfullyManagedLeads(eventId: $eventId, search: $search, limit: $limit, offset: $offset) {
|
|
240
243
|
total
|
|
@@ -253,7 +256,7 @@ var ee = e`
|
|
|
253
256
|
}
|
|
254
257
|
}
|
|
255
258
|
}
|
|
256
|
-
`,
|
|
259
|
+
`, g = e`
|
|
257
260
|
query EventfullymanagedCheckInRecords($eventId: ID, $limit: Int, $offset: Int) {
|
|
258
261
|
checkInRecords: eventfullyManagedCheckInRecords(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
259
262
|
total
|
|
@@ -271,7 +274,7 @@ var ee = e`
|
|
|
271
274
|
}
|
|
272
275
|
}
|
|
273
276
|
}
|
|
274
|
-
`,
|
|
277
|
+
`, _ = e`
|
|
275
278
|
query EventfullymanagedNetworkingProfiles($eventId: ID, $limit: Int, $offset: Int) {
|
|
276
279
|
networkingProfiles: eventfullyManagedNetworkingProfiles(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
277
280
|
total
|
|
@@ -288,7 +291,7 @@ var ee = e`
|
|
|
288
291
|
}
|
|
289
292
|
}
|
|
290
293
|
}
|
|
291
|
-
`,
|
|
294
|
+
`, v = e`
|
|
292
295
|
query EventfullymanagedCheckInStations($eventId: ID, $limit: Int, $offset: Int) {
|
|
293
296
|
checkInStations: eventfullyManagedCheckInStations(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
294
297
|
total
|
|
@@ -305,7 +308,7 @@ var ee = e`
|
|
|
305
308
|
}
|
|
306
309
|
}
|
|
307
310
|
}
|
|
308
|
-
`,
|
|
311
|
+
`, y = e`
|
|
309
312
|
query EventfullymanagedNetworkingMatches($eventId: ID, $limit: Int, $offset: Int) {
|
|
310
313
|
networkingMatches: eventfullyManagedNetworkingMatches(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
311
314
|
total
|
|
@@ -322,7 +325,7 @@ var ee = e`
|
|
|
322
325
|
}
|
|
323
326
|
}
|
|
324
327
|
}
|
|
325
|
-
`,
|
|
328
|
+
`, b = e`
|
|
326
329
|
query EventfullymanagedMeetings($eventId: ID, $limit: Int, $offset: Int) {
|
|
327
330
|
meetings: eventfullyManagedMeetings(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
328
331
|
total
|
|
@@ -339,7 +342,7 @@ var ee = e`
|
|
|
339
342
|
}
|
|
340
343
|
}
|
|
341
344
|
}
|
|
342
|
-
`,
|
|
345
|
+
`, x = e`
|
|
343
346
|
query EventfullymanagedAnnouncements($eventId: ID, $limit: Int, $offset: Int) {
|
|
344
347
|
announcements: eventfullyManagedAnnouncements(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
345
348
|
total
|
|
@@ -356,7 +359,7 @@ var ee = e`
|
|
|
356
359
|
}
|
|
357
360
|
}
|
|
358
361
|
}
|
|
359
|
-
`,
|
|
362
|
+
`, S = e`
|
|
360
363
|
query EventfullymanagedWorkflowTemplates($eventId: ID, $limit: Int, $offset: Int) {
|
|
361
364
|
workflowTemplates: eventfullyManagedWorkflowTemplates(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
362
365
|
total
|
|
@@ -373,7 +376,7 @@ var ee = e`
|
|
|
373
376
|
}
|
|
374
377
|
}
|
|
375
378
|
}
|
|
376
|
-
`,
|
|
379
|
+
`, C = e`
|
|
377
380
|
query EventfullymanagedAutomationRules($eventId: ID, $limit: Int, $offset: Int) {
|
|
378
381
|
automationRules: eventfullyManagedAutomationRules(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
379
382
|
total
|
|
@@ -390,7 +393,7 @@ var ee = e`
|
|
|
390
393
|
}
|
|
391
394
|
}
|
|
392
395
|
}
|
|
393
|
-
`,
|
|
396
|
+
`, w = e`
|
|
394
397
|
query EventfullymanagedCommunicationCampaigns($eventId: ID, $limit: Int, $offset: Int) {
|
|
395
398
|
communicationCampaigns: eventfullyManagedCommunicationCampaigns(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
396
399
|
total
|
|
@@ -407,7 +410,7 @@ var ee = e`
|
|
|
407
410
|
}
|
|
408
411
|
}
|
|
409
412
|
}
|
|
410
|
-
`,
|
|
413
|
+
`, T = e`
|
|
411
414
|
query EventfullymanagedAnalyticsSnapshots($eventId: ID, $limit: Int, $offset: Int) {
|
|
412
415
|
analyticsSnapshots: eventfullyManagedAnalyticsSnapshots(eventId: $eventId, limit: $limit, offset: $offset) {
|
|
413
416
|
total
|
|
@@ -424,7 +427,7 @@ var ee = e`
|
|
|
424
427
|
}
|
|
425
428
|
}
|
|
426
429
|
}
|
|
427
|
-
`,
|
|
430
|
+
`, E = e`
|
|
428
431
|
mutation EventfullymanagedCreateVenue($input: EventfullyManagedVenueInput!) {
|
|
429
432
|
createVenue: eventfullyManagedCreateVenue(input: $input) {
|
|
430
433
|
id
|
|
@@ -441,7 +444,7 @@ var ee = e`
|
|
|
441
444
|
metadata
|
|
442
445
|
}
|
|
443
446
|
}
|
|
444
|
-
`,
|
|
447
|
+
`, D = e`
|
|
445
448
|
mutation EventfullymanagedUpdateVenue($id: ID!, $input: EventfullyManagedVenueInput!) {
|
|
446
449
|
updateVenue: eventfullyManagedUpdateVenue(id: $id, input: $input) {
|
|
447
450
|
id
|
|
@@ -458,13 +461,14 @@ var ee = e`
|
|
|
458
461
|
metadata
|
|
459
462
|
}
|
|
460
463
|
}
|
|
461
|
-
`,
|
|
464
|
+
`, O = e`
|
|
462
465
|
mutation EventfullymanagedCreateSponsor($input: EventfullyManagedSponsorInput!) {
|
|
463
466
|
createSponsor: eventfullyManagedCreateSponsor(input: $input) {
|
|
464
467
|
id
|
|
465
468
|
eventId
|
|
466
469
|
name
|
|
467
470
|
level
|
|
471
|
+
logoUrl
|
|
468
472
|
website
|
|
469
473
|
contactName
|
|
470
474
|
contactEmail
|
|
@@ -473,13 +477,14 @@ var ee = e`
|
|
|
473
477
|
metadata
|
|
474
478
|
}
|
|
475
479
|
}
|
|
476
|
-
`,
|
|
480
|
+
`, k = e`
|
|
477
481
|
mutation EventfullymanagedUpdateSponsor($id: ID!, $input: EventfullyManagedSponsorInput!) {
|
|
478
482
|
updateSponsor: eventfullyManagedUpdateSponsor(id: $id, input: $input) {
|
|
479
483
|
id
|
|
480
484
|
eventId
|
|
481
485
|
name
|
|
482
486
|
level
|
|
487
|
+
logoUrl
|
|
483
488
|
website
|
|
484
489
|
contactName
|
|
485
490
|
contactEmail
|
|
@@ -488,7 +493,7 @@ var ee = e`
|
|
|
488
493
|
metadata
|
|
489
494
|
}
|
|
490
495
|
}
|
|
491
|
-
`,
|
|
496
|
+
`, A = e`
|
|
492
497
|
mutation EventfullymanagedCreateFloorPlan($input: EventfullyManagedFloorPlanInput!) {
|
|
493
498
|
createFloorPlan: eventfullyManagedCreateFloorPlan(input: $input) {
|
|
494
499
|
id
|
|
@@ -501,8 +506,7 @@ var ee = e`
|
|
|
501
506
|
updatedAt
|
|
502
507
|
}
|
|
503
508
|
}
|
|
504
|
-
|
|
505
|
-
e`
|
|
509
|
+
`, j = e`
|
|
506
510
|
mutation EventfullymanagedUpdateFloorPlan($id: ID!, $input: EventfullyManagedFloorPlanInput!) {
|
|
507
511
|
updateFloorPlan: eventfullyManagedUpdateFloorPlan(id: $id, input: $input) {
|
|
508
512
|
id
|
|
@@ -515,8 +519,7 @@ e`
|
|
|
515
519
|
updatedAt
|
|
516
520
|
}
|
|
517
521
|
}
|
|
518
|
-
|
|
519
|
-
var k = e`
|
|
522
|
+
`, M = e`
|
|
520
523
|
mutation EventfullymanagedCreateEvent($input: EventfullyManagedEventInput!) {
|
|
521
524
|
createEvent: eventfullyManagedCreateEvent(input: $input) {
|
|
522
525
|
id
|
|
@@ -548,7 +551,7 @@ e`
|
|
|
548
551
|
}
|
|
549
552
|
}
|
|
550
553
|
`;
|
|
551
|
-
var
|
|
554
|
+
var N = e`
|
|
552
555
|
mutation EventfullymanagedUpsertAnnouncement($id: ID, $input: EventfullyManagedSimpleEntityInput!) {
|
|
553
556
|
upsertAnnouncement: eventfullyManagedUpsertAnnouncement(id: $id, input: $input) {
|
|
554
557
|
id
|
|
@@ -562,7 +565,7 @@ var A = e`
|
|
|
562
565
|
updatedAt
|
|
563
566
|
}
|
|
564
567
|
}
|
|
565
|
-
`,
|
|
568
|
+
`, P = e`
|
|
566
569
|
mutation EventfullymanagedUpsertWorkflowTemplate($id: ID, $input: EventfullyManagedSimpleEntityInput!) {
|
|
567
570
|
upsertWorkflowTemplate: eventfullyManagedUpsertWorkflowTemplate(id: $id, input: $input) {
|
|
568
571
|
id
|
|
@@ -576,7 +579,7 @@ var A = e`
|
|
|
576
579
|
updatedAt
|
|
577
580
|
}
|
|
578
581
|
}
|
|
579
|
-
`,
|
|
582
|
+
`, F = e`
|
|
580
583
|
mutation EventfullymanagedUpsertAutomationRule($id: ID, $input: EventfullyManagedSimpleEntityInput!) {
|
|
581
584
|
upsertAutomationRule: eventfullyManagedUpsertAutomationRule(id: $id, input: $input) {
|
|
582
585
|
id
|
|
@@ -606,7 +609,7 @@ e`
|
|
|
606
609
|
}
|
|
607
610
|
}
|
|
608
611
|
`;
|
|
609
|
-
var
|
|
612
|
+
var I = e`
|
|
610
613
|
mutation EventfullymanagedUpsertAnalyticsSnapshot($id: ID, $input: EventfullyManagedSimpleEntityInput!) {
|
|
611
614
|
upsertAnalyticsSnapshot: eventfullyManagedUpsertAnalyticsSnapshot(id: $id, input: $input) {
|
|
612
615
|
id
|
|
@@ -620,11 +623,53 @@ var N = e`
|
|
|
620
623
|
updatedAt
|
|
621
624
|
}
|
|
622
625
|
}
|
|
623
|
-
`,
|
|
626
|
+
`, L = () => n(a), R = (e) => n(o, { variables: e }), z = (e) => n(s, { variables: e }), te = (e) => n(c, {
|
|
624
627
|
variables: { id: e },
|
|
625
628
|
skip: !e
|
|
626
|
-
}),
|
|
629
|
+
}), B = (e) => n(l, { variables: e }), V = (e) => n(u, { variables: e }), H = (e) => n(d, { variables: e }), U = (e) => n(ee, { variables: e }), W = (e) => n(f, { variables: e }), G = (e) => n(p, { variables: e }), K = (e) => n(m, { variables: e }), q = (e) => n(h, { variables: e }), J = (e) => n(v, { variables: e }), Y = (e) => n(g, { variables: e }), X = (e) => n(_, { variables: e }), Z = (e) => n(y, { variables: e }), Q = (e) => n(b, { variables: e }), ne = (e) => n(x, { variables: e }), re = (e) => n(S, { variables: e }), ie = (e) => n(C, { variables: e }), ae = (e) => n(w, { variables: e }), oe = (e) => n(T, { variables: e }), $ = () => t(E, {
|
|
630
|
+
errorPolicy: "all",
|
|
631
|
+
onError: i,
|
|
632
|
+
refetchQueries: [{ query: s }]
|
|
633
|
+
}), se = () => t(D, {
|
|
634
|
+
errorPolicy: "all",
|
|
635
|
+
onError: i,
|
|
636
|
+
refetchQueries: [{ query: s }]
|
|
637
|
+
}), ce = () => t(O, {
|
|
638
|
+
errorPolicy: "all",
|
|
639
|
+
onError: i,
|
|
640
|
+
refetchQueries: [{ query: l }]
|
|
641
|
+
}), le = () => t(k, {
|
|
642
|
+
errorPolicy: "all",
|
|
643
|
+
onError: i,
|
|
644
|
+
refetchQueries: [{ query: l }]
|
|
645
|
+
}), ue = () => t(A, {
|
|
646
|
+
errorPolicy: "all",
|
|
647
|
+
onError: i
|
|
648
|
+
}), de = () => t(j, {
|
|
649
|
+
errorPolicy: "all",
|
|
650
|
+
onError: i
|
|
651
|
+
}), fe = () => t(M, {
|
|
652
|
+
errorPolicy: "all",
|
|
653
|
+
onError: i,
|
|
654
|
+
refetchQueries: [{ query: o }, { query: a }]
|
|
655
|
+
}), pe = () => t(N, {
|
|
656
|
+
errorPolicy: "all",
|
|
657
|
+
onError: i,
|
|
658
|
+
refetchQueries: [{ query: x }]
|
|
659
|
+
}), me = () => t(P, {
|
|
660
|
+
errorPolicy: "all",
|
|
661
|
+
onError: i,
|
|
662
|
+
refetchQueries: [{ query: S }]
|
|
663
|
+
}), he = () => t(F, {
|
|
664
|
+
errorPolicy: "all",
|
|
665
|
+
onError: i,
|
|
666
|
+
refetchQueries: [{ query: C }]
|
|
667
|
+
}), ge = () => t(I, {
|
|
668
|
+
errorPolicy: "all",
|
|
669
|
+
onError: i,
|
|
670
|
+
refetchQueries: [{ query: T }]
|
|
671
|
+
});
|
|
627
672
|
//#endregion
|
|
628
|
-
export {
|
|
673
|
+
export { oe as useAnalyticsSnapshotsQuery, ne as useAnnouncementsQuery, H as useAttendeesQuery, ie as useAutomationRulesQuery, Y as useCheckInRecordsQuery, J as useCheckInStationsQuery, ae as useCommunicationCampaignsQuery, fe as useCreateEventMutation, ue as useCreateFloorPlanMutation, ce as useCreateSponsorMutation, $ as useCreateVenueMutation, L as useDashboardSummaryQuery, U as useEventSessionsQuery, R as useEventsQuery, K as useExhibitorsQuery, q as useLeadsQuery, Q as useMeetingsQuery, Z as useNetworkingMatchesQuery, X as useNetworkingProfilesQuery, G as usePromoCodesQuery, V as useRegistrationsQuery, B as useSponsorsQuery, W as useTicketTypesQuery, de as useUpdateFloorPlanMutation, le as useUpdateSponsorMutation, se as useUpdateVenueMutation, ge as useUpsertAnalyticsSnapshotMutation, pe as useUpsertAnnouncementMutation, he as useUpsertAutomationRuleMutation, me as useUpsertWorkflowTemplateMutation, te as useVenueQuery, z as useVenuesQuery, re as useWorkflowTemplatesQuery };
|
|
629
674
|
|
|
630
675
|
//# sourceMappingURL=eventApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventApi.js","names":[],"sources":["../../../src/eventfullymanaged/api/eventApi.ts"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { useMutation, useQuery } from '@apollo/client/react';\n\ntype DashboardSummaryResponse = {\n dashboardSummary: {\n totalEvents: number;\n activeEvents: number;\n totalRegistrations: number;\n totalAttendees: number;\n totalVenues: number;\n totalSponsors: number;\n upcomingSessions: number;\n };\n};\n\nexport type EventGql = {\n id: string;\n name: string;\n};\n\nexport type VenueGql = {\n id: string;\n workspaceId: string;\n name: string;\n description?: string | null;\n addressLine1?: string | null;\n city?: string | null;\n state?: string | null;\n country?: string | null;\n postalCode?: string | null;\n capacity?: number | null;\n amenities: string[];\n pricing?: Record<string, unknown> | null;\n openingHours?: Record<string, unknown> | null;\n status: string;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type FloorPlanGql = {\n id: string;\n venueId: string;\n name: string;\n imageUrl?: string | null;\n dimensions?: Record<string, unknown> | null;\n interactiveAreas?: Record<string, unknown> | null;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type TicketTypeGql = {\n id: string;\n eventId: string;\n name: string;\n description?: string | null;\n price: string;\n currency: string;\n capacity?: number | null;\n soldCount: number;\n salesStartAt?: string | null;\n salesEndAt?: string | null;\n isActive: boolean;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type PromoCodeGql = {\n id: string;\n eventId: string;\n code: string;\n description?: string | null;\n discountType: string;\n discountValue: string;\n maxUses?: number | null;\n usedCount: number;\n startsAt?: string | null;\n endsAt?: string | null;\n isActive: boolean;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type ExhibitorGql = {\n id: string;\n eventId: string;\n name: string;\n boothCode?: string | null;\n category?: string | null;\n contactName?: string | null;\n contactEmail?: string | null;\n status: string;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type LeadGql = {\n id: string;\n eventId: string;\n sponsorId?: string | null;\n exhibitorId?: string | null;\n attendeeName: string;\n attendeeEmail: string;\n score?: number | null;\n status: string;\n notes?: string | null;\n capturedAt: string;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type CheckInRecordGql = {\n id: string;\n eventId: string;\n stationId?: string | null;\n attendeeId?: string | null;\n registrationId?: string | null;\n method: string;\n status: string;\n direction: string;\n recordedAt: string;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type NetworkingProfileGql = {\n id: string;\n eventId: string;\n attendeeId: string;\n interests: string[];\n lookingFor: string[];\n industry?: string | null;\n role?: string | null;\n visibility: string;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type SponsorGql = {\n id: string;\n eventId: string;\n name: string;\n level: string;\n website?: string | null;\n contactName?: string | null;\n contactEmail?: string | null;\n contactPhone?: string | null;\n metrics?: { value?: number; leads?: number } | null;\n metadata?: Record<string, unknown> | null;\n};\n\ntype EventsResponse = { events: { total: number; items: EventGql[] } };\ntype VenuesResponse = { venues: { total: number; items: VenueGql[] } };\ntype VenueResponse = { venue: VenueGql | null; floorPlans: { total: number; items: FloorPlanGql[] } };\ntype SponsorsResponse = { sponsors: { total: number; items: SponsorGql[] } };\ntype CreateVenueResponse = { createVenue: VenueGql };\ntype UpdateVenueResponse = { updateVenue: VenueGql };\ntype CreateSponsorResponse = { createSponsor: SponsorGql };\ntype UpdateSponsorResponse = { updateSponsor: SponsorGql };\ntype CreateFloorPlanResponse = { createFloorPlan: FloorPlanGql };\ntype UpdateFloorPlanResponse = { updateFloorPlan: FloorPlanGql };\ntype TicketTypesResponse = { ticketTypes: { total: number; items: TicketTypeGql[] } };\ntype PromoCodesResponse = { promoCodes: { total: number; items: PromoCodeGql[] } };\ntype ExhibitorsResponse = { exhibitors: { total: number; items: ExhibitorGql[] } };\ntype LeadsResponse = { leads: { total: number; items: LeadGql[] } };\ntype CheckInRecordsResponse = { checkInRecords: { total: number; items: CheckInRecordGql[] } };\ntype NetworkingProfilesResponse = { networkingProfiles: { total: number; items: NetworkingProfileGql[] } };\ntype RegistrationsResponse = { registrations: { total: number; items: Array<Record<string, unknown>> } };\ntype AttendeesResponse = { attendees: { total: number; items: Array<Record<string, unknown>> } };\ntype EventSessionsResponse = { eventSessions: { total: number; items: Array<Record<string, unknown>> } };\ntype SpeakersResponse = { speakers: { total: number; items: Array<Record<string, unknown>> } };\ntype SimpleEntity = {\n id: string;\n workspaceId: string;\n eventId?: string | null;\n name?: string | null;\n title?: string | null;\n status?: string | null;\n metadata?: Record<string, unknown> | null;\n createdAt: string;\n updatedAt: string;\n};\ntype SimpleEntityResponse = { total: number; items: SimpleEntity[] };\ntype CheckInStationsResponse = { checkInStations: SimpleEntityResponse };\ntype NetworkingMatchesResponse = { networkingMatches: SimpleEntityResponse };\ntype MeetingsResponse = { meetings: SimpleEntityResponse };\ntype AnnouncementsResponse = { announcements: SimpleEntityResponse };\ntype WorkflowTemplatesResponse = { workflowTemplates: SimpleEntityResponse };\ntype AutomationRulesResponse = { automationRules: SimpleEntityResponse };\ntype CommunicationCampaignsResponse = { communicationCampaigns: SimpleEntityResponse };\ntype AnalyticsSnapshotsResponse = { analyticsSnapshots: SimpleEntityResponse };\ntype UpsertSimpleEntityResponse = { [key: string]: SimpleEntity };\n\nexport const DASHBOARD_SUMMARY_QUERY = gql`\n query EventfullymanagedDashboardSummary {\n dashboardSummary: eventfullyManagedDashboardSummary {\n totalEvents\n activeEvents\n totalRegistrations\n totalAttendees\n totalVenues\n totalSponsors\n upcomingSessions\n }\n }\n`;\n\nexport const EVENTS_QUERY = gql`\n query EventfullymanagedEvents($search: String, $limit: Int, $offset: Int) {\n events: eventfullyManagedEvents(search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n name\n description\n type\n status\n timezone\n startAt\n endAt\n visibility\n capacity\n metadata\n }\n }\n }\n`;\n\nexport const VENUES_QUERY = gql`\n query EventfullymanagedVenues($search: String, $limit: Int, $offset: Int) {\n venues: eventfullyManagedVenues(search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n name\n description\n addressLine1\n city\n state\n country\n postalCode\n capacity\n amenities\n pricing\n openingHours\n status\n metadata\n }\n }\n }\n`;\n\nexport const VENUE_QUERY = gql`\n query EventfullymanagedVenue($id: ID!) {\n venue: eventfullyManagedVenue(id: $id) {\n id\n workspaceId\n name\n description\n addressLine1\n city\n state\n country\n postalCode\n capacity\n amenities\n pricing\n openingHours\n status\n metadata\n createdAt\n updatedAt\n }\n floorPlans: eventfullyManagedFloorPlans(venueId: $id, limit: 100, offset: 0) {\n total\n items {\n id\n name\n imageUrl\n dimensions\n interactiveAreas\n createdAt\n }\n }\n }\n`;\n\nexport const SPONSORS_QUERY = gql`\n query EventfullymanagedSponsors($search: String, $limit: Int, $offset: Int) {\n sponsors: eventfullyManagedSponsors(search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n name\n level\n logoUrl\n website\n contactName\n contactEmail\n contactPhone\n metrics\n metadata\n createdAt\n }\n }\n }\n`;\n\nexport const REGISTRATIONS_QUERY = gql`\n query EventfullymanagedRegistrations($eventId: ID, $limit: Int, $offset: Int) {\n registrations: eventfullyManagedRegistrations(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n attendeeId\n ticketTypeId\n status\n quantity\n totalAmount\n currency\n registeredAt\n checkedInAt\n }\n }\n }\n`;\n\nexport const ATTENDEES_QUERY = gql`\n query EventfullymanagedAttendees($eventId: ID, $limit: Int, $offset: Int) {\n attendees: eventfullyManagedAttendees(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n fullName\n email\n phone\n company\n role\n tags\n metadata\n }\n }\n }\n`;\n\nexport const EVENT_SESSIONS_QUERY = gql`\n query EventfullymanagedEventSessions($eventId: ID, $limit: Int, $offset: Int) {\n eventSessions: eventfullyManagedEventSessions(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n venueId\n title\n sessionType\n track\n startsAt\n endsAt\n status\n }\n }\n }\n`;\n\nexport const SPEAKERS_QUERY = gql`\n query EventfullymanagedSpeakers($limit: Int, $offset: Int) {\n speakers: eventfullyManagedSpeakers(limit: $limit, offset: $offset) {\n total\n items {\n id\n fullName\n title\n organization\n email\n }\n }\n }\n`;\n\nexport const TICKET_TYPES_QUERY = gql`\n query EventfullymanagedTicketTypes($eventId: ID, $search: String, $limit: Int, $offset: Int) {\n ticketTypes: eventfullyManagedTicketTypes(eventId: $eventId, search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n name\n description\n price\n currency\n capacity\n soldCount\n salesStartAt\n salesEndAt\n isActive\n metadata\n }\n }\n }\n`;\n\nexport const PROMO_CODES_QUERY = gql`\n query EventfullymanagedPromoCodes($eventId: ID, $search: String, $limit: Int, $offset: Int) {\n promoCodes: eventfullyManagedPromoCodes(eventId: $eventId, search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n code\n description\n discountType\n discountValue\n maxUses\n usedCount\n startsAt\n endsAt\n isActive\n metadata\n }\n }\n }\n`;\n\nexport const EXHIBITORS_QUERY = gql`\n query EventfullymanagedExhibitors($eventId: ID, $search: String, $limit: Int, $offset: Int) {\n exhibitors: eventfullyManagedExhibitors(eventId: $eventId, search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n name\n boothCode\n category\n contactName\n contactEmail\n status\n metadata\n }\n }\n }\n`;\n\nexport const LEADS_QUERY = gql`\n query EventfullymanagedLeads($eventId: ID, $search: String, $limit: Int, $offset: Int) {\n leads: eventfullyManagedLeads(eventId: $eventId, search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n sponsorId\n exhibitorId\n attendeeName\n attendeeEmail\n score\n status\n notes\n capturedAt\n metadata\n }\n }\n }\n`;\n\nexport const CHECKIN_RECORDS_QUERY = gql`\n query EventfullymanagedCheckInRecords($eventId: ID, $limit: Int, $offset: Int) {\n checkInRecords: eventfullyManagedCheckInRecords(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n stationId\n attendeeId\n registrationId\n method\n status\n direction\n recordedAt\n metadata\n }\n }\n }\n`;\n\nexport const NETWORKING_PROFILES_QUERY = gql`\n query EventfullymanagedNetworkingProfiles($eventId: ID, $limit: Int, $offset: Int) {\n networkingProfiles: eventfullyManagedNetworkingProfiles(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n attendeeId\n interests\n lookingFor\n industry\n role\n visibility\n metadata\n }\n }\n }\n`;\n\nexport const CHECKIN_STATIONS_QUERY = gql`\n query EventfullymanagedCheckInStations($eventId: ID, $limit: Int, $offset: Int) {\n checkInStations: eventfullyManagedCheckInStations(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const NETWORKING_MATCHES_QUERY = gql`\n query EventfullymanagedNetworkingMatches($eventId: ID, $limit: Int, $offset: Int) {\n networkingMatches: eventfullyManagedNetworkingMatches(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const MEETINGS_QUERY = gql`\n query EventfullymanagedMeetings($eventId: ID, $limit: Int, $offset: Int) {\n meetings: eventfullyManagedMeetings(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const ANNOUNCEMENTS_QUERY = gql`\n query EventfullymanagedAnnouncements($eventId: ID, $limit: Int, $offset: Int) {\n announcements: eventfullyManagedAnnouncements(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const WORKFLOW_TEMPLATES_QUERY = gql`\n query EventfullymanagedWorkflowTemplates($eventId: ID, $limit: Int, $offset: Int) {\n workflowTemplates: eventfullyManagedWorkflowTemplates(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const AUTOMATION_RULES_QUERY = gql`\n query EventfullymanagedAutomationRules($eventId: ID, $limit: Int, $offset: Int) {\n automationRules: eventfullyManagedAutomationRules(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const COMMUNICATION_CAMPAIGNS_QUERY = gql`\n query EventfullymanagedCommunicationCampaigns($eventId: ID, $limit: Int, $offset: Int) {\n communicationCampaigns: eventfullyManagedCommunicationCampaigns(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const ANALYTICS_SNAPSHOTS_QUERY = gql`\n query EventfullymanagedAnalyticsSnapshots($eventId: ID, $limit: Int, $offset: Int) {\n analyticsSnapshots: eventfullyManagedAnalyticsSnapshots(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const CREATE_VENUE_MUTATION = gql`\n mutation EventfullymanagedCreateVenue($input: EventfullyManagedVenueInput!) {\n createVenue: eventfullyManagedCreateVenue(input: $input) {\n id\n name\n description\n city\n state\n country\n capacity\n amenities\n status\n pricing\n openingHours\n metadata\n }\n }\n`;\n\nexport const UPDATE_VENUE_MUTATION = gql`\n mutation EventfullymanagedUpdateVenue($id: ID!, $input: EventfullyManagedVenueInput!) {\n updateVenue: eventfullyManagedUpdateVenue(id: $id, input: $input) {\n id\n name\n description\n city\n state\n country\n capacity\n amenities\n status\n pricing\n openingHours\n metadata\n }\n }\n`;\n\nexport const CREATE_SPONSOR_MUTATION = gql`\n mutation EventfullymanagedCreateSponsor($input: EventfullyManagedSponsorInput!) {\n createSponsor: eventfullyManagedCreateSponsor(input: $input) {\n id\n eventId\n name\n level\n website\n contactName\n contactEmail\n contactPhone\n metrics\n metadata\n }\n }\n`;\n\nexport const UPDATE_SPONSOR_MUTATION = gql`\n mutation EventfullymanagedUpdateSponsor($id: ID!, $input: EventfullyManagedSponsorInput!) {\n updateSponsor: eventfullyManagedUpdateSponsor(id: $id, input: $input) {\n id\n eventId\n name\n level\n website\n contactName\n contactEmail\n contactPhone\n metrics\n metadata\n }\n }\n`;\n\nexport const CREATE_FLOOR_PLAN_MUTATION = gql`\n mutation EventfullymanagedCreateFloorPlan($input: EventfullyManagedFloorPlanInput!) {\n createFloorPlan: eventfullyManagedCreateFloorPlan(input: $input) {\n id\n venueId\n name\n imageUrl\n dimensions\n interactiveAreas\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const UPDATE_FLOOR_PLAN_MUTATION = gql`\n mutation EventfullymanagedUpdateFloorPlan($id: ID!, $input: EventfullyManagedFloorPlanInput!) {\n updateFloorPlan: eventfullyManagedUpdateFloorPlan(id: $id, input: $input) {\n id\n venueId\n name\n imageUrl\n dimensions\n interactiveAreas\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const CREATE_EVENT_MUTATION = gql`\n mutation EventfullymanagedCreateEvent($input: EventfullyManagedEventInput!) {\n createEvent: eventfullyManagedCreateEvent(input: $input) {\n id\n name\n type\n status\n startAt\n endAt\n timezone\n visibility\n capacity\n metadata\n }\n }\n`;\n\nexport const UPDATE_EVENT_MUTATION = gql`\n mutation EventfullymanagedUpdateEvent($id: ID!, $input: EventfullyManagedEventInput!) {\n updateEvent: eventfullyManagedUpdateEvent(id: $id, input: $input) {\n id\n name\n type\n status\n startAt\n endAt\n timezone\n visibility\n capacity\n metadata\n }\n }\n`;\n\nexport const UPSERT_ANNOUNCEMENT_MUTATION = gql`\n mutation EventfullymanagedUpsertAnnouncement($id: ID, $input: EventfullyManagedSimpleEntityInput!) {\n upsertAnnouncement: eventfullyManagedUpsertAnnouncement(id: $id, input: $input) {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const UPSERT_WORKFLOW_TEMPLATE_MUTATION = gql`\n mutation EventfullymanagedUpsertWorkflowTemplate($id: ID, $input: EventfullyManagedSimpleEntityInput!) {\n upsertWorkflowTemplate: eventfullyManagedUpsertWorkflowTemplate(id: $id, input: $input) {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const UPSERT_AUTOMATION_RULE_MUTATION = gql`\n mutation EventfullymanagedUpsertAutomationRule($id: ID, $input: EventfullyManagedSimpleEntityInput!) {\n upsertAutomationRule: eventfullyManagedUpsertAutomationRule(id: $id, input: $input) {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const UPSERT_COMMUNICATION_CAMPAIGN_MUTATION = gql`\n mutation EventfullymanagedUpsertCommunicationCampaign($id: ID, $input: EventfullyManagedSimpleEntityInput!) {\n upsertCommunicationCampaign: eventfullyManagedUpsertCommunicationCampaign(id: $id, input: $input) {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const UPSERT_ANALYTICS_SNAPSHOT_MUTATION = gql`\n mutation EventfullymanagedUpsertAnalyticsSnapshot($id: ID, $input: EventfullyManagedSimpleEntityInput!) {\n upsertAnalyticsSnapshot: eventfullyManagedUpsertAnalyticsSnapshot(id: $id, input: $input) {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const useDashboardSummaryQuery = () => useQuery<DashboardSummaryResponse>(DASHBOARD_SUMMARY_QUERY);\nexport const useEventsQuery = (variables: { search?: string; limit?: number; offset?: number }) =>\n useQuery<EventsResponse, { search?: string; limit?: number; offset?: number }>(EVENTS_QUERY, { variables });\nexport const useVenuesQuery = (variables: { search?: string; limit?: number; offset?: number }) =>\n useQuery<VenuesResponse, { search?: string; limit?: number; offset?: number }>(VENUES_QUERY, { variables });\nexport const useVenueQuery = (id: string) =>\n useQuery<VenueResponse, { id: string }>(VENUE_QUERY, { variables: { id }, skip: !id });\nexport const useSponsorsQuery = (variables: { search?: string; limit?: number; offset?: number }) =>\n useQuery<SponsorsResponse, { search?: string; limit?: number; offset?: number }>(SPONSORS_QUERY, { variables });\nexport const useRegistrationsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<RegistrationsResponse, { eventId?: string; limit?: number; offset?: number }>(REGISTRATIONS_QUERY, {\n variables,\n });\nexport const useAttendeesQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<AttendeesResponse, { eventId?: string; limit?: number; offset?: number }>(ATTENDEES_QUERY, { variables });\nexport const useEventSessionsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<EventSessionsResponse, { eventId?: string; limit?: number; offset?: number }>(EVENT_SESSIONS_QUERY, {\n variables,\n });\nexport const useSpeakersQuery = (variables: { limit?: number; offset?: number }) =>\n useQuery<SpeakersResponse, { limit?: number; offset?: number }>(SPEAKERS_QUERY, { variables });\nexport const useTicketTypesQuery = (variables: {\n eventId?: string;\n search?: string;\n limit?: number;\n offset?: number;\n}) =>\n useQuery<TicketTypesResponse, { eventId?: string; search?: string; limit?: number; offset?: number }>(\n TICKET_TYPES_QUERY,\n {\n variables,\n }\n );\nexport const usePromoCodesQuery = (variables: { eventId?: string; search?: string; limit?: number; offset?: number }) =>\n useQuery<PromoCodesResponse, { eventId?: string; search?: string; limit?: number; offset?: number }>(\n PROMO_CODES_QUERY,\n {\n variables,\n }\n );\nexport const useExhibitorsQuery = (variables: { eventId?: string; search?: string; limit?: number; offset?: number }) =>\n useQuery<ExhibitorsResponse, { eventId?: string; search?: string; limit?: number; offset?: number }>(\n EXHIBITORS_QUERY,\n {\n variables,\n }\n );\nexport const useLeadsQuery = (variables: { eventId?: string; search?: string; limit?: number; offset?: number }) =>\n useQuery<LeadsResponse, { eventId?: string; search?: string; limit?: number; offset?: number }>(LEADS_QUERY, {\n variables,\n });\nexport const useCheckInStationsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<CheckInStationsResponse, { eventId?: string; limit?: number; offset?: number }>(CHECKIN_STATIONS_QUERY, {\n variables,\n });\nexport const useCheckInRecordsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<CheckInRecordsResponse, { eventId?: string; limit?: number; offset?: number }>(CHECKIN_RECORDS_QUERY, {\n variables,\n });\nexport const useNetworkingProfilesQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<NetworkingProfilesResponse, { eventId?: string; limit?: number; offset?: number }>(\n NETWORKING_PROFILES_QUERY,\n {\n variables,\n }\n );\nexport const useNetworkingMatchesQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<NetworkingMatchesResponse, { eventId?: string; limit?: number; offset?: number }>(NETWORKING_MATCHES_QUERY, {\n variables,\n });\nexport const useMeetingsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<MeetingsResponse, { eventId?: string; limit?: number; offset?: number }>(MEETINGS_QUERY, { variables });\nexport const useAnnouncementsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<AnnouncementsResponse, { eventId?: string; limit?: number; offset?: number }>(ANNOUNCEMENTS_QUERY, {\n variables,\n });\nexport const useWorkflowTemplatesQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<WorkflowTemplatesResponse, { eventId?: string; limit?: number; offset?: number }>(WORKFLOW_TEMPLATES_QUERY, {\n variables,\n });\nexport const useAutomationRulesQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<AutomationRulesResponse, { eventId?: string; limit?: number; offset?: number }>(AUTOMATION_RULES_QUERY, {\n variables,\n });\nexport const useCommunicationCampaignsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<CommunicationCampaignsResponse, { eventId?: string; limit?: number; offset?: number }>(\n COMMUNICATION_CAMPAIGNS_QUERY,\n {\n variables,\n }\n );\nexport const useAnalyticsSnapshotsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<AnalyticsSnapshotsResponse, { eventId?: string; limit?: number; offset?: number }>(\n ANALYTICS_SNAPSHOTS_QUERY,\n {\n variables,\n }\n );\n\nexport const useCreateVenueMutation = () =>\n useMutation<CreateVenueResponse, { input: Record<string, unknown> }>(CREATE_VENUE_MUTATION, {\n refetchQueries: [{ query: VENUES_QUERY }],\n });\nexport const useUpdateVenueMutation = () =>\n useMutation<UpdateVenueResponse, { id: string; input: Record<string, unknown> }>(UPDATE_VENUE_MUTATION, {\n refetchQueries: [{ query: VENUES_QUERY }],\n });\nexport const useCreateSponsorMutation = () =>\n useMutation<CreateSponsorResponse, { input: Record<string, unknown> }>(CREATE_SPONSOR_MUTATION, {\n refetchQueries: [{ query: SPONSORS_QUERY }],\n });\nexport const useUpdateSponsorMutation = () =>\n useMutation<UpdateSponsorResponse, { id: string; input: Record<string, unknown> }>(UPDATE_SPONSOR_MUTATION, {\n refetchQueries: [{ query: SPONSORS_QUERY }],\n });\nexport const useCreateFloorPlanMutation = () =>\n useMutation<CreateFloorPlanResponse, { input: Record<string, unknown> }>(CREATE_FLOOR_PLAN_MUTATION);\nexport const useUpdateFloorPlanMutation = () =>\n useMutation<UpdateFloorPlanResponse, { id: string; input: Record<string, unknown> }>(UPDATE_FLOOR_PLAN_MUTATION);\nexport const useCreateEventMutation = () =>\n useMutation<{ createEvent: EventGql }, { input: Record<string, unknown> }>(CREATE_EVENT_MUTATION, {\n refetchQueries: [{ query: EVENTS_QUERY }, { query: DASHBOARD_SUMMARY_QUERY }],\n });\nexport const useUpdateEventMutation = () =>\n useMutation<{ updateEvent: EventGql }, { id: string; input: Record<string, unknown> }>(UPDATE_EVENT_MUTATION, {\n refetchQueries: [{ query: EVENTS_QUERY }, { query: DASHBOARD_SUMMARY_QUERY }],\n });\nexport const useUpsertAnnouncementMutation = () =>\n useMutation<UpsertSimpleEntityResponse, { id?: string; input: Record<string, unknown> }>(\n UPSERT_ANNOUNCEMENT_MUTATION,\n {\n refetchQueries: [{ query: ANNOUNCEMENTS_QUERY }],\n }\n );\nexport const useUpsertWorkflowTemplateMutation = () =>\n useMutation<UpsertSimpleEntityResponse, { id?: string; input: Record<string, unknown> }>(\n UPSERT_WORKFLOW_TEMPLATE_MUTATION,\n {\n refetchQueries: [{ query: WORKFLOW_TEMPLATES_QUERY }],\n }\n );\nexport const useUpsertAutomationRuleMutation = () =>\n useMutation<UpsertSimpleEntityResponse, { id?: string; input: Record<string, unknown> }>(\n UPSERT_AUTOMATION_RULE_MUTATION,\n {\n refetchQueries: [{ query: AUTOMATION_RULES_QUERY }],\n }\n );\nexport const useUpsertCommunicationCampaignMutation = () =>\n useMutation<UpsertSimpleEntityResponse, { id?: string; input: Record<string, unknown> }>(\n UPSERT_COMMUNICATION_CAMPAIGN_MUTATION,\n {\n refetchQueries: [{ query: COMMUNICATION_CAMPAIGNS_QUERY }],\n }\n );\nexport const useUpsertAnalyticsSnapshotMutation = () =>\n useMutation<UpsertSimpleEntityResponse, { id?: string; input: Record<string, unknown> }>(\n UPSERT_ANALYTICS_SNAPSHOT_MUTATION,\n {\n refetchQueries: [{ query: ANALYTICS_SNAPSHOTS_QUERY }],\n }\n );\n"],"mappings":";;;;AAyLA,IAAa,IAA0B,CAAG;;;;;;;;;;;;GAc7B,IAAe,CAAG;;;;;;;;;;;;;;;;;;;;GAsBlB,IAAe,CAAG;;;;;;;;;;;;;;;;;;;;;;;GAyBlB,IAAc,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCjB,IAAiB,CAAG;;;;;;;;;;;;;;;;;;;;GAsBpB,IAAsB,CAAG;;;;;;;;;;;;;;;;;;GAoBzB,IAAkB,CAAG;;;;;;;;;;;;;;;;;GAmBrB,IAAuB,CAAG;;;;;;;;;;;;;;;;;;AAmBT,CAAG;;;;;;;;;;;;;;AAejC,IAAa,KAAqB,CAAG;;;;;;;;;;;;;;;;;;;;GAsBxB,IAAoB,CAAG;;;;;;;;;;;;;;;;;;;;GAsBvB,IAAmB,CAAG;;;;;;;;;;;;;;;;;GAmBtB,IAAc,CAAG;;;;;;;;;;;;;;;;;;;GAqBjB,IAAwB,CAAG;;;;;;;;;;;;;;;;;;GAoB3B,IAA4B,CAAG;;;;;;;;;;;;;;;;;GAmB/B,IAAyB,CAAG;;;;;;;;;;;;;;;;;GAmB5B,IAA2B,CAAG;;;;;;;;;;;;;;;;;GAmB9B,IAAiB,CAAG;;;;;;;;;;;;;;;;;GAmBpB,IAAsB,CAAG;;;;;;;;;;;;;;;;;GAmBzB,IAA2B,CAAG;;;;;;;;;;;;;;;;;GAmB9B,IAAyB,CAAG;;;;;;;;;;;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file":"eventApi.js","names":[],"sources":["../../../src/eventfullymanaged/api/eventApi.ts"],"sourcesContent":["import { gql, type ErrorLike } from '@apollo/client';\nimport { useMutation, useQuery } from '@apollo/client/react';\n\nimport { notify } from '../lib/toast';\n\n/**\n * Shared mutation error sink. The gateway client runs with `errorPolicy: 'all'`,\n * so in-band GraphQL errors also invoke `onError`; wiring this on every write\n * mutation guarantees a failure is always surfaced to the user even if a caller\n * forgets to inspect the resolved result.\n */\nconst onMutationError = (error: ErrorLike): void => {\n notify.error('Something went wrong', error.message || 'Please try again.');\n};\n\ntype DashboardSummaryResponse = {\n dashboardSummary: {\n totalEvents: number;\n activeEvents: number;\n totalRegistrations: number;\n totalAttendees: number;\n totalVenues: number;\n totalSponsors: number;\n upcomingSessions: number;\n };\n};\n\nexport type EventGql = {\n id: string;\n name: string;\n};\n\nexport type VenueGql = {\n id: string;\n workspaceId: string;\n name: string;\n description?: string | null;\n addressLine1?: string | null;\n city?: string | null;\n state?: string | null;\n country?: string | null;\n postalCode?: string | null;\n capacity?: number | null;\n amenities: string[];\n pricing?: Record<string, unknown> | null;\n openingHours?: Record<string, unknown> | null;\n status: string;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type FloorPlanGql = {\n id: string;\n venueId: string;\n name: string;\n imageUrl?: string | null;\n dimensions?: Record<string, unknown> | null;\n interactiveAreas?: Record<string, unknown> | null;\n createdAt: string;\n updatedAt: string;\n};\n\nexport type TicketTypeGql = {\n id: string;\n eventId: string;\n name: string;\n description?: string | null;\n price: string;\n currency: string;\n capacity?: number | null;\n soldCount: number;\n salesStartAt?: string | null;\n salesEndAt?: string | null;\n isActive: boolean;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type PromoCodeGql = {\n id: string;\n eventId: string;\n code: string;\n description?: string | null;\n discountType: string;\n discountValue: string;\n maxUses?: number | null;\n usedCount: number;\n startsAt?: string | null;\n endsAt?: string | null;\n isActive: boolean;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type ExhibitorGql = {\n id: string;\n eventId: string;\n name: string;\n boothCode?: string | null;\n category?: string | null;\n contactName?: string | null;\n contactEmail?: string | null;\n status: string;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type LeadGql = {\n id: string;\n eventId: string;\n sponsorId?: string | null;\n exhibitorId?: string | null;\n attendeeName: string;\n attendeeEmail: string;\n score?: number | null;\n status: string;\n notes?: string | null;\n capturedAt: string;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type CheckInRecordGql = {\n id: string;\n eventId: string;\n stationId?: string | null;\n attendeeId?: string | null;\n registrationId?: string | null;\n method: string;\n status: string;\n direction: string;\n recordedAt: string;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type NetworkingProfileGql = {\n id: string;\n eventId: string;\n attendeeId: string;\n interests: string[];\n lookingFor: string[];\n industry?: string | null;\n role?: string | null;\n visibility: string;\n metadata?: Record<string, unknown> | null;\n};\n\nexport type SponsorGql = {\n id: string;\n eventId: string;\n name: string;\n level: string;\n logoUrl?: string | null;\n website?: string | null;\n contactName?: string | null;\n contactEmail?: string | null;\n contactPhone?: string | null;\n metrics?: { value?: number; leads?: number } | null;\n metadata?: Record<string, unknown> | null;\n};\n\ntype EventsResponse = { events: { total: number; items: EventGql[] } };\ntype VenuesResponse = { venues: { total: number; items: VenueGql[] } };\ntype VenueResponse = { venue: VenueGql | null; floorPlans: { total: number; items: FloorPlanGql[] } };\ntype SponsorsResponse = { sponsors: { total: number; items: SponsorGql[] } };\ntype CreateVenueResponse = { createVenue: VenueGql };\ntype UpdateVenueResponse = { updateVenue: VenueGql };\ntype CreateSponsorResponse = { createSponsor: SponsorGql };\ntype UpdateSponsorResponse = { updateSponsor: SponsorGql };\ntype CreateFloorPlanResponse = { createFloorPlan: FloorPlanGql };\ntype UpdateFloorPlanResponse = { updateFloorPlan: FloorPlanGql };\ntype TicketTypesResponse = { ticketTypes: { total: number; items: TicketTypeGql[] } };\ntype PromoCodesResponse = { promoCodes: { total: number; items: PromoCodeGql[] } };\ntype ExhibitorsResponse = { exhibitors: { total: number; items: ExhibitorGql[] } };\ntype LeadsResponse = { leads: { total: number; items: LeadGql[] } };\ntype CheckInRecordsResponse = { checkInRecords: { total: number; items: CheckInRecordGql[] } };\ntype NetworkingProfilesResponse = { networkingProfiles: { total: number; items: NetworkingProfileGql[] } };\ntype RegistrationsResponse = { registrations: { total: number; items: Array<Record<string, unknown>> } };\ntype AttendeesResponse = { attendees: { total: number; items: Array<Record<string, unknown>> } };\ntype EventSessionsResponse = { eventSessions: { total: number; items: Array<Record<string, unknown>> } };\ntype SpeakersResponse = { speakers: { total: number; items: Array<Record<string, unknown>> } };\ntype SimpleEntity = {\n id: string;\n workspaceId: string;\n eventId?: string | null;\n name?: string | null;\n title?: string | null;\n status?: string | null;\n metadata?: Record<string, unknown> | null;\n createdAt: string;\n updatedAt: string;\n};\ntype SimpleEntityResponse = { total: number; items: SimpleEntity[] };\ntype CheckInStationsResponse = { checkInStations: SimpleEntityResponse };\ntype NetworkingMatchesResponse = { networkingMatches: SimpleEntityResponse };\ntype MeetingsResponse = { meetings: SimpleEntityResponse };\ntype AnnouncementsResponse = { announcements: SimpleEntityResponse };\ntype WorkflowTemplatesResponse = { workflowTemplates: SimpleEntityResponse };\ntype AutomationRulesResponse = { automationRules: SimpleEntityResponse };\ntype CommunicationCampaignsResponse = { communicationCampaigns: SimpleEntityResponse };\ntype AnalyticsSnapshotsResponse = { analyticsSnapshots: SimpleEntityResponse };\ntype UpsertSimpleEntityResponse = { [key: string]: SimpleEntity };\n\nexport const DASHBOARD_SUMMARY_QUERY = gql`\n query EventfullymanagedDashboardSummary {\n dashboardSummary: eventfullyManagedDashboardSummary {\n totalEvents\n activeEvents\n totalRegistrations\n totalAttendees\n totalVenues\n totalSponsors\n upcomingSessions\n }\n }\n`;\n\nexport const EVENTS_QUERY = gql`\n query EventfullymanagedEvents($search: String, $limit: Int, $offset: Int) {\n events: eventfullyManagedEvents(search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n name\n description\n type\n status\n timezone\n startAt\n endAt\n visibility\n capacity\n metadata\n }\n }\n }\n`;\n\nexport const VENUES_QUERY = gql`\n query EventfullymanagedVenues($search: String, $limit: Int, $offset: Int) {\n venues: eventfullyManagedVenues(search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n name\n description\n addressLine1\n city\n state\n country\n postalCode\n capacity\n amenities\n pricing\n openingHours\n status\n metadata\n }\n }\n }\n`;\n\nexport const VENUE_QUERY = gql`\n query EventfullymanagedVenue($id: ID!) {\n venue: eventfullyManagedVenue(id: $id) {\n id\n workspaceId\n name\n description\n addressLine1\n city\n state\n country\n postalCode\n capacity\n amenities\n pricing\n openingHours\n status\n metadata\n createdAt\n updatedAt\n }\n floorPlans: eventfullyManagedFloorPlans(venueId: $id, limit: 100, offset: 0) {\n total\n items {\n id\n name\n imageUrl\n dimensions\n interactiveAreas\n createdAt\n }\n }\n }\n`;\n\nexport const SPONSORS_QUERY = gql`\n query EventfullymanagedSponsors($search: String, $limit: Int, $offset: Int) {\n sponsors: eventfullyManagedSponsors(search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n name\n level\n logoUrl\n website\n contactName\n contactEmail\n contactPhone\n metrics\n metadata\n createdAt\n }\n }\n }\n`;\n\nexport const REGISTRATIONS_QUERY = gql`\n query EventfullymanagedRegistrations($eventId: ID, $limit: Int, $offset: Int) {\n registrations: eventfullyManagedRegistrations(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n attendeeId\n ticketTypeId\n status\n quantity\n totalAmount\n currency\n registeredAt\n checkedInAt\n }\n }\n }\n`;\n\nexport const ATTENDEES_QUERY = gql`\n query EventfullymanagedAttendees($eventId: ID, $limit: Int, $offset: Int) {\n attendees: eventfullyManagedAttendees(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n fullName\n email\n phone\n company\n role\n tags\n metadata\n }\n }\n }\n`;\n\nexport const EVENT_SESSIONS_QUERY = gql`\n query EventfullymanagedEventSessions($eventId: ID, $limit: Int, $offset: Int) {\n eventSessions: eventfullyManagedEventSessions(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n venueId\n title\n sessionType\n track\n startsAt\n endsAt\n status\n }\n }\n }\n`;\n\nexport const SPEAKERS_QUERY = gql`\n query EventfullymanagedSpeakers($limit: Int, $offset: Int) {\n speakers: eventfullyManagedSpeakers(limit: $limit, offset: $offset) {\n total\n items {\n id\n fullName\n title\n organization\n email\n }\n }\n }\n`;\n\nexport const TICKET_TYPES_QUERY = gql`\n query EventfullymanagedTicketTypes($eventId: ID, $search: String, $limit: Int, $offset: Int) {\n ticketTypes: eventfullyManagedTicketTypes(eventId: $eventId, search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n name\n description\n price\n currency\n capacity\n soldCount\n salesStartAt\n salesEndAt\n isActive\n metadata\n }\n }\n }\n`;\n\nexport const PROMO_CODES_QUERY = gql`\n query EventfullymanagedPromoCodes($eventId: ID, $search: String, $limit: Int, $offset: Int) {\n promoCodes: eventfullyManagedPromoCodes(eventId: $eventId, search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n code\n description\n discountType\n discountValue\n maxUses\n usedCount\n startsAt\n endsAt\n isActive\n metadata\n }\n }\n }\n`;\n\nexport const EXHIBITORS_QUERY = gql`\n query EventfullymanagedExhibitors($eventId: ID, $search: String, $limit: Int, $offset: Int) {\n exhibitors: eventfullyManagedExhibitors(eventId: $eventId, search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n name\n boothCode\n category\n contactName\n contactEmail\n status\n metadata\n }\n }\n }\n`;\n\nexport const LEADS_QUERY = gql`\n query EventfullymanagedLeads($eventId: ID, $search: String, $limit: Int, $offset: Int) {\n leads: eventfullyManagedLeads(eventId: $eventId, search: $search, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n sponsorId\n exhibitorId\n attendeeName\n attendeeEmail\n score\n status\n notes\n capturedAt\n metadata\n }\n }\n }\n`;\n\nexport const CHECKIN_RECORDS_QUERY = gql`\n query EventfullymanagedCheckInRecords($eventId: ID, $limit: Int, $offset: Int) {\n checkInRecords: eventfullyManagedCheckInRecords(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n stationId\n attendeeId\n registrationId\n method\n status\n direction\n recordedAt\n metadata\n }\n }\n }\n`;\n\nexport const NETWORKING_PROFILES_QUERY = gql`\n query EventfullymanagedNetworkingProfiles($eventId: ID, $limit: Int, $offset: Int) {\n networkingProfiles: eventfullyManagedNetworkingProfiles(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n eventId\n attendeeId\n interests\n lookingFor\n industry\n role\n visibility\n metadata\n }\n }\n }\n`;\n\nexport const CHECKIN_STATIONS_QUERY = gql`\n query EventfullymanagedCheckInStations($eventId: ID, $limit: Int, $offset: Int) {\n checkInStations: eventfullyManagedCheckInStations(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const NETWORKING_MATCHES_QUERY = gql`\n query EventfullymanagedNetworkingMatches($eventId: ID, $limit: Int, $offset: Int) {\n networkingMatches: eventfullyManagedNetworkingMatches(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const MEETINGS_QUERY = gql`\n query EventfullymanagedMeetings($eventId: ID, $limit: Int, $offset: Int) {\n meetings: eventfullyManagedMeetings(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const ANNOUNCEMENTS_QUERY = gql`\n query EventfullymanagedAnnouncements($eventId: ID, $limit: Int, $offset: Int) {\n announcements: eventfullyManagedAnnouncements(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const WORKFLOW_TEMPLATES_QUERY = gql`\n query EventfullymanagedWorkflowTemplates($eventId: ID, $limit: Int, $offset: Int) {\n workflowTemplates: eventfullyManagedWorkflowTemplates(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const AUTOMATION_RULES_QUERY = gql`\n query EventfullymanagedAutomationRules($eventId: ID, $limit: Int, $offset: Int) {\n automationRules: eventfullyManagedAutomationRules(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const COMMUNICATION_CAMPAIGNS_QUERY = gql`\n query EventfullymanagedCommunicationCampaigns($eventId: ID, $limit: Int, $offset: Int) {\n communicationCampaigns: eventfullyManagedCommunicationCampaigns(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const ANALYTICS_SNAPSHOTS_QUERY = gql`\n query EventfullymanagedAnalyticsSnapshots($eventId: ID, $limit: Int, $offset: Int) {\n analyticsSnapshots: eventfullyManagedAnalyticsSnapshots(eventId: $eventId, limit: $limit, offset: $offset) {\n total\n items {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n }\n`;\n\nexport const CREATE_VENUE_MUTATION = gql`\n mutation EventfullymanagedCreateVenue($input: EventfullyManagedVenueInput!) {\n createVenue: eventfullyManagedCreateVenue(input: $input) {\n id\n name\n description\n city\n state\n country\n capacity\n amenities\n status\n pricing\n openingHours\n metadata\n }\n }\n`;\n\nexport const UPDATE_VENUE_MUTATION = gql`\n mutation EventfullymanagedUpdateVenue($id: ID!, $input: EventfullyManagedVenueInput!) {\n updateVenue: eventfullyManagedUpdateVenue(id: $id, input: $input) {\n id\n name\n description\n city\n state\n country\n capacity\n amenities\n status\n pricing\n openingHours\n metadata\n }\n }\n`;\n\nexport const CREATE_SPONSOR_MUTATION = gql`\n mutation EventfullymanagedCreateSponsor($input: EventfullyManagedSponsorInput!) {\n createSponsor: eventfullyManagedCreateSponsor(input: $input) {\n id\n eventId\n name\n level\n logoUrl\n website\n contactName\n contactEmail\n contactPhone\n metrics\n metadata\n }\n }\n`;\n\nexport const UPDATE_SPONSOR_MUTATION = gql`\n mutation EventfullymanagedUpdateSponsor($id: ID!, $input: EventfullyManagedSponsorInput!) {\n updateSponsor: eventfullyManagedUpdateSponsor(id: $id, input: $input) {\n id\n eventId\n name\n level\n logoUrl\n website\n contactName\n contactEmail\n contactPhone\n metrics\n metadata\n }\n }\n`;\n\nexport const CREATE_FLOOR_PLAN_MUTATION = gql`\n mutation EventfullymanagedCreateFloorPlan($input: EventfullyManagedFloorPlanInput!) {\n createFloorPlan: eventfullyManagedCreateFloorPlan(input: $input) {\n id\n venueId\n name\n imageUrl\n dimensions\n interactiveAreas\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const UPDATE_FLOOR_PLAN_MUTATION = gql`\n mutation EventfullymanagedUpdateFloorPlan($id: ID!, $input: EventfullyManagedFloorPlanInput!) {\n updateFloorPlan: eventfullyManagedUpdateFloorPlan(id: $id, input: $input) {\n id\n venueId\n name\n imageUrl\n dimensions\n interactiveAreas\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const CREATE_EVENT_MUTATION = gql`\n mutation EventfullymanagedCreateEvent($input: EventfullyManagedEventInput!) {\n createEvent: eventfullyManagedCreateEvent(input: $input) {\n id\n name\n type\n status\n startAt\n endAt\n timezone\n visibility\n capacity\n metadata\n }\n }\n`;\n\nexport const UPDATE_EVENT_MUTATION = gql`\n mutation EventfullymanagedUpdateEvent($id: ID!, $input: EventfullyManagedEventInput!) {\n updateEvent: eventfullyManagedUpdateEvent(id: $id, input: $input) {\n id\n name\n type\n status\n startAt\n endAt\n timezone\n visibility\n capacity\n metadata\n }\n }\n`;\n\nexport const UPSERT_ANNOUNCEMENT_MUTATION = gql`\n mutation EventfullymanagedUpsertAnnouncement($id: ID, $input: EventfullyManagedSimpleEntityInput!) {\n upsertAnnouncement: eventfullyManagedUpsertAnnouncement(id: $id, input: $input) {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const UPSERT_WORKFLOW_TEMPLATE_MUTATION = gql`\n mutation EventfullymanagedUpsertWorkflowTemplate($id: ID, $input: EventfullyManagedSimpleEntityInput!) {\n upsertWorkflowTemplate: eventfullyManagedUpsertWorkflowTemplate(id: $id, input: $input) {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const UPSERT_AUTOMATION_RULE_MUTATION = gql`\n mutation EventfullymanagedUpsertAutomationRule($id: ID, $input: EventfullyManagedSimpleEntityInput!) {\n upsertAutomationRule: eventfullyManagedUpsertAutomationRule(id: $id, input: $input) {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const UPSERT_COMMUNICATION_CAMPAIGN_MUTATION = gql`\n mutation EventfullymanagedUpsertCommunicationCampaign($id: ID, $input: EventfullyManagedSimpleEntityInput!) {\n upsertCommunicationCampaign: eventfullyManagedUpsertCommunicationCampaign(id: $id, input: $input) {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const UPSERT_ANALYTICS_SNAPSHOT_MUTATION = gql`\n mutation EventfullymanagedUpsertAnalyticsSnapshot($id: ID, $input: EventfullyManagedSimpleEntityInput!) {\n upsertAnalyticsSnapshot: eventfullyManagedUpsertAnalyticsSnapshot(id: $id, input: $input) {\n id\n workspaceId\n eventId\n name\n title\n status\n metadata\n createdAt\n updatedAt\n }\n }\n`;\n\nexport const useDashboardSummaryQuery = () => useQuery<DashboardSummaryResponse>(DASHBOARD_SUMMARY_QUERY);\nexport const useEventsQuery = (variables: { search?: string; limit?: number; offset?: number }) =>\n useQuery<EventsResponse, { search?: string; limit?: number; offset?: number }>(EVENTS_QUERY, { variables });\nexport const useVenuesQuery = (variables: { search?: string; limit?: number; offset?: number }) =>\n useQuery<VenuesResponse, { search?: string; limit?: number; offset?: number }>(VENUES_QUERY, { variables });\nexport const useVenueQuery = (id: string) =>\n useQuery<VenueResponse, { id: string }>(VENUE_QUERY, { variables: { id }, skip: !id });\nexport const useSponsorsQuery = (variables: { search?: string; limit?: number; offset?: number }) =>\n useQuery<SponsorsResponse, { search?: string; limit?: number; offset?: number }>(SPONSORS_QUERY, { variables });\nexport const useRegistrationsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<RegistrationsResponse, { eventId?: string; limit?: number; offset?: number }>(REGISTRATIONS_QUERY, {\n variables,\n });\nexport const useAttendeesQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<AttendeesResponse, { eventId?: string; limit?: number; offset?: number }>(ATTENDEES_QUERY, { variables });\nexport const useEventSessionsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<EventSessionsResponse, { eventId?: string; limit?: number; offset?: number }>(EVENT_SESSIONS_QUERY, {\n variables,\n });\nexport const useSpeakersQuery = (variables: { limit?: number; offset?: number }) =>\n useQuery<SpeakersResponse, { limit?: number; offset?: number }>(SPEAKERS_QUERY, { variables });\nexport const useTicketTypesQuery = (variables: {\n eventId?: string;\n search?: string;\n limit?: number;\n offset?: number;\n}) =>\n useQuery<TicketTypesResponse, { eventId?: string; search?: string; limit?: number; offset?: number }>(\n TICKET_TYPES_QUERY,\n {\n variables,\n }\n );\nexport const usePromoCodesQuery = (variables: { eventId?: string; search?: string; limit?: number; offset?: number }) =>\n useQuery<PromoCodesResponse, { eventId?: string; search?: string; limit?: number; offset?: number }>(\n PROMO_CODES_QUERY,\n {\n variables,\n }\n );\nexport const useExhibitorsQuery = (variables: { eventId?: string; search?: string; limit?: number; offset?: number }) =>\n useQuery<ExhibitorsResponse, { eventId?: string; search?: string; limit?: number; offset?: number }>(\n EXHIBITORS_QUERY,\n {\n variables,\n }\n );\nexport const useLeadsQuery = (variables: { eventId?: string; search?: string; limit?: number; offset?: number }) =>\n useQuery<LeadsResponse, { eventId?: string; search?: string; limit?: number; offset?: number }>(LEADS_QUERY, {\n variables,\n });\nexport const useCheckInStationsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<CheckInStationsResponse, { eventId?: string; limit?: number; offset?: number }>(CHECKIN_STATIONS_QUERY, {\n variables,\n });\nexport const useCheckInRecordsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<CheckInRecordsResponse, { eventId?: string; limit?: number; offset?: number }>(CHECKIN_RECORDS_QUERY, {\n variables,\n });\nexport const useNetworkingProfilesQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<NetworkingProfilesResponse, { eventId?: string; limit?: number; offset?: number }>(\n NETWORKING_PROFILES_QUERY,\n {\n variables,\n }\n );\nexport const useNetworkingMatchesQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<NetworkingMatchesResponse, { eventId?: string; limit?: number; offset?: number }>(NETWORKING_MATCHES_QUERY, {\n variables,\n });\nexport const useMeetingsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<MeetingsResponse, { eventId?: string; limit?: number; offset?: number }>(MEETINGS_QUERY, { variables });\nexport const useAnnouncementsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<AnnouncementsResponse, { eventId?: string; limit?: number; offset?: number }>(ANNOUNCEMENTS_QUERY, {\n variables,\n });\nexport const useWorkflowTemplatesQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<WorkflowTemplatesResponse, { eventId?: string; limit?: number; offset?: number }>(WORKFLOW_TEMPLATES_QUERY, {\n variables,\n });\nexport const useAutomationRulesQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<AutomationRulesResponse, { eventId?: string; limit?: number; offset?: number }>(AUTOMATION_RULES_QUERY, {\n variables,\n });\nexport const useCommunicationCampaignsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<CommunicationCampaignsResponse, { eventId?: string; limit?: number; offset?: number }>(\n COMMUNICATION_CAMPAIGNS_QUERY,\n {\n variables,\n }\n );\nexport const useAnalyticsSnapshotsQuery = (variables: { eventId?: string; limit?: number; offset?: number }) =>\n useQuery<AnalyticsSnapshotsResponse, { eventId?: string; limit?: number; offset?: number }>(\n ANALYTICS_SNAPSHOTS_QUERY,\n {\n variables,\n }\n );\n\nexport const useCreateVenueMutation = () =>\n useMutation<CreateVenueResponse, { input: Record<string, unknown> }>(CREATE_VENUE_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: VENUES_QUERY }],\n });\nexport const useUpdateVenueMutation = () =>\n useMutation<UpdateVenueResponse, { id: string; input: Record<string, unknown> }>(UPDATE_VENUE_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: VENUES_QUERY }],\n });\nexport const useCreateSponsorMutation = () =>\n useMutation<CreateSponsorResponse, { input: Record<string, unknown> }>(CREATE_SPONSOR_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: SPONSORS_QUERY }],\n });\nexport const useUpdateSponsorMutation = () =>\n useMutation<UpdateSponsorResponse, { id: string; input: Record<string, unknown> }>(UPDATE_SPONSOR_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: SPONSORS_QUERY }],\n });\nexport const useCreateFloorPlanMutation = () =>\n useMutation<CreateFloorPlanResponse, { input: Record<string, unknown> }>(CREATE_FLOOR_PLAN_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n });\nexport const useUpdateFloorPlanMutation = () =>\n useMutation<UpdateFloorPlanResponse, { id: string; input: Record<string, unknown> }>(UPDATE_FLOOR_PLAN_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n });\nexport const useCreateEventMutation = () =>\n useMutation<{ createEvent: EventGql }, { input: Record<string, unknown> }>(CREATE_EVENT_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: EVENTS_QUERY }, { query: DASHBOARD_SUMMARY_QUERY }],\n });\nexport const useUpdateEventMutation = () =>\n useMutation<{ updateEvent: EventGql }, { id: string; input: Record<string, unknown> }>(UPDATE_EVENT_MUTATION, {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: EVENTS_QUERY }, { query: DASHBOARD_SUMMARY_QUERY }],\n });\nexport const useUpsertAnnouncementMutation = () =>\n useMutation<UpsertSimpleEntityResponse, { id?: string; input: Record<string, unknown> }>(\n UPSERT_ANNOUNCEMENT_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: ANNOUNCEMENTS_QUERY }],\n }\n );\nexport const useUpsertWorkflowTemplateMutation = () =>\n useMutation<UpsertSimpleEntityResponse, { id?: string; input: Record<string, unknown> }>(\n UPSERT_WORKFLOW_TEMPLATE_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: WORKFLOW_TEMPLATES_QUERY }],\n }\n );\nexport const useUpsertAutomationRuleMutation = () =>\n useMutation<UpsertSimpleEntityResponse, { id?: string; input: Record<string, unknown> }>(\n UPSERT_AUTOMATION_RULE_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: AUTOMATION_RULES_QUERY }],\n }\n );\nexport const useUpsertCommunicationCampaignMutation = () =>\n useMutation<UpsertSimpleEntityResponse, { id?: string; input: Record<string, unknown> }>(\n UPSERT_COMMUNICATION_CAMPAIGN_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: COMMUNICATION_CAMPAIGNS_QUERY }],\n }\n );\nexport const useUpsertAnalyticsSnapshotMutation = () =>\n useMutation<UpsertSimpleEntityResponse, { id?: string; input: Record<string, unknown> }>(\n UPSERT_ANALYTICS_SNAPSHOT_MUTATION,\n {\n errorPolicy: 'all',\n onError: onMutationError,\n refetchQueries: [{ query: ANALYTICS_SNAPSHOTS_QUERY }],\n }\n );\n"],"mappings":";;;;;AAWA,IAAM,KAAmB,MAA2B;AAClD,GAAO,MAAM,wBAAwB,EAAM,WAAW,oBAAoB;GA0L/D,IAA0B,CAAG;;;;;;;;;;;;GAc7B,IAAe,CAAG;;;;;;;;;;;;;;;;;;;;GAsBlB,IAAe,CAAG;;;;;;;;;;;;;;;;;;;;;;;GAyBlB,IAAc,CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCjB,IAAiB,CAAG;;;;;;;;;;;;;;;;;;;;GAsBpB,IAAsB,CAAG;;;;;;;;;;;;;;;;;;GAoBzB,IAAkB,CAAG;;;;;;;;;;;;;;;;;GAmBrB,KAAuB,CAAG;;;;;;;;;;;;;;;;;;AAmBT,CAAG;;;;;;;;;;;;;;AAejC,IAAa,IAAqB,CAAG;;;;;;;;;;;;;;;;;;;;GAsBxB,IAAoB,CAAG;;;;;;;;;;;;;;;;;;;;GAsBvB,IAAmB,CAAG;;;;;;;;;;;;;;;;;GAmBtB,IAAc,CAAG;;;;;;;;;;;;;;;;;;;GAqBjB,IAAwB,CAAG;;;;;;;;;;;;;;;;;;GAoB3B,IAA4B,CAAG;;;;;;;;;;;;;;;;;GAmB/B,IAAyB,CAAG;;;;;;;;;;;;;;;;;GAmB5B,IAA2B,CAAG;;;;;;;;;;;;;;;;;GAmB9B,IAAiB,CAAG;;;;;;;;;;;;;;;;;GAmBpB,IAAsB,CAAG;;;;;;;;;;;;;;;;;GAmBzB,IAA2B,CAAG;;;;;;;;;;;;;;;;;GAmB9B,IAAyB,CAAG;;;;;;;;;;;;;;;;;GAmB5B,IAAgC,CAAG;;;;;;;;;;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AAO,GAA0B,CAAC;CACtD,CACF,EACU,WACX,EACE,GACA;CACE,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,GAAwB,CAAC;CACpD,CACF,EAUU,WACX,EACE,GACA;CACE,aAAa;CACb,SAAS;CACT,gBAAgB,CAAC,EAAE,OAAO,GAA2B,CAAC;CACvD,CACF"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { gql as e } from "../../node_modules/graphql-tag/lib/index.js";
|
|
2
|
+
import { useApolloClient as t } from "../../node_modules/@apollo/client/react/hooks/useApolloClient.js";
|
|
3
|
+
import { notify as n } from "../lib/toast.js";
|
|
4
|
+
import { useId as r, useRef as i, useState as a } from "react";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { ImagePlus as c, Loader2 as l, Upload as u } from "lucide-react";
|
|
7
|
+
import { Button as d } from "@burdenoff/fe-libs/ui";
|
|
8
|
+
import { uploadBlobToFiles as f } from "@burdenoff/fe-libs/storage";
|
|
9
|
+
//#region src/eventfullymanaged/components/ImageUploadField.tsx
|
|
10
|
+
var p = e`
|
|
11
|
+
mutation EventfullymanagedEnsureFolder($path: String!) {
|
|
12
|
+
ensureFolderByPath(path: $path) {
|
|
13
|
+
id
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
`, m = e`
|
|
17
|
+
query EventfullymanagedGetFileDownloadUrl($id: ID!, $expiresIn: Int) {
|
|
18
|
+
getFileDownloadUrl(id: $id, expiresIn: $expiresIn)
|
|
19
|
+
}
|
|
20
|
+
`, h = 31536e3;
|
|
21
|
+
function g({ folderPath: e, value: g, onUploaded: _, label: v, hint: y, className: b, disabled: x = !1 }) {
|
|
22
|
+
let S = t(), C = i(null), w = r(), [T, E] = a(!1), D = async (t) => {
|
|
23
|
+
let r = t.target.files?.[0];
|
|
24
|
+
if (t.target.value = "", r) {
|
|
25
|
+
if (!r.type.startsWith("image/")) {
|
|
26
|
+
n.error("Unsupported file", "Please choose an image file.");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
E(!0);
|
|
30
|
+
try {
|
|
31
|
+
let t = await S.mutate({
|
|
32
|
+
mutation: p,
|
|
33
|
+
variables: { path: e }
|
|
34
|
+
}), i = t.data?.ensureFolderByPath?.id;
|
|
35
|
+
if (!i) throw Error(t.error?.message ?? "Could not resolve the upload folder.");
|
|
36
|
+
let a = await f({
|
|
37
|
+
client: S,
|
|
38
|
+
blob: r,
|
|
39
|
+
filename: r.name,
|
|
40
|
+
mimeType: r.type || "application/octet-stream",
|
|
41
|
+
folderId: i
|
|
42
|
+
}), o = (await S.query({
|
|
43
|
+
query: m,
|
|
44
|
+
variables: {
|
|
45
|
+
id: a.id,
|
|
46
|
+
expiresIn: h
|
|
47
|
+
},
|
|
48
|
+
fetchPolicy: "no-cache"
|
|
49
|
+
})).data?.getFileDownloadUrl;
|
|
50
|
+
if (!o) throw Error("The file was uploaded but no download URL was returned.");
|
|
51
|
+
await _(o), n.success("Image uploaded");
|
|
52
|
+
} catch (e) {
|
|
53
|
+
n.error("Upload failed", e instanceof Error ? e.message : "Please try again.");
|
|
54
|
+
} finally {
|
|
55
|
+
E(!1);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
return /* @__PURE__ */ s("div", {
|
|
60
|
+
className: b,
|
|
61
|
+
children: [/* @__PURE__ */ s("div", {
|
|
62
|
+
className: "flex items-center gap-4",
|
|
63
|
+
children: [g ? /* @__PURE__ */ o("img", {
|
|
64
|
+
src: g,
|
|
65
|
+
alt: v,
|
|
66
|
+
className: "h-16 w-16 shrink-0 rounded-card border border-border-seam object-cover"
|
|
67
|
+
}) : /* @__PURE__ */ o("div", {
|
|
68
|
+
className: "flex h-16 w-16 shrink-0 items-center justify-center rounded-card border border-dashed border-border-default bg-bg-surface text-text-secondary",
|
|
69
|
+
children: /* @__PURE__ */ o(c, { className: "h-5 w-5" })
|
|
70
|
+
}), /* @__PURE__ */ s("div", {
|
|
71
|
+
className: "space-y-1",
|
|
72
|
+
children: [/* @__PURE__ */ s(d, {
|
|
73
|
+
type: "button",
|
|
74
|
+
variant: "secondary",
|
|
75
|
+
size: "sm",
|
|
76
|
+
disabled: x || T,
|
|
77
|
+
onClick: () => C.current?.click(),
|
|
78
|
+
children: [T ? /* @__PURE__ */ o(l, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ o(u, { className: "h-4 w-4" }), T ? "Uploading..." : g ? "Replace image" : v]
|
|
79
|
+
}), y ? /* @__PURE__ */ o("p", {
|
|
80
|
+
className: "text-xs text-text-secondary",
|
|
81
|
+
children: y
|
|
82
|
+
}) : null]
|
|
83
|
+
})]
|
|
84
|
+
}), /* @__PURE__ */ o("input", {
|
|
85
|
+
ref: C,
|
|
86
|
+
id: w,
|
|
87
|
+
type: "file",
|
|
88
|
+
accept: "image/*",
|
|
89
|
+
className: "sr-only",
|
|
90
|
+
"aria-label": v,
|
|
91
|
+
onChange: (e) => void D(e)
|
|
92
|
+
})]
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
export { g as ImageUploadField };
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=ImageUploadField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageUploadField.js","names":[],"sources":["../../../src/eventfullymanaged/components/ImageUploadField.tsx"],"sourcesContent":["import { gql } from '@apollo/client';\nimport { useApolloClient } from '@apollo/client/react';\nimport { uploadBlobToFiles } from '@burdenoff/fe-libs/storage';\nimport { Button } from '@burdenoff/fe-libs/ui';\nimport { ImagePlus, Loader2, Upload } from 'lucide-react';\nimport { useId, useRef, useState } from 'react';\n\nimport { notify } from '../lib/toast';\n\n// wspace-files requires a real folder id (File.folderId FK) — resolve/create the\n// destination folder by path before uploading.\nconst ENSURE_FOLDER = gql`\n mutation EventfullymanagedEnsureFolder($path: String!) {\n ensureFolderByPath(path: $path) {\n id\n }\n }\n`;\n\n// wspace-files returns a presigned, time-limited download URL for a stored file;\n// that URL is what we persist into the entity's *Url field so the image renders.\nconst GET_FILE_DOWNLOAD_URL = gql`\n query EventfullymanagedGetFileDownloadUrl($id: ID!, $expiresIn: Int) {\n getFileDownloadUrl(id: $id, expiresIn: $expiresIn)\n }\n`;\n\n// One year — floor-plan / logo images are long-lived references, so we request a\n// long expiry rather than a short-lived link that would rot in the database.\nconst DOWNLOAD_URL_TTL_SECONDS = 31_536_000;\n\ninterface EnsureFolderResponse {\n ensureFolderByPath?: { id: string } | null;\n}\n\ninterface DownloadUrlResponse {\n getFileDownloadUrl?: string | null;\n}\n\ninterface ImageUploadFieldProps {\n /** Files-svc folder path the upload is stored under, e.g. \"/EventfullyManaged/FloorPlans\". */\n folderPath: string;\n /** Current persisted image URL, if any — rendered as a preview. */\n value?: string | null;\n /** Called with the new files-svc download URL once the upload completes. */\n onUploaded: (url: string) => void | Promise<void>;\n /** Accessible label for the control. */\n label: string;\n /** Optional helper text shown under the control. */\n hint?: string;\n className?: string;\n disabled?: boolean;\n}\n\n/**\n * Reusable image upload control backed by wspace-files-svc via the shared\n * `uploadBlobToFiles` storage helper (presigned 3-step upload). It never keeps a\n * local blob store — on select it ensures the destination folder, uploads the\n * blob, resolves a presigned download URL, and hands that URL back to the caller\n * to persist through the entity's own mutation.\n */\nexport function ImageUploadField({\n folderPath,\n value,\n onUploaded,\n label,\n hint,\n className,\n disabled = false,\n}: ImageUploadFieldProps) {\n const client = useApolloClient();\n const inputRef = useRef<HTMLInputElement | null>(null);\n const inputId = useId();\n const [uploading, setUploading] = useState(false);\n\n const handleSelect = async (event: React.ChangeEvent<HTMLInputElement>) => {\n const file = event.target.files?.[0];\n // Reset the input so selecting the same file again re-triggers change.\n event.target.value = '';\n if (!file) {\n return;\n }\n if (!file.type.startsWith('image/')) {\n notify.error('Unsupported file', 'Please choose an image file.');\n return;\n }\n\n setUploading(true);\n try {\n const folderResult = await client.mutate<EnsureFolderResponse>({\n mutation: ENSURE_FOLDER,\n variables: { path: folderPath },\n });\n const folderId = folderResult.data?.ensureFolderByPath?.id;\n if (!folderId) {\n throw new Error(folderResult.error?.message ?? 'Could not resolve the upload folder.');\n }\n\n const uploaded = await uploadBlobToFiles({\n client,\n blob: file,\n filename: file.name,\n mimeType: file.type || 'application/octet-stream',\n folderId,\n });\n\n const urlResult = await client.query<DownloadUrlResponse>({\n query: GET_FILE_DOWNLOAD_URL,\n variables: { id: uploaded.id, expiresIn: DOWNLOAD_URL_TTL_SECONDS },\n fetchPolicy: 'no-cache',\n });\n const url = urlResult.data?.getFileDownloadUrl;\n if (!url) {\n throw new Error('The file was uploaded but no download URL was returned.');\n }\n\n await onUploaded(url);\n notify.success('Image uploaded');\n } catch (error) {\n notify.error('Upload failed', error instanceof Error ? error.message : 'Please try again.');\n } finally {\n setUploading(false);\n }\n };\n\n return (\n <div className={className}>\n <div className=\"flex items-center gap-4\">\n {value ? (\n <img\n src={value}\n alt={label}\n className=\"h-16 w-16 shrink-0 rounded-card border border-border-seam object-cover\"\n />\n ) : (\n <div className=\"flex h-16 w-16 shrink-0 items-center justify-center rounded-card border border-dashed border-border-default bg-bg-surface text-text-secondary\">\n <ImagePlus className=\"h-5 w-5\" />\n </div>\n )}\n <div className=\"space-y-1\">\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"sm\"\n disabled={disabled || uploading}\n onClick={() => inputRef.current?.click()}\n >\n {uploading ? <Loader2 className=\"h-4 w-4 animate-spin\" /> : <Upload className=\"h-4 w-4\" />}\n {uploading ? 'Uploading...' : value ? 'Replace image' : label}\n </Button>\n {hint ? <p className=\"text-xs text-text-secondary\">{hint}</p> : null}\n </div>\n </div>\n <input\n ref={inputRef}\n id={inputId}\n type=\"file\"\n accept=\"image/*\"\n className=\"sr-only\"\n aria-label={label}\n onChange={(event) => void handleSelect(event)}\n />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAWA,IAAM,IAAgB,CAAG;;;;;;GAUnB,IAAwB,CAAG;;;;GAQ3B,IA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7B,CAAA,EAER,kBAAC,OAAD;IAAK,WAAU;cAAf,CACE,kBAAC,GAAD;KACE,MAAK;KACL,SAAQ;KACR,MAAK;KACL,UAAU,KAAY;KACtB,eAAe,EAAS,SAAS,OAAO;eAL1C,CAOG,IAAY,kBAAC,GAAD,EAAS,WAAU,wBAAyB,CAAA,GAAG,kBAAC,GAAD,EAAQ,WAAU,WAAY,CAAA,EACzF,IAAY,iBAAiB,IAAQ,kBAAkB,EACjD;QACR,IAAO,kBAAC,KAAD;KAAG,WAAU;eAA+B;KAAS,CAAA,GAAG,KAC5D;MACF;MACN,kBAAC,SAAD;GACE,KAAK;GACL,IAAI;GACJ,MAAK;GACL,QAAO;GACP,WAAU;GACV,cAAY;GACZ,WAAW,MAAU,KAAK,EAAa,EAAM;GAC7C,CAAA,CACE"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { notify as e } from "./toast.js";
|
|
2
|
+
//#region src/eventfullymanaged/lib/mutationResult.ts
|
|
3
|
+
function t(t, n, r) {
|
|
4
|
+
return t?.error ? (e.error(r, t.error.message), !1) : n ? !0 : (e.error(r, "The server did not confirm the change. Please try again."), !1);
|
|
5
|
+
}
|
|
6
|
+
function n(e) {
|
|
7
|
+
if (e instanceof Error && e.message.length > 0) return e.message;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { n as describeError, t as mutationSucceeded };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=mutationResult.js.map
|