@getmicdrop/venue-calendar 3.6.0 → 3.7.0
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/README.md +661 -661
- package/dist/api/api.cjs +1 -1
- package/dist/api/api.cjs.map +1 -1
- package/dist/api/api.mjs +84 -81
- package/dist/api/api.mjs.map +1 -1
- package/dist/api/client.d.ts +0 -1
- package/dist/api/orders.d.ts +1 -2
- package/dist/api/types.d.ts +349 -349
- package/dist/types/index.d.ts +387 -387
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +33632 -37
- package/dist/venue-calendar.es.js.map +1 -1
- package/dist/venue-calendar.iife.js +29 -45
- package/dist/venue-calendar.iife.js.map +1 -1
- package/dist/venue-calendar.umd.js +29 -45
- package/dist/venue-calendar.umd.js.map +1 -1
- package/package.json +111 -121
- package/src/lib/theme.js +217 -213
- package/dist/CarouselView.legacy-DeWfW7JT.js +0 -64
- package/dist/CarouselView.legacy-DeWfW7JT.js.map +0 -1
- package/dist/Checkout.legacy-CJPThT4I.js +0 -1218
- package/dist/Checkout.legacy-CJPThT4I.js.map +0 -1
- package/dist/CollectionView.legacy-BG3g7XbI.js +0 -375
- package/dist/CollectionView.legacy-BG3g7XbI.js.map +0 -1
- package/dist/FeaturedView.legacy-CALzP8EW.js +0 -128
- package/dist/FeaturedView.legacy-CALzP8EW.js.map +0 -1
- package/dist/GalleryView.legacy-DIhYvOQU.js +0 -51
- package/dist/GalleryView.legacy-DIhYvOQU.js.map +0 -1
- package/dist/GroupedListView.legacy-C9dQ_v_d.js +0 -144
- package/dist/GroupedListView.legacy-C9dQ_v_d.js.map +0 -1
- package/dist/SeriesPage.legacy-hSI5Sm8W.js +0 -187
- package/dist/SeriesPage.legacy-hSI5Sm8W.js.map +0 -1
- package/dist/Success.legacy-DEjngxhO.js +0 -191
- package/dist/Success.legacy-DEjngxhO.js.map +0 -1
- package/dist/VenueCalendar-DvT1UOq-.js +0 -37371
- package/dist/VenueCalendar-DvT1UOq-.js.map +0 -1
- package/dist/colors-BZoMuXdh.js +0 -62
- package/dist/colors-BZoMuXdh.js.map +0 -1
- package/dist/seo/HostSeoController.d.ts +0 -59
- package/dist/seo/buildCollectionJsonLd.d.ts +0 -7
- package/dist/seo/buildEventJsonLd.d.ts +0 -9
- package/dist/seo/buildSeriesJsonLd.d.ts +0 -6
- package/dist/seo/helpers.d.ts +0 -40
- package/dist/seo/index.d.ts +0 -9
- package/dist/seo/seo.cjs +0 -2
- package/dist/seo/seo.cjs.map +0 -1
- package/dist/seo/seo.mjs +0 -472
- package/dist/seo/seo.mjs.map +0 -1
- package/dist/seo/types.d.ts +0 -136
package/dist/api/api.mjs
CHANGED
|
@@ -10,71 +10,75 @@ function y(e, r = {}) {
|
|
|
10
10
|
level: r.level ?? "debug",
|
|
11
11
|
prefix: e.startsWith("[") ? e : `[${e}]`
|
|
12
12
|
};
|
|
13
|
-
function o(
|
|
14
|
-
return t.enabled && _[
|
|
13
|
+
function o(u) {
|
|
14
|
+
return t.enabled && _[u] >= _[t.level];
|
|
15
15
|
}
|
|
16
|
-
function n(
|
|
17
|
-
return `${t.prefix} [${
|
|
16
|
+
function n(u, i) {
|
|
17
|
+
return `${t.prefix} [${u.toUpperCase()}] ${i}`;
|
|
18
18
|
}
|
|
19
19
|
return {
|
|
20
|
-
debug(
|
|
21
|
-
o("debug") && console.log(n("debug",
|
|
20
|
+
debug(u, ...i) {
|
|
21
|
+
o("debug") && console.log(n("debug", u), ...i);
|
|
22
22
|
},
|
|
23
|
-
info(
|
|
24
|
-
o("info") && console.info(n("info",
|
|
23
|
+
info(u, ...i) {
|
|
24
|
+
o("info") && console.info(n("info", u), ...i);
|
|
25
25
|
},
|
|
26
|
-
warn(
|
|
27
|
-
o("warn") && console.warn(n("warn",
|
|
26
|
+
warn(u, ...i) {
|
|
27
|
+
o("warn") && console.warn(n("warn", u), ...i);
|
|
28
28
|
},
|
|
29
|
-
error(
|
|
30
|
-
o("error") && console.error(n("error",
|
|
29
|
+
error(u, ...i) {
|
|
30
|
+
o("error") && console.error(n("error", u), ...i);
|
|
31
31
|
},
|
|
32
|
-
configure(
|
|
33
|
-
t = { ...t, ...
|
|
32
|
+
configure(u) {
|
|
33
|
+
t = { ...t, ...u };
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
P();
|
|
38
|
-
const
|
|
38
|
+
const g = y("VC"), A = {
|
|
39
39
|
baseUrl: "https://get-micdrop.com",
|
|
40
40
|
timeout: 3e4,
|
|
41
|
-
onError: (e) =>
|
|
41
|
+
onError: (e) => g.error("API Error:", e)
|
|
42
42
|
};
|
|
43
|
-
let d = { ...
|
|
44
|
-
function
|
|
43
|
+
let d = { ...A };
|
|
44
|
+
function p(e) {
|
|
45
45
|
d = { ...d, ...e };
|
|
46
46
|
}
|
|
47
|
-
function
|
|
47
|
+
function z() {
|
|
48
48
|
return { ...d };
|
|
49
49
|
}
|
|
50
50
|
function s() {
|
|
51
51
|
return `${d.baseUrl}/api/v2/public`;
|
|
52
52
|
}
|
|
53
|
-
function
|
|
53
|
+
function R() {
|
|
54
54
|
return `${d.baseUrl}/api/public`;
|
|
55
55
|
}
|
|
56
56
|
function b() {
|
|
57
57
|
return `${d.baseUrl}/api/orders/v2/public`;
|
|
58
58
|
}
|
|
59
|
-
async function
|
|
60
|
-
|
|
59
|
+
async function T() {
|
|
60
|
+
try {
|
|
61
|
+
return (await (await fetch("https://api.ipify.org?format=json")).json()).ip || "";
|
|
62
|
+
} catch (e) {
|
|
63
|
+
return g.warn("Could not fetch client IP:", e), "";
|
|
64
|
+
}
|
|
61
65
|
}
|
|
62
|
-
async function
|
|
63
|
-
return
|
|
66
|
+
async function M(e, r) {
|
|
67
|
+
return w("GET", e, void 0, r);
|
|
64
68
|
}
|
|
65
69
|
async function B(e, r, t) {
|
|
66
|
-
return
|
|
70
|
+
return w("POST", e, r, t);
|
|
67
71
|
}
|
|
68
72
|
async function H(e, r, t) {
|
|
69
|
-
return
|
|
73
|
+
return w("PUT", e, r, t);
|
|
70
74
|
}
|
|
71
75
|
async function J(e, r) {
|
|
72
|
-
return
|
|
76
|
+
return w("DELETE", e, void 0, r);
|
|
73
77
|
}
|
|
74
|
-
async function
|
|
75
|
-
const n = r.startsWith("http") ? r : `${s()}${r}`,
|
|
78
|
+
async function w(e, r, t, o) {
|
|
79
|
+
const n = r.startsWith("http") ? r : `${s()}${r}`, u = new AbortController(), i = setTimeout(() => u.abort(), d.timeout);
|
|
76
80
|
try {
|
|
77
|
-
const
|
|
81
|
+
const c = await fetch(n, {
|
|
78
82
|
method: e,
|
|
79
83
|
headers: {
|
|
80
84
|
"Content-Type": "application/json",
|
|
@@ -82,34 +86,34 @@ async function g(e, r, t, o) {
|
|
|
82
86
|
},
|
|
83
87
|
body: t ? JSON.stringify(t) : void 0,
|
|
84
88
|
credentials: "include",
|
|
85
|
-
signal:
|
|
89
|
+
signal: u.signal,
|
|
86
90
|
...o
|
|
87
91
|
});
|
|
88
|
-
if (clearTimeout(
|
|
89
|
-
const f = await
|
|
90
|
-
f.error || f.message || `HTTP ${
|
|
92
|
+
if (clearTimeout(i), !c.ok) {
|
|
93
|
+
const f = await c.json().catch(() => ({})), C = new Error(
|
|
94
|
+
f.error || f.message || `HTTP ${c.status}`
|
|
91
95
|
);
|
|
92
96
|
return d.onError(C), {
|
|
93
97
|
success: !1,
|
|
94
|
-
error: f.error || f.message || `HTTP ${
|
|
95
|
-
statusCode:
|
|
98
|
+
error: f.error || f.message || `HTTP ${c.status}`,
|
|
99
|
+
statusCode: c.status
|
|
96
100
|
};
|
|
97
101
|
}
|
|
98
102
|
return {
|
|
99
103
|
success: !0,
|
|
100
|
-
data: await
|
|
101
|
-
statusCode:
|
|
104
|
+
data: await c.json(),
|
|
105
|
+
statusCode: c.status
|
|
102
106
|
};
|
|
103
|
-
} catch (
|
|
104
|
-
clearTimeout(
|
|
105
|
-
const h =
|
|
106
|
-
return d.onError(
|
|
107
|
+
} catch (c) {
|
|
108
|
+
clearTimeout(i);
|
|
109
|
+
const h = c instanceof Error ? c.name === "AbortError" ? "Request timed out" : c.message : "Unknown error";
|
|
110
|
+
return d.onError(c instanceof Error ? c : new Error(h)), {
|
|
107
111
|
success: !1,
|
|
108
112
|
error: h
|
|
109
113
|
};
|
|
110
114
|
}
|
|
111
115
|
}
|
|
112
|
-
async function
|
|
116
|
+
async function D(e, r) {
|
|
113
117
|
try {
|
|
114
118
|
const t = await fetch(e, {
|
|
115
119
|
credentials: "include",
|
|
@@ -117,17 +121,17 @@ async function A(e, r) {
|
|
|
117
121
|
});
|
|
118
122
|
if (!t.ok) {
|
|
119
123
|
const o = await t.json().catch(() => ({}));
|
|
120
|
-
return
|
|
124
|
+
return g.error(`API request failed: ${t.status}`, o), null;
|
|
121
125
|
}
|
|
122
126
|
return t.json();
|
|
123
127
|
} catch (t) {
|
|
124
|
-
return
|
|
128
|
+
return g.error("API request error:", t), null;
|
|
125
129
|
}
|
|
126
130
|
}
|
|
127
131
|
const l = y("VC");
|
|
128
|
-
async function E(e, r
|
|
132
|
+
async function E(e, r) {
|
|
129
133
|
try {
|
|
130
|
-
const
|
|
134
|
+
const t = await fetch(
|
|
131
135
|
`${b()}/cart/${e}/payment-intent`,
|
|
132
136
|
{
|
|
133
137
|
method: "POST",
|
|
@@ -136,19 +140,18 @@ async function E(e, r, t) {
|
|
|
136
140
|
},
|
|
137
141
|
credentials: "include",
|
|
138
142
|
body: JSON.stringify({
|
|
139
|
-
productQuantities: r
|
|
140
|
-
...t && Object.keys(t).length > 0 ? { donationAmounts: t } : {}
|
|
143
|
+
productQuantities: r
|
|
141
144
|
})
|
|
142
145
|
}
|
|
143
146
|
);
|
|
144
|
-
if (!
|
|
145
|
-
const
|
|
146
|
-
throw l.error("Payment intent creation failed:",
|
|
147
|
+
if (!t.ok) {
|
|
148
|
+
const n = await t.json().catch(() => ({}));
|
|
149
|
+
throw l.error("Payment intent creation failed:", n), new Error(n.error || "Failed to create payment intent");
|
|
147
150
|
}
|
|
148
|
-
const
|
|
149
|
-
return l.debug("Payment intent created:",
|
|
150
|
-
} catch (
|
|
151
|
-
return l.error("createPaymentIntent error:",
|
|
151
|
+
const o = await t.json();
|
|
152
|
+
return l.debug("Payment intent created:", o), o;
|
|
153
|
+
} catch (t) {
|
|
154
|
+
return l.error("createPaymentIntent error:", t), null;
|
|
152
155
|
}
|
|
153
156
|
}
|
|
154
157
|
async function W(e) {
|
|
@@ -173,7 +176,7 @@ async function W(e) {
|
|
|
173
176
|
return l.error("Error completing reservation:", r), { success: !1, error: "Network error completing reservation" };
|
|
174
177
|
}
|
|
175
178
|
}
|
|
176
|
-
async function
|
|
179
|
+
async function G(e) {
|
|
177
180
|
try {
|
|
178
181
|
const r = await fetch(
|
|
179
182
|
`${s()}/orders/cancel/${e}`,
|
|
@@ -195,7 +198,7 @@ async function O(e) {
|
|
|
195
198
|
return l.error("Error cancelling reservation:", r), { success: !1, error: "Network error cancelling reservation" };
|
|
196
199
|
}
|
|
197
200
|
}
|
|
198
|
-
async function
|
|
201
|
+
async function O(e, r) {
|
|
199
202
|
try {
|
|
200
203
|
const t = await fetch(`${s()}/orders/create`, {
|
|
201
204
|
method: "POST",
|
|
@@ -217,7 +220,7 @@ async function G(e, r) {
|
|
|
217
220
|
}
|
|
218
221
|
}
|
|
219
222
|
async function Q(e) {
|
|
220
|
-
return
|
|
223
|
+
return D(`${s()}/orders/${e}`);
|
|
221
224
|
}
|
|
222
225
|
async function K(e, r) {
|
|
223
226
|
try {
|
|
@@ -321,7 +324,7 @@ async function V(e) {
|
|
|
321
324
|
l.error("UTM tracking failed:", o);
|
|
322
325
|
}
|
|
323
326
|
}
|
|
324
|
-
const
|
|
327
|
+
const $ = y("VC");
|
|
325
328
|
async function ee(e, r) {
|
|
326
329
|
try {
|
|
327
330
|
if (!r || !r.trim())
|
|
@@ -342,7 +345,7 @@ async function ee(e, r) {
|
|
|
342
345
|
code: n.code || r
|
|
343
346
|
};
|
|
344
347
|
} catch (t) {
|
|
345
|
-
return
|
|
348
|
+
return $.error("Error validating promo code:", t), { valid: !1, error: "Network error validating code" };
|
|
346
349
|
}
|
|
347
350
|
}
|
|
348
351
|
async function re(e) {
|
|
@@ -352,7 +355,7 @@ async function re(e) {
|
|
|
352
355
|
);
|
|
353
356
|
return r.ok ? (await r.json()).hasPromoCodes === !0 : !0;
|
|
354
357
|
} catch (r) {
|
|
355
|
-
return
|
|
358
|
+
return $.error("Error checking promo codes availability:", r), !0;
|
|
356
359
|
}
|
|
357
360
|
}
|
|
358
361
|
async function te(e, r) {
|
|
@@ -372,7 +375,7 @@ async function te(e, r) {
|
|
|
372
375
|
error: (await t.json().catch(() => ({}))).error || "Failed to apply promo code"
|
|
373
376
|
};
|
|
374
377
|
} catch (t) {
|
|
375
|
-
return
|
|
378
|
+
return $.error("Error applying promo code:", t), { success: !1, error: "Network error applying code" };
|
|
376
379
|
}
|
|
377
380
|
}
|
|
378
381
|
async function oe(e) {
|
|
@@ -391,7 +394,7 @@ async function oe(e) {
|
|
|
391
394
|
error: (await r.json().catch(() => ({}))).error || "Failed to remove promo code"
|
|
392
395
|
};
|
|
393
396
|
} catch (r) {
|
|
394
|
-
return
|
|
397
|
+
return $.error("Error removing promo code:", r), { success: !1, error: "Network error removing code" };
|
|
395
398
|
}
|
|
396
399
|
}
|
|
397
400
|
const a = y("VC");
|
|
@@ -666,17 +669,17 @@ function S(e) {
|
|
|
666
669
|
return "ended";
|
|
667
670
|
const t = e.startDateTime || e.start_date_time || e.date;
|
|
668
671
|
if (t) {
|
|
669
|
-
const
|
|
670
|
-
if (
|
|
672
|
+
const i = new Date(t).getTime(), c = Date.now();
|
|
673
|
+
if (i < c)
|
|
671
674
|
return "ended";
|
|
672
675
|
}
|
|
673
676
|
const o = e.ticketsAvailable ?? e.tickets_available;
|
|
674
677
|
if (o !== void 0)
|
|
675
678
|
return o <= 0 ? "sold_out" : "available";
|
|
676
679
|
const n = e.availableTickets || e.available_tickets || e.tickets || [];
|
|
677
|
-
return n.length === 0 ? "coming_soon" : n.reduce((
|
|
678
|
-
const h =
|
|
679
|
-
return
|
|
680
|
+
return n.length === 0 ? "coming_soon" : n.reduce((i, c) => {
|
|
681
|
+
const h = c.quantityAvailable ?? c.quantity_available ?? c.quantity ?? 0, f = c.quantitySold ?? c.quantity_sold ?? 0;
|
|
682
|
+
return i + Math.max(0, h - f);
|
|
680
683
|
}, 0) <= 0 ? "sold_out" : "available";
|
|
681
684
|
}
|
|
682
685
|
function F(e) {
|
|
@@ -700,7 +703,7 @@ function F(e) {
|
|
|
700
703
|
};
|
|
701
704
|
}
|
|
702
705
|
function U(e) {
|
|
703
|
-
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(F), o = t.map((
|
|
706
|
+
const t = (e.availableTickets || e.available_tickets || e.tickets || []).map(F), o = t.map((i) => i.price).filter((i) => i > 0), n = o.length > 0 ? Math.min(...o) : void 0, u = o.length > 0 ? Math.max(...o) : void 0;
|
|
704
707
|
return {
|
|
705
708
|
eventID: e.eventID || e.id || e.ID || 0,
|
|
706
709
|
id: e.id || e.ID,
|
|
@@ -723,10 +726,10 @@ function U(e) {
|
|
|
723
726
|
isPublished: e.isPublished ?? e.is_published,
|
|
724
727
|
isCancelled: e.isCancelled ?? e.is_cancelled,
|
|
725
728
|
availableTickets: t,
|
|
726
|
-
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? t.reduce((
|
|
729
|
+
ticketsAvailable: e.ticketsAvailable ?? e.tickets_available ?? t.reduce((i, c) => i + (c.quantityAvailable || 0), 0),
|
|
727
730
|
ticketsSold: e.ticketsSold ?? e.tickets_sold,
|
|
728
731
|
minPrice: e.minPrice ?? e.min_price ?? n,
|
|
729
|
-
maxPrice: e.maxPrice ?? e.max_price ??
|
|
732
|
+
maxPrice: e.maxPrice ?? e.max_price ?? u,
|
|
730
733
|
ctaText: e.ctaText || e.cta_text,
|
|
731
734
|
ctaState: S(e),
|
|
732
735
|
showPerformers: e.showPerformers ?? e.show_performers,
|
|
@@ -765,7 +768,7 @@ function Ce(e) {
|
|
|
765
768
|
taxPercentage: e.taxPercentage ?? e.tax_percentage ?? 0
|
|
766
769
|
};
|
|
767
770
|
}
|
|
768
|
-
function
|
|
771
|
+
function Ae(e) {
|
|
769
772
|
return [
|
|
770
773
|
e.address,
|
|
771
774
|
e.city,
|
|
@@ -775,17 +778,17 @@ function De(e) {
|
|
|
775
778
|
}
|
|
776
779
|
export {
|
|
777
780
|
J as apiDelete,
|
|
778
|
-
|
|
781
|
+
M as apiGet,
|
|
779
782
|
B as apiPost,
|
|
780
783
|
H as apiPut,
|
|
781
784
|
te as applyPromoCode,
|
|
782
785
|
S as calculateCtaState,
|
|
783
|
-
|
|
786
|
+
G as cancelReservation,
|
|
784
787
|
ye as checkCollectionPassword,
|
|
785
788
|
ge as checkEventPassword,
|
|
786
789
|
W as completeReservation,
|
|
787
|
-
|
|
788
|
-
|
|
790
|
+
p as configureApi,
|
|
791
|
+
O as createOrder,
|
|
789
792
|
E as createPaymentIntent,
|
|
790
793
|
X as extendCheckoutSession,
|
|
791
794
|
Ce as extractVenueFees,
|
|
@@ -797,12 +800,12 @@ export {
|
|
|
797
800
|
fe as fetchSeriesOccurrences,
|
|
798
801
|
me as fetchSeriesPage,
|
|
799
802
|
ie as fetchVenueEvents,
|
|
800
|
-
|
|
801
|
-
|
|
803
|
+
Ae as formatVenueAddress,
|
|
804
|
+
z as getApiConfig,
|
|
802
805
|
x as getCDNImageUrl,
|
|
803
|
-
|
|
806
|
+
T as getClientIP,
|
|
804
807
|
v as getEventImageUrl,
|
|
805
|
-
|
|
808
|
+
R as getLegacyPublicUrl,
|
|
806
809
|
ue as getMonthEvents,
|
|
807
810
|
Q as getOrder,
|
|
808
811
|
b as getOrdersV2Url,
|