@getmicdrop/venue-calendar 4.3.112 → 4.3.114

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{CalendarFoundryView-D4glgsR8.js → CalendarFoundryView-BTmew1Os.js} +1 -1
  2. package/dist/{CollectionView-DlkRy1E6.js → CollectionView-CKuFr-dz.js} +41 -34
  3. package/dist/{PhoneInput-mQkaGqwZ.js → PhoneInput-9qgnvS-F.js} +2 -2
  4. package/dist/api/types.d.ts +1 -0
  5. package/dist/venue-calendar.es.js +1190 -1201
  6. package/dist/venue-calendar.iife.js +22 -22
  7. package/dist/venue-calendar.umd.js +51 -51
  8. package/package.json +2 -2
  9. /package/dist/locales/{4.3.112 → 4.3.114}/flow/de.js +0 -0
  10. /package/dist/locales/{4.3.112 → 4.3.114}/flow/es.js +0 -0
  11. /package/dist/locales/{4.3.112 → 4.3.114}/flow/fr.js +0 -0
  12. /package/dist/locales/{4.3.112 → 4.3.114}/flow/id.js +0 -0
  13. /package/dist/locales/{4.3.112 → 4.3.114}/flow/it.js +0 -0
  14. /package/dist/locales/{4.3.112 → 4.3.114}/flow/ja.js +0 -0
  15. /package/dist/locales/{4.3.112 → 4.3.114}/flow/ko.js +0 -0
  16. /package/dist/locales/{4.3.112 → 4.3.114}/flow/nl.js +0 -0
  17. /package/dist/locales/{4.3.112 → 4.3.114}/flow/pl.js +0 -0
  18. /package/dist/locales/{4.3.112 → 4.3.114}/flow/pt-br.js +0 -0
  19. /package/dist/locales/{4.3.112 → 4.3.114}/flow/tr.js +0 -0
  20. /package/dist/locales/{4.3.112 → 4.3.114}/flow/zh.js +0 -0
  21. /package/dist/locales/{4.3.112 → 4.3.114}/main/de.js +0 -0
  22. /package/dist/locales/{4.3.112 → 4.3.114}/main/es.js +0 -0
  23. /package/dist/locales/{4.3.112 → 4.3.114}/main/fr.js +0 -0
  24. /package/dist/locales/{4.3.112 → 4.3.114}/main/id.js +0 -0
  25. /package/dist/locales/{4.3.112 → 4.3.114}/main/it.js +0 -0
  26. /package/dist/locales/{4.3.112 → 4.3.114}/main/ja.js +0 -0
  27. /package/dist/locales/{4.3.112 → 4.3.114}/main/ko.js +0 -0
  28. /package/dist/locales/{4.3.112 → 4.3.114}/main/nl.js +0 -0
  29. /package/dist/locales/{4.3.112 → 4.3.114}/main/pl.js +0 -0
  30. /package/dist/locales/{4.3.112 → 4.3.114}/main/pt-br.js +0 -0
  31. /package/dist/locales/{4.3.112 → 4.3.114}/main/tr.js +0 -0
  32. /package/dist/locales/{4.3.112 → 4.3.114}/main/zh.js +0 -0
@@ -10798,7 +10798,7 @@ function ch(e, t) {
10798
10798
  //#region node_modules/@getmicdrop/svelte-components/dist/foundry/blocks/fields/phone-field.svelte
10799
10799
  var lh = $.state(void 0), uh;
10800
10800
  function dh() {
10801
- return uh ??= import("./PhoneInput-mQkaGqwZ.js").then((e) => ($.set(lh, e.default, !0), $.get(lh)), (e) => {
10801
+ return uh ??= import("./PhoneInput-9qgnvS-F.js").then((e) => ($.set(lh, e.default, !0), $.get(lh)), (e) => {
10802
10802
  throw uh = void 0, e;
10803
10803
  }), uh;
10804
10804
  }
@@ -17,67 +17,74 @@ function v(v, y) {
17
17
  f.push(y, !0), t("CollectionView"), f.prop(y, "organizationId", 3, "");
18
18
  let b = f.prop(y, "onNavigateToEvent", 3, void 0), x = f.prop(y, "password", 3, void 0);
19
19
  f.prop(y, "displayMode", 3, "gallery"), f.prop(y, "showViewSwitcher", 3, !0);
20
- let S = f.prop(y, "labels", 3, r), C = f.prop(y, "locale", 3, void 0), w = f.state(null), T = f.state(!0), E = f.state(null), D = f.state(!1), O = f.state(!1), k = f.state(""), A = f.state(!1), j = f.derived(() => f.get(w) ? n(f.get(w)) : null), M = 0;
21
- async function N(e, t = !1) {
22
- if (!f.get(D)) return;
23
- let n = ++M;
20
+ let S = f.prop(y, "labels", 3, r), C = f.prop(y, "locale", 3, void 0), w = f.prop(y, "initialCollection", 3, null), T = f.state(null), E = f.state(!0), D = f.state(null), O = f.state(!1), k = f.state(!1), A = f.state(""), j = f.state(!1), M = f.derived(() => f.get(T) ? n(f.get(T)) : null), N = 0;
21
+ async function P(e, t = !1) {
22
+ if (!f.get(O)) return;
23
+ let n = ++N;
24
24
  if (!y.collectionId) {
25
- f.set(E, S().noCollectionIdProvided || "No collection ID provided", !0), f.set(T, !1);
25
+ f.set(D, S().noCollectionIdProvided || "No collection ID provided", !0), f.set(E, !1);
26
26
  return;
27
27
  }
28
- f.set(T, !0), f.set(E, null), f.set(A, !1);
28
+ f.set(E, !0), f.set(D, null), f.set(j, !1);
29
29
  try {
30
30
  let r = await a(y.collectionId, e);
31
- if (!f.get(D) || n !== M) return;
31
+ if (!f.get(O) || n !== N) return;
32
32
  if (r) {
33
33
  if (r.passwordRequired || r.error?.code === "PASSWORD_REQUIRED") {
34
- f.set(O, !0), t && d("collection", y.collectionId), f.set(T, !1);
34
+ f.set(k, !0), t && d("collection", y.collectionId), f.set(E, !1);
35
35
  return;
36
36
  }
37
- f.set(w, r, !0), f.set(O, !1), l("collection", y.collectionId, e);
37
+ f.set(T, r, !0), f.set(k, !1), l("collection", y.collectionId, e);
38
38
  } else {
39
39
  if (e) {
40
- f.set(O, !0), t ? d("collection", y.collectionId) : f.set(A, !0), f.set(T, !1);
40
+ f.set(k, !0), t ? d("collection", y.collectionId) : f.set(j, !0), f.set(E, !1);
41
41
  return;
42
42
  }
43
- f.set(E, S().failedToLoadCollection || "Failed to load collection", !0);
43
+ f.set(D, S().failedToLoadCollection || "Failed to load collection", !0);
44
44
  }
45
45
  } catch (e) {
46
- if (f.get(D) && n === M) {
46
+ if (f.get(O) && n === N) {
47
47
  let n = e.message || "";
48
- n.includes("401") || n.includes("403") || n.includes("password") ? (f.set(O, !0), t && d("collection", y.collectionId)) : f.set(E, n || S().failedToLoadCollection || "Failed to load collection", !0);
48
+ n.includes("401") || n.includes("403") || n.includes("password") ? (f.set(k, !0), t && d("collection", y.collectionId)) : f.set(D, n || S().failedToLoadCollection || "Failed to load collection", !0);
49
49
  }
50
50
  } finally {
51
- f.get(D) && n === M && f.set(T, !1);
51
+ f.get(O) && n === N && f.set(E, !1);
52
52
  }
53
53
  }
54
- function P(e) {
55
- e.preventDefault(), f.get(k).trim() && N(f.get(k));
56
- }
57
54
  function F(e) {
55
+ return !!(e && String(e.id) === String(y.collectionId) && e.visibility === "public" && Array.isArray(e.events) && !e.passwordRequired && !e.error);
56
+ }
57
+ function I(e) {
58
+ e.preventDefault(), f.get(A).trim() && P(f.get(A));
59
+ }
60
+ function L(e) {
58
61
  b() && e.id ? b()(Number(e.id), e.slug) : s(c("/[id]/[slug]", {
59
62
  id: String(e.id),
60
63
  slug: String(e.slug)
61
64
  }));
62
65
  }
63
66
  m(() => {
64
- f.set(D, !0);
67
+ f.set(O, !0);
65
68
  let e = x() ? void 0 : u("collection", y.collectionId);
66
- N(x() ?? e, !!e);
69
+ if (!x() && !e && F(w())) {
70
+ f.set(T, w()), f.set(E, !1);
71
+ return;
72
+ }
73
+ P(x() ?? e, !!e);
67
74
  }), p(() => {
68
- f.set(D, !1);
75
+ f.set(O, !1);
69
76
  });
70
- var I = f.comment(), L = f.first_child(I), R = (e) => {
77
+ var R = f.comment(), z = f.first_child(R), B = (e) => {
71
78
  var t = h(), n = f.child(t), r = f.child(n, !0);
72
79
  f.reset(n), f.reset(t), f.template_effect(() => f.set_text(r, S().loadingCollection || "Loading collection...")), f.append(e, t);
73
- }, z = (e) => {
80
+ }, V = (e) => {
74
81
  var t = g(), n = f.child(t), r = f.child(n), a = f.child(r, !0);
75
82
  f.reset(r);
76
83
  var s = f.sibling(r, 2), c = f.child(s, !0);
77
84
  f.reset(s);
78
85
  var l = f.sibling(s, 2), u = f.child(l);
79
86
  {
80
- let e = f.derived(() => S().enterPassword || "Enter password"), t = f.derived(() => f.get(A) ? S().incorrectPassword || "Incorrect password. Please try again" : "");
87
+ let e = f.derived(() => S().enterPassword || "Enter password"), t = f.derived(() => f.get(j) ? S().incorrectPassword || "Incorrect password. Please try again" : "");
81
88
  o(u, {
82
89
  get placeholder() {
83
90
  return f.get(e);
@@ -86,10 +93,10 @@ function v(v, y) {
86
93
  return f.get(t);
87
94
  },
88
95
  get value() {
89
- return f.get(k);
96
+ return f.get(A);
90
97
  },
91
98
  set value(e) {
92
- f.set(k, e, !0);
99
+ f.set(A, e, !0);
93
100
  }
94
101
  });
95
102
  }
@@ -105,16 +112,16 @@ function v(v, y) {
105
112
  $$slots: { default: !0 }
106
113
  }), f.reset(l), f.reset(n), f.reset(t), f.template_effect(() => {
107
114
  f.set_text(a, S().collectionPrivateTitle || "This collection is private"), f.set_text(c, S().collectionPrivateDescription || "Please enter the password to view this collection");
108
- }), f.event("submit", l, P), f.append(e, t);
109
- }, B = (e) => {
115
+ }), f.event("submit", l, I), f.append(e, t);
116
+ }, H = (e) => {
110
117
  var t = _(), n = f.child(t), r = f.child(n);
111
- f.reset(n), f.reset(t), f.template_effect(() => f.set_text(r, `${(S().errorPrefix || "Error:") ?? ""} ${f.get(E) ?? ""}`)), f.append(e, t);
112
- }, V = (t) => {
118
+ f.reset(n), f.reset(t), f.template_effect(() => f.set_text(r, `${(S().errorPrefix || "Error:") ?? ""} ${f.get(D) ?? ""}`)), f.append(e, t);
119
+ }, U = (t) => {
113
120
  e(t, {
114
121
  get event() {
115
- return f.get(j);
122
+ return f.get(M);
116
123
  },
117
- onCollectionEventClick: F,
124
+ onCollectionEventClick: L,
118
125
  get labels() {
119
126
  return S();
120
127
  },
@@ -123,9 +130,9 @@ function v(v, y) {
123
130
  }
124
131
  });
125
132
  };
126
- f.if(L, (e) => {
127
- f.get(T) ? e(R) : f.get(O) ? e(z, 1) : f.get(E) ? e(B, 2) : f.get(j) && e(V, 3);
128
- }), f.append(v, I), f.pop();
133
+ f.if(z, (e) => {
134
+ f.get(E) ? e(B) : f.get(k) ? e(V, 1) : f.get(D) ? e(H, 2) : f.get(M) && e(U, 3);
135
+ }), f.append(v, R), f.pop();
129
136
  }
130
137
  //#endregion
131
138
  export { v as default };
@@ -1227,8 +1227,8 @@ function P(e, t) {
1227
1227
  let e = E.get(g).toLowerCase();
1228
1228
  return k.filter((t) => t.name.toLowerCase().includes(e) || t.dialCode.includes(e) || t.code.toLowerCase().includes(e));
1229
1229
  }), C = {
1230
- sm: "h-9 px-2 type-body gap-1",
1231
- md: "h-10 px-2.5 type-body gap-1.5",
1230
+ sm: "h-9 pointer-coarse:min-h-11 px-2 type-body gap-1",
1231
+ md: "h-10 pointer-coarse:min-h-11 px-2.5 type-body gap-1.5",
1232
1232
  lg: "h-12 px-3 type-bodyLarge gap-2"
1233
1233
  }, w = E.derived(() => C[u()] || C.md);
1234
1234
  async function T() {
@@ -435,6 +435,7 @@ export interface PublicCollectionData {
435
435
  error?: {
436
436
  code?: string;
437
437
  };
438
+ visibility?: string;
438
439
  }
439
440
  export interface ApiConfig {
440
441
  baseUrl?: string;