@getmicdrop/venue-calendar 4.3.0 → 4.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{Badge-XNQHeoZJ.js → Badge-Gg5PWs7f.js} +39 -60
- package/dist/Calendar-bhl8Q8us.js +1332 -0
- package/dist/{CalendarFoundryView-9LW4nveh.js → CalendarFoundryView-C2O_AmBk.js} +5881 -5311
- package/dist/CartView-D57bwixz.js +2245 -0
- package/dist/{Checkbox-BexPyTGk.js → Checkbox-24CWEsty.js} +1 -1
- package/dist/{Checkout-D_oRIhxJ.js → Checkout-BqaJK6UP.js} +136 -135
- package/dist/{Checkout-C6xmGlWs.js → Checkout-DQWeMchu.js} +100 -100
- package/dist/{CollectionView-BdVW1cJz.js → CollectionView-B-PR54hU.js} +3 -3
- package/dist/CropImage-CxLcNArr.js +445 -0
- package/dist/{Event-I5Wu3_AC.js → Event-DxNC58Zb.js} +327 -325
- package/dist/{EventPage-BjrFGlDJ.js → EventPage-Y3NWzmN0.js} +38 -38
- package/dist/{Heading-KNE3t6AC.js → Heading-cKAx0Ogl.js} +3 -1
- package/dist/Input-D1FpSX5Q.js +292 -0
- package/dist/{Modal-c4rwVXSs.js → Modal-LkN8lh_m.js} +5 -2
- package/dist/ModalFooter-B_8f1Z5p.js +301 -0
- package/dist/{PasswordInput-Dm4Z88em.js → PasswordInput-Bt6tvpzi.js} +19 -15
- package/dist/{ScarcityBadge-DMI7KfDF.js → ScarcityBadge-g0dRh6K7.js} +1 -1
- package/dist/{SeriesPage-BQGc51bF.js → SeriesPage-D2305oP-.js} +2 -2
- package/dist/{Spinner-C8M6STFM.js → Spinner-LroI7eOC.js} +1 -1
- package/dist/{Success-CxJiJEdx.js → Success-ClXshzvl.js} +1 -1
- package/dist/{ViewTicketsEmbed-D-w4zHtm.js → ViewTicketsEmbed-CvuMdTA7.js} +4 -4
- package/dist/{browser-By3zPFZd.js → browser-viCaCwoW.js} +1 -1
- package/dist/imageOptimizer-BwLwBMI6.js +112 -0
- package/dist/keyboard-fiZFqeNA.js +29 -0
- package/dist/{modalManager.svelte-CQrpnx4J.js → modalManager.svelte-B9mhX1cG.js} +1 -1
- package/dist/{phoneUtils-by0RmQv1.js → phoneUtils-C2GGZYvA.js} +319 -319
- package/dist/portal-DqxEuE-7.js +166 -0
- package/dist/{to-event-card-props-BdO47New.js → to-event-card-props-dIhKdERf.js} +103 -97
- package/dist/types/index.d.ts +11 -0
- package/dist/venue-calendar.css +1 -1
- package/dist/venue-calendar.es.js +1053 -969
- package/dist/venue-calendar.iife.js +60 -60
- package/dist/venue-calendar.umd.js +57 -57
- package/dist/z-index-BgKs9X9U.js +225 -0
- package/package.json +220 -220
- package/dist/Calendar-C5tzjUQM.js +0 -1333
- package/dist/CartView-C4Fpn8mC.js +0 -2245
- package/dist/CropImage-D70HuWqC.js +0 -404
- package/dist/Input-Docb71Sc.js +0 -489
- package/dist/ModalFooter-CFgAtDI3.js +0 -464
- package/dist/imageOptimizer-CB3wKJU8.js +0 -47
- package/dist/z-index-B0Vk_Mp1.js +0 -27
- /package/dist/locales/{4.3.0 → 4.3.2}/flow/de.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/flow/es.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/flow/fr.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/flow/id.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/flow/it.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/flow/ja.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/flow/ko.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/flow/nl.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/flow/pl.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/flow/pt-br.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/flow/tr.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/flow/zh.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/main/de.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/main/es.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/main/fr.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/main/id.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/main/it.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/main/ja.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/main/ko.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/main/nl.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/main/pl.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/main/pt-br.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/main/tr.js +0 -0
- /package/dist/locales/{4.3.0 → 4.3.2}/main/zh.js +0 -0
|
@@ -0,0 +1,166 @@
|
|
|
1
|
+
import { getContext as e, setContext as t } from "svelte";
|
|
2
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/utils/focusTrap.js
|
|
3
|
+
function n(e, t = {}) {
|
|
4
|
+
let n = [
|
|
5
|
+
"a[href]",
|
|
6
|
+
"area[href]",
|
|
7
|
+
"input:not([disabled]):not([type=\"hidden\"])",
|
|
8
|
+
"select:not([disabled])",
|
|
9
|
+
"textarea:not([disabled])",
|
|
10
|
+
"button:not([disabled])",
|
|
11
|
+
"[tabindex]:not([tabindex=\"-1\"])",
|
|
12
|
+
"[contenteditable]",
|
|
13
|
+
"audio[controls]",
|
|
14
|
+
"video[controls]",
|
|
15
|
+
"details>summary:first-of-type",
|
|
16
|
+
"details"
|
|
17
|
+
].join(","), r = t.enabled ?? !0, i = t.returnFocusTo ?? null, a = null;
|
|
18
|
+
function o() {
|
|
19
|
+
return Array.from(e.querySelectorAll(n)).filter((e) => !e.hasAttribute("disabled") && e.tabIndex !== -1 && s(e));
|
|
20
|
+
}
|
|
21
|
+
function s(e) {
|
|
22
|
+
return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length);
|
|
23
|
+
}
|
|
24
|
+
function c(e) {
|
|
25
|
+
if (!r || e.key !== "Tab") return;
|
|
26
|
+
let t = o();
|
|
27
|
+
if (t.length === 0) return;
|
|
28
|
+
let n = t[0], i = t[t.length - 1];
|
|
29
|
+
e.shiftKey ? document.activeElement === n && (e.preventDefault(), i.focus()) : document.activeElement === i && (e.preventDefault(), n.focus());
|
|
30
|
+
}
|
|
31
|
+
function l() {
|
|
32
|
+
if (!r) return;
|
|
33
|
+
a = document.activeElement;
|
|
34
|
+
let t = o();
|
|
35
|
+
t.length > 0 ? requestAnimationFrame(() => {
|
|
36
|
+
t[0].focus();
|
|
37
|
+
}) : (e.setAttribute("tabindex", "-1"), e.focus()), document.addEventListener("keydown", c);
|
|
38
|
+
}
|
|
39
|
+
function u() {
|
|
40
|
+
document.removeEventListener("keydown", c);
|
|
41
|
+
let e = i || a;
|
|
42
|
+
e && typeof e.focus == "function" && e.focus();
|
|
43
|
+
}
|
|
44
|
+
return r && l(), {
|
|
45
|
+
update(e) {
|
|
46
|
+
let t = e.enabled ?? !0;
|
|
47
|
+
i = e.returnFocusTo ?? null, t !== r && (r = t, r ? l() : u());
|
|
48
|
+
},
|
|
49
|
+
destroy() {
|
|
50
|
+
u();
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/utils/body-scroll-lock.js
|
|
56
|
+
var r = 0, i = 0;
|
|
57
|
+
function a() {
|
|
58
|
+
if (typeof document > "u") return () => {};
|
|
59
|
+
if (r++, r === 1) {
|
|
60
|
+
i = window.scrollY;
|
|
61
|
+
let e = window.innerWidth - document.documentElement.clientWidth;
|
|
62
|
+
document.body.style.position = "fixed", document.body.style.top = `-${i}px`, document.body.style.left = "0", document.body.style.right = "0", document.body.style.overflow = "hidden", document.body.style.paddingRight = `${e}px`;
|
|
63
|
+
}
|
|
64
|
+
let e = !1;
|
|
65
|
+
return () => {
|
|
66
|
+
e || (e = !0, r--, !(r > 0) && (document.body.style.position = "", document.body.style.top = "", document.body.style.left = "", document.body.style.right = "", document.body.style.overflow = "", document.body.style.paddingRight = "", window.scrollTo(0, i)));
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
//#endregion
|
|
70
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/utils/portalContainment.js
|
|
71
|
+
var o = Symbol("portal-containment");
|
|
72
|
+
function s(e) {
|
|
73
|
+
t(o, e);
|
|
74
|
+
}
|
|
75
|
+
function c() {
|
|
76
|
+
try {
|
|
77
|
+
return e(o);
|
|
78
|
+
} catch {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
var l = [], u = /* @__PURE__ */ new Set(), d = !1, f = !1;
|
|
83
|
+
function p() {
|
|
84
|
+
if (d) {
|
|
85
|
+
f = !0;
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
d = !0;
|
|
89
|
+
try {
|
|
90
|
+
let e = 0;
|
|
91
|
+
do {
|
|
92
|
+
f = !1;
|
|
93
|
+
for (let e of u) e();
|
|
94
|
+
e += 1;
|
|
95
|
+
} while (f && e < 5);
|
|
96
|
+
} finally {
|
|
97
|
+
d = !1;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
function m() {
|
|
101
|
+
p();
|
|
102
|
+
}
|
|
103
|
+
function h(e) {
|
|
104
|
+
l.push(e), p();
|
|
105
|
+
let t = !1;
|
|
106
|
+
return () => {
|
|
107
|
+
if (t) return;
|
|
108
|
+
t = !0;
|
|
109
|
+
let n = l.lastIndexOf(e);
|
|
110
|
+
n !== -1 && l.splice(n, 1), p();
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
function g() {
|
|
114
|
+
return l.length > 0;
|
|
115
|
+
}
|
|
116
|
+
function _(e) {
|
|
117
|
+
return l.some((t) => t === e || t.contains(e));
|
|
118
|
+
}
|
|
119
|
+
function v(e) {
|
|
120
|
+
return u.add(e), () => {
|
|
121
|
+
u.delete(e);
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
//#endregion
|
|
125
|
+
//#region node_modules/@getmicdrop/svelte-components/dist/utils/portal.js
|
|
126
|
+
function y(e, t) {
|
|
127
|
+
let n = c(), r = t, i = e.parentNode;
|
|
128
|
+
function a() {
|
|
129
|
+
return e.getAttribute?.("aria-modal") === "true" || e.querySelector?.("[aria-modal=\"true\"]") !== null;
|
|
130
|
+
}
|
|
131
|
+
function o() {
|
|
132
|
+
if (r) return r;
|
|
133
|
+
let t = n?.target;
|
|
134
|
+
return t && t !== e && !e.contains(t) && t.contains(i) && !a() ? t : document.body;
|
|
135
|
+
}
|
|
136
|
+
let s = e.hasAttribute?.("data-theme"), l;
|
|
137
|
+
function u(t) {
|
|
138
|
+
if (s) return;
|
|
139
|
+
l?.disconnect(), l = void 0;
|
|
140
|
+
let n = i?.closest?.("[data-theme]");
|
|
141
|
+
n && t && !n.contains(t) ? (e.dataset.theme = n.dataset.theme, typeof MutationObserver < "u" && (l = new MutationObserver(() => u(e.parentNode)), l.observe(n, {
|
|
142
|
+
attributes: !0,
|
|
143
|
+
attributeFilter: ["data-theme"]
|
|
144
|
+
}))) : e.removeAttribute?.("data-theme");
|
|
145
|
+
}
|
|
146
|
+
function d() {
|
|
147
|
+
let t = o();
|
|
148
|
+
e.parentNode !== t && (t.appendChild(e), u(t), m());
|
|
149
|
+
}
|
|
150
|
+
let f = n ? v(d) : void 0, p = n && typeof MutationObserver < "u" ? new MutationObserver(d) : void 0;
|
|
151
|
+
return p?.observe(e, {
|
|
152
|
+
childList: !0,
|
|
153
|
+
subtree: !0,
|
|
154
|
+
attributes: !0,
|
|
155
|
+
attributeFilter: ["aria-modal"]
|
|
156
|
+
}), d(), {
|
|
157
|
+
update(e) {
|
|
158
|
+
r = e || void 0, d();
|
|
159
|
+
},
|
|
160
|
+
destroy() {
|
|
161
|
+
f?.(), p?.disconnect(), l?.disconnect(), e.parentNode && e.parentNode.removeChild(e);
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
export { v as a, a as c, _ as i, n as l, c as n, h as o, g as r, s, y as t };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { _ as e } from "./Button-Cm6xkipe.js";
|
|
2
2
|
import { D as t, b as n, h as r, i, t as a, v as o } from "./defaultLabels-BigaGqKj.js";
|
|
3
3
|
import { a as s, i as c, r as l, u } from "./constants-PBNG9ikv.js";
|
|
4
|
-
import { t as d } from "./Badge-
|
|
4
|
+
import { t as d } from "./Badge-Gg5PWs7f.js";
|
|
5
5
|
import "svelte/internal/disclose-version";
|
|
6
6
|
import * as f from "svelte/internal/client";
|
|
7
7
|
//#region node_modules/@getmicdrop/svelte-components/dist/primitives/BlurBackdropImage/BlurBackdropImage.svelte
|
|
@@ -143,62 +143,67 @@ var b = {
|
|
|
143
143
|
function S() {
|
|
144
144
|
return x += 1;
|
|
145
145
|
}
|
|
146
|
-
var C = f.from_html("<span class=\"event-card__badge svelte-18ndok6\"><!></span>"),
|
|
147
|
-
function
|
|
146
|
+
var C = f.from_html("<div class=\"event-card__poster w-full aspect-video bg-muted shrink-0 overflow-hidden svelte-18ndok6\"><!></div>"), w = f.from_html("<span class=\"event-card__badge svelte-18ndok6\"><!></span>"), T = f.from_html("<span> </span>"), E = f.from_html("<div class=\"event-card__pills flex flex-wrap gap-2 relative svelte-18ndok6\"></div>"), D = f.from_html("<p class=\"event-card__description type-body tone-secondary m-0 svelte-18ndok6\"> </p>"), O = f.from_html("<article class=\"event-card relative rounded-lg border bg-card border-border overflow-hidden flex flex-col svelte-18ndok6\"><!> <div class=\"event-card__content flex flex-col flex-1 min-w-0 svelte-18ndok6\"><header class=\"event-card__header\"><h3><!> <a class=\"event-card__title-link svelte-18ndok6\" rel=\"external\"> </a></h3></header> <!> <!> <!></div></article>");
|
|
147
|
+
function k(t, n) {
|
|
148
148
|
f.push(n, !0);
|
|
149
|
-
let r = f.prop(n, "layout", 3, "vertical"), a = f.prop(n, "density", 3, "standard"), o = f.prop(n, "imageUrl", 3, ""), s = f.prop(n, "placeholderImage", 3, ""), c = f.prop(n, "dateLabel", 3, ""),
|
|
150
|
-
function
|
|
149
|
+
let r = f.prop(n, "layout", 3, "vertical"), a = f.prop(n, "density", 3, "standard"), o = f.prop(n, "imageUrl", 3, ""), s = f.prop(n, "placeholderImage", 3, ""), c = f.prop(n, "hidePoster", 3, !1), l = f.prop(n, "dateLabel", 3, ""), u = f.prop(n, "description", 3, ""), p = f.prop(n, "badge", 3, null), m = f.prop(n, "pills", 19, () => []), h = f.prop(n, "pillVariant", 3, "alternative"), _ = f.prop(n, "showDescription", 3, !1), v = f.prop(n, "hideDate", 3, !1), y = f.derived(() => b[a()]), x = `event-card-title-${S()}`, k = f.derived(() => _() && !!u() && (a() === "standard" || a() === "featured")), A = f.derived(() => !v() && a() !== "micro" && !!l());
|
|
150
|
+
function j(e, t) {
|
|
151
151
|
t.metaKey || t.ctrlKey || t.shiftKey || t.altKey || n.onpillclick && (t.preventDefault(), t.stopPropagation(), n.onpillclick(e));
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function M(e) {
|
|
154
154
|
e.metaKey || e.ctrlKey || e.shiftKey || e.altKey || n.onclick && (e.preventDefault(), n.onclick());
|
|
155
155
|
}
|
|
156
|
-
var
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
156
|
+
var N = O(), P = f.child(N), F = (e) => {
|
|
157
|
+
var t = C();
|
|
158
|
+
g(f.child(t), {
|
|
159
|
+
get src() {
|
|
160
|
+
return o();
|
|
161
|
+
},
|
|
162
|
+
get fallback() {
|
|
163
|
+
return s();
|
|
164
|
+
},
|
|
165
|
+
class: "event-card__poster-fill"
|
|
166
|
+
}), f.reset(t), f.append(e, t);
|
|
167
|
+
};
|
|
168
|
+
f.if(P, (e) => {
|
|
169
|
+
c() || e(F);
|
|
170
|
+
});
|
|
171
|
+
var I = f.sibling(P, 2), L = f.child(I), R = f.child(L), z = f.child(R), B = (e) => {
|
|
172
|
+
var t = w(), n = f.child(t);
|
|
168
173
|
d(n, {
|
|
169
174
|
get variant() {
|
|
170
|
-
return
|
|
175
|
+
return p().variant;
|
|
171
176
|
},
|
|
172
177
|
get size() {
|
|
173
|
-
return f.get(
|
|
178
|
+
return f.get(y).badgeSize;
|
|
174
179
|
},
|
|
175
180
|
children: (e, t) => {
|
|
176
181
|
f.next();
|
|
177
182
|
var n = f.text();
|
|
178
|
-
f.template_effect(() => f.set_text(n,
|
|
183
|
+
f.template_effect(() => f.set_text(n, p().text)), f.append(e, n);
|
|
179
184
|
},
|
|
180
185
|
$$slots: { default: !0 }
|
|
181
186
|
}), f.reset(t), f.append(e, t);
|
|
182
187
|
};
|
|
183
|
-
f.if(
|
|
184
|
-
|
|
188
|
+
f.if(z, (e) => {
|
|
189
|
+
p() && e(B);
|
|
185
190
|
});
|
|
186
|
-
var
|
|
187
|
-
f.reset(
|
|
188
|
-
var
|
|
189
|
-
var n =
|
|
191
|
+
var V = f.sibling(z, 2), H = f.child(V, !0);
|
|
192
|
+
f.reset(V), f.reset(R), f.reset(L);
|
|
193
|
+
var U = f.sibling(L, 2), W = (t) => {
|
|
194
|
+
var n = T(), r = f.child(n, !0);
|
|
190
195
|
f.reset(n), f.template_effect(() => {
|
|
191
|
-
f.set_class(n, 1, `event-card__date tone-secondary ${e.emphasis ?? ""}`, "svelte-18ndok6"), f.set_text(r,
|
|
196
|
+
f.set_class(n, 1, `event-card__date tone-secondary ${e.emphasis ?? ""}`, "svelte-18ndok6"), f.set_text(r, l());
|
|
192
197
|
}), f.append(t, n);
|
|
193
198
|
};
|
|
194
|
-
f.if(
|
|
195
|
-
f.get(
|
|
199
|
+
f.if(U, (e) => {
|
|
200
|
+
f.get(A) && e(W);
|
|
196
201
|
});
|
|
197
|
-
var
|
|
198
|
-
var t =
|
|
199
|
-
f.each(t, 21,
|
|
202
|
+
var G = f.sibling(U, 2), K = (e) => {
|
|
203
|
+
var t = E();
|
|
204
|
+
f.each(t, 21, m, f.index, (e, t, n) => {
|
|
200
205
|
{
|
|
201
|
-
let r = f.derived(() =>
|
|
206
|
+
let r = f.derived(() => h() === "primary" ? "default" : "alternative"), a = f.derived(() => f.get(t).ariaLabel ?? f.get(t).timeLabel);
|
|
202
207
|
i(e, {
|
|
203
208
|
get href() {
|
|
204
209
|
return f.get(t).href;
|
|
@@ -207,9 +212,9 @@ function O(t, n) {
|
|
|
207
212
|
return f.get(r);
|
|
208
213
|
},
|
|
209
214
|
get size() {
|
|
210
|
-
return f.get(
|
|
215
|
+
return f.get(y).pillSize;
|
|
211
216
|
},
|
|
212
|
-
onclick: (e) =>
|
|
217
|
+
onclick: (e) => j(n, e),
|
|
213
218
|
get "aria-label"() {
|
|
214
219
|
return f.get(a);
|
|
215
220
|
},
|
|
@@ -223,42 +228,42 @@ function O(t, n) {
|
|
|
223
228
|
}
|
|
224
229
|
}), f.reset(t), f.append(e, t);
|
|
225
230
|
};
|
|
226
|
-
f.if(
|
|
227
|
-
|
|
231
|
+
f.if(G, (e) => {
|
|
232
|
+
m().length > 0 && e(K);
|
|
228
233
|
});
|
|
229
|
-
var
|
|
230
|
-
var t =
|
|
231
|
-
f.reset(t), f.template_effect(() => f.set_text(n,
|
|
234
|
+
var q = f.sibling(G, 2), J = (e) => {
|
|
235
|
+
var t = D(), n = f.child(t, !0);
|
|
236
|
+
f.reset(t), f.template_effect(() => f.set_text(n, u())), f.append(e, t);
|
|
232
237
|
};
|
|
233
|
-
f.if(
|
|
234
|
-
f.get(
|
|
235
|
-
}), f.reset(
|
|
236
|
-
f.set_attribute(
|
|
237
|
-
}), f.delegated("click",
|
|
238
|
+
f.if(q, (e) => {
|
|
239
|
+
f.get(k) && e(J);
|
|
240
|
+
}), f.reset(I), f.reset(N), f.template_effect(() => {
|
|
241
|
+
f.set_attribute(N, "data-layout", r()), f.set_attribute(N, "data-density", a()), f.set_attribute(N, "data-hide-poster", c()), f.set_attribute(N, "aria-labelledby", x), f.set_class(R, 1, `event-card__title ${e.strong ?? ""} tone-primary m-0`, "svelte-18ndok6"), f.set_attribute(R, "id", x), f.set_attribute(V, "href", n.href), f.set_attribute(V, "aria-label", n.ariaLabel ?? n.title), f.set_text(H, n.title);
|
|
242
|
+
}), f.delegated("click", V, M), f.append(t, N), f.pop();
|
|
238
243
|
}
|
|
239
244
|
f.delegate(["click"]);
|
|
240
245
|
//#endregion
|
|
241
246
|
//#region node_modules/@getmicdrop/svelte-components/dist/routing/slug.js
|
|
242
|
-
var
|
|
243
|
-
function
|
|
244
|
-
return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0,
|
|
247
|
+
var A = 70;
|
|
248
|
+
function j(e) {
|
|
249
|
+
return e.normalize("NFKD").replace(/[\u0300-\u036f]/g, "").toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "").slice(0, A).replace(/-+$/g, "");
|
|
245
250
|
}
|
|
246
251
|
//#endregion
|
|
247
252
|
//#region src/lib/url-manager/params.ts
|
|
248
|
-
function
|
|
253
|
+
function M(e) {
|
|
249
254
|
let t = e.indexOf("-"), n = t === -1 ? e : e.substring(0, t);
|
|
250
255
|
return /^\d+$/.test(n) ? {
|
|
251
256
|
id: n,
|
|
252
257
|
slug: t === -1 ? "" : e.substring(t + 1)
|
|
253
258
|
} : null;
|
|
254
259
|
}
|
|
255
|
-
function
|
|
256
|
-
let t = e.id || e.eventID || 0, n = e.slug ||
|
|
260
|
+
function N(e) {
|
|
261
|
+
let t = e.id || e.eventID || 0, n = e.slug || j(e.name || "");
|
|
257
262
|
return `#${t}${n ? "-" + n : ""}`;
|
|
258
263
|
}
|
|
259
264
|
//#endregion
|
|
260
265
|
//#region src/lib/browse-widgets/utils.ts
|
|
261
|
-
function
|
|
266
|
+
function P(e) {
|
|
262
267
|
let t = /* @__PURE__ */ new Map(), n = [];
|
|
263
268
|
for (let r of e) {
|
|
264
269
|
let e = r.eventSeriesId;
|
|
@@ -280,7 +285,7 @@ function N(e) {
|
|
|
280
285
|
}
|
|
281
286
|
//#endregion
|
|
282
287
|
//#region src/lib/browse-widgets/defaults.ts
|
|
283
|
-
var
|
|
288
|
+
var F = [
|
|
284
289
|
"cancelled",
|
|
285
290
|
"postponed",
|
|
286
291
|
"past",
|
|
@@ -291,18 +296,18 @@ var P = [
|
|
|
291
296
|
];
|
|
292
297
|
//#endregion
|
|
293
298
|
//#region src/lib/browse-widgets/status.ts
|
|
294
|
-
function
|
|
299
|
+
function I(e) {
|
|
295
300
|
return e.toLowerCase().replace(/[\s_-]+/g, "");
|
|
296
301
|
}
|
|
297
|
-
function
|
|
298
|
-
if (
|
|
302
|
+
function L(e) {
|
|
303
|
+
if (I(e.status) !== "onsale" || e.ticketsRemaining == null || e.ticketsTotal == null || e.ticketsTotal === 0 || e.ticketsRemaining <= 0) return !1;
|
|
299
304
|
let t = l(e.ticketsRemaining, e.ticketsTotal);
|
|
300
305
|
return t === "low" || t === "urgent";
|
|
301
306
|
}
|
|
302
|
-
function
|
|
307
|
+
function R(e, i) {
|
|
303
308
|
if (!e) return null;
|
|
304
|
-
let a =
|
|
305
|
-
for (let o of
|
|
309
|
+
let a = I(e.status ?? "");
|
|
310
|
+
for (let o of F) switch (o) {
|
|
306
311
|
case "cancelled":
|
|
307
312
|
if (a === "cancelled" || a === "canceled") return {
|
|
308
313
|
text: i?.statusCancelled || "Cancelled",
|
|
@@ -342,36 +347,36 @@ function L(e, i) {
|
|
|
342
347
|
type: "coming_soon"
|
|
343
348
|
};
|
|
344
349
|
break;
|
|
345
|
-
case "scarcity": if (
|
|
350
|
+
case "scarcity": if (L(e)) return {
|
|
346
351
|
text: i?.statusSellingFast || "Selling fast",
|
|
347
352
|
type: "scarcity"
|
|
348
353
|
};
|
|
349
354
|
}
|
|
350
355
|
return null;
|
|
351
356
|
}
|
|
352
|
-
function
|
|
357
|
+
function z(e, t) {
|
|
353
358
|
if (e.length === 0) return null;
|
|
354
|
-
if (e.length === 1) return
|
|
355
|
-
let n = e.map((e) =>
|
|
359
|
+
if (e.length === 1) return R(e[0], t);
|
|
360
|
+
let n = e.map((e) => R(e, t));
|
|
356
361
|
if (n.every((e) => e?.type === "cancelled")) return {
|
|
357
362
|
type: "cancelled",
|
|
358
|
-
text:
|
|
363
|
+
text: B("cancelled", t)
|
|
359
364
|
};
|
|
360
365
|
if (n.every((e) => e?.type === "postponed")) return {
|
|
361
366
|
type: "postponed",
|
|
362
|
-
text:
|
|
367
|
+
text: B("postponed", t)
|
|
363
368
|
};
|
|
364
369
|
if (n.every((e) => e?.type === "sold_out")) return {
|
|
365
370
|
type: "sold_out",
|
|
366
|
-
text:
|
|
371
|
+
text: B("sold_out", t)
|
|
367
372
|
};
|
|
368
373
|
let r = n.filter((e) => e?.type !== "sold_out" && e?.type !== "cancelled" && e?.type !== "postponed");
|
|
369
374
|
return r.length > 0 && r.every((e) => e?.type === "scarcity") ? {
|
|
370
375
|
type: "scarcity",
|
|
371
|
-
text:
|
|
376
|
+
text: B("scarcity", t)
|
|
372
377
|
} : null;
|
|
373
378
|
}
|
|
374
|
-
function
|
|
379
|
+
function B(e, t) {
|
|
375
380
|
switch (e) {
|
|
376
381
|
case "cancelled": return t?.statusCancelled || "Cancelled";
|
|
377
382
|
case "postponed": return t?.statusPostponed || "Postponed";
|
|
@@ -382,7 +387,7 @@ function z(e, t) {
|
|
|
382
387
|
case "scarcity": return t?.statusSellingFast || "Selling fast";
|
|
383
388
|
}
|
|
384
389
|
}
|
|
385
|
-
function
|
|
390
|
+
function V(e) {
|
|
386
391
|
switch (e) {
|
|
387
392
|
case "cancelled": return "neutral";
|
|
388
393
|
case "postponed": return "neutral";
|
|
@@ -394,52 +399,53 @@ function B(e) {
|
|
|
394
399
|
default: return "neutral";
|
|
395
400
|
}
|
|
396
401
|
}
|
|
397
|
-
function
|
|
402
|
+
function H(e) {
|
|
398
403
|
let t = o();
|
|
399
404
|
return e.filter((e) => {
|
|
400
|
-
if (
|
|
405
|
+
if (I(e.status ?? "") === "postponed") return !0;
|
|
401
406
|
let n = s(t, e.timeZone);
|
|
402
407
|
return e.date >= n;
|
|
403
408
|
}).sort((e, t) => e.date.localeCompare(t.date));
|
|
404
409
|
}
|
|
405
410
|
//#endregion
|
|
406
411
|
//#region src/lib/browse-widgets/to-event-card-props.ts
|
|
407
|
-
var
|
|
408
|
-
function
|
|
412
|
+
var U = 20;
|
|
413
|
+
function W(e, t) {
|
|
409
414
|
let n = e.ticketsRemaining ?? 0, r = e.ticketsTotal ?? 0;
|
|
410
415
|
return !r || r <= 0 ? null : n <= 0 ? {
|
|
411
416
|
text: t.statusSoldOut || "Sold out",
|
|
412
417
|
variant: "error"
|
|
413
|
-
} : n / r * 100 <=
|
|
418
|
+
} : n / r * 100 <= U ? {
|
|
414
419
|
text: t.statusSellingFast || "Selling fast",
|
|
415
420
|
variant: "warning"
|
|
416
421
|
} : null;
|
|
417
422
|
}
|
|
418
|
-
function
|
|
419
|
-
let
|
|
420
|
-
text:
|
|
421
|
-
variant:
|
|
423
|
+
function G(e, t = a, n, r = null) {
|
|
424
|
+
let i = e.event, o = e.isSeries ? z(e.instances, t) : R(i, t), s = o && o.type !== "past" ? {
|
|
425
|
+
text: o.text,
|
|
426
|
+
variant: V(o.type)
|
|
422
427
|
} : null;
|
|
423
|
-
!
|
|
424
|
-
let
|
|
425
|
-
let
|
|
428
|
+
!s && !e.isSeries && (s = W(i, t));
|
|
429
|
+
let l = N(i), d = i.startDateTime && r?.date !== !1 ? c(i.startDateTime, i.timeZone, n) : "", f = e.isSeries ? e.instances : i.startDateTime ? [i] : [], p = f.map((e) => {
|
|
430
|
+
let r = u(e.startDateTime, e.timeZone, n), a = R(e, t)?.type === "sold_out";
|
|
426
431
|
return {
|
|
427
|
-
timeLabel:
|
|
428
|
-
href:
|
|
429
|
-
ariaLabel: `${
|
|
432
|
+
timeLabel: r,
|
|
433
|
+
href: N(e),
|
|
434
|
+
ariaLabel: `${i.name} at ${r}${a ? ", sold out" : ""}`
|
|
430
435
|
};
|
|
431
|
-
}),
|
|
432
|
-
return
|
|
433
|
-
title:
|
|
434
|
-
href:
|
|
435
|
-
imageUrl:
|
|
436
|
-
dateLabel:
|
|
437
|
-
description: r.description ?? "",
|
|
438
|
-
ariaLabel:
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
436
|
+
}), m = [i.name];
|
|
437
|
+
return i.startDateTime && m.push(`on ${c(i.startDateTime, i.timeZone, n)}`), e.isSeries ? m.push(`${e.instances.length} showtimes available`) : i.startDateTime && m.push(`at ${u(i.startDateTime, i.timeZone, n)}`), o && m.push(o.text), {
|
|
438
|
+
title: i.name,
|
|
439
|
+
href: l,
|
|
440
|
+
imageUrl: i.imageUrl ?? "",
|
|
441
|
+
dateLabel: d,
|
|
442
|
+
description: r?.description === !1 ? "" : i.description ?? "",
|
|
443
|
+
ariaLabel: m.join(", "),
|
|
444
|
+
hidePoster: r?.poster === !1,
|
|
445
|
+
badge: s,
|
|
446
|
+
pills: p,
|
|
447
|
+
pillEvents: f
|
|
442
448
|
};
|
|
443
449
|
}
|
|
444
450
|
//#endregion
|
|
445
|
-
export {
|
|
451
|
+
export { M as a, y as c, P as i, v as l, H as n, j as o, R as r, k as s, G as t, g as u };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -146,6 +146,17 @@ export interface CalendarProps extends BaseInitOptions {
|
|
|
146
146
|
showViewOptions?: boolean;
|
|
147
147
|
/** Whether to show month navigation (default: true) */
|
|
148
148
|
showMonthSwitcher?: boolean;
|
|
149
|
+
/** Show the search box even without the view switcher (default: false) */
|
|
150
|
+
showSearch?: boolean;
|
|
151
|
+
/** Gallery/List/Carousel show at most this many events; null = all, with
|
|
152
|
+
* load more on Gallery (default: null) */
|
|
153
|
+
maxItems?: number | null;
|
|
154
|
+
/** Hide card parts; only `false` hides (default: every part shown) */
|
|
155
|
+
eventDetails?: {
|
|
156
|
+
poster?: boolean;
|
|
157
|
+
date?: boolean;
|
|
158
|
+
description?: boolean;
|
|
159
|
+
} | null;
|
|
149
160
|
/** Current month store (Svelte writable store) */
|
|
150
161
|
currentMonth?: import('svelte/store').Writable<number>;
|
|
151
162
|
/** Current year store (Svelte writable store) */
|