@ozdao/prometheus-framework 0.1.39 → 0.1.40

Sign up to get free protection for your applications and to get access to all the features.
Files changed (99) hide show
  1. package/dist/ButtonToggleMembership-738720bd.js +1 -0
  2. package/dist/ButtonToggleMembership-e337e704.mjs +90 -0
  3. package/dist/CardBlogpost-c7adb0a7.mjs +246 -0
  4. package/dist/CardBlogpost-f308ff64.js +1 -0
  5. package/dist/CardOrganization-22beb83d.js +1 -0
  6. package/dist/CardOrganization-ae384e54.mjs +234 -0
  7. package/dist/Chips-edf2b573.js +1 -0
  8. package/dist/Chips-f06ec38f.mjs +213 -0
  9. package/dist/Community-04b25965.mjs +130 -0
  10. package/dist/Community-2f6fee0f.js +1 -0
  11. package/dist/Events-41d71b0e.js +1 -0
  12. package/dist/Events-af7170ed.mjs +134 -0
  13. package/dist/Feed-04fe1f7a.mjs +361 -0
  14. package/dist/Feed-23758089.mjs +124 -0
  15. package/dist/Feed-36e83be3.mjs +156 -0
  16. package/dist/Feed-5653cf8b.js +1 -0
  17. package/dist/Feed-5a359bb7.js +1 -0
  18. package/dist/Feed-6ca0541a.js +1 -0
  19. package/dist/Image-39955d9d.mjs +480 -0
  20. package/dist/Image-c2d190d8.js +9 -0
  21. package/dist/LeftoverAdd-21311275.js +1 -0
  22. package/dist/LeftoverAdd-ccf4595f.mjs +228 -0
  23. package/dist/Members-7251dd52.mjs +109 -0
  24. package/dist/Members-d35ab7e8.js +1 -0
  25. package/dist/Organizations-a964d4b6.mjs +72 -0
  26. package/dist/Organizations-ed6d36d6.js +1 -0
  27. package/dist/Product-299070ad.mjs +652 -0
  28. package/dist/Product-aacb05f3.js +7 -0
  29. package/dist/ProductEdit-70bed802.mjs +296 -0
  30. package/dist/ProductEdit-e5a2e0f6.js +1 -0
  31. package/dist/ProductsBackoffice-3c182d6a.mjs +86 -0
  32. package/dist/ProductsBackoffice-b684913d.js +1 -0
  33. package/dist/ProfileBlogposts-6bf526fb.js +1 -0
  34. package/dist/ProfileBlogposts-d4b17535.mjs +77 -0
  35. package/dist/ProfileEvents-3eeb4320.mjs +68 -0
  36. package/dist/ProfileEvents-90e09978.js +1 -0
  37. package/dist/ProfileOrganizations-e838925f.js +1 -0
  38. package/dist/ProfileOrganizations-edf657ca.mjs +72 -0
  39. package/dist/Publics-a31d7fe7.js +1 -0
  40. package/dist/Publics-a8f31413.mjs +45 -0
  41. package/dist/Wallet-2043b611.mjs +24682 -0
  42. package/dist/Wallet-8fa7386a.js +55 -0
  43. package/dist/auth-076a83d0.mjs +625 -0
  44. package/dist/auth-df5a20c6.js +7 -0
  45. package/dist/auth.client.cjs +1 -1
  46. package/dist/auth.client.js +4 -4
  47. package/dist/auth.validation-80b133df.js +1 -0
  48. package/dist/auth.validation-fd9ae66f.mjs +24 -0
  49. package/dist/backoffice.client.cjs +1 -1
  50. package/dist/backoffice.client.js +11 -11
  51. package/dist/categories-4327a81c.js +1 -0
  52. package/dist/categories-52a561a4.mjs +122 -0
  53. package/dist/community.client.cjs +1 -1
  54. package/dist/community.client.js +10 -10
  55. package/dist/events.client.cjs +2 -2
  56. package/dist/events.client.js +9 -9
  57. package/dist/legal.client.cjs +1 -1
  58. package/dist/legal.client.js +1 -1
  59. package/dist/main.css +1 -1
  60. package/dist/modules/gallery/components/pages/Gallery.vue.d.ts +2 -0
  61. package/dist/modules/gallery/components/sections/GalleryWithCategories.vue.d.ts +2 -0
  62. package/dist/modules/globals/components/sections/Title.vue.d.ts +6 -0
  63. package/dist/organizations-966e1cd2.mjs +122 -0
  64. package/dist/organizations-d12c42b6.js +1 -0
  65. package/dist/organizations.client-8f263e28.js +3 -0
  66. package/dist/organizations.client-9ffc023f.mjs +2996 -0
  67. package/dist/organizations.client.cjs +1 -1
  68. package/dist/organizations.client.js +15 -15
  69. package/dist/products-7e4253eb.js +1 -0
  70. package/dist/products-aabe5c02.mjs +108 -0
  71. package/dist/prometheus-framework.cjs.js +1 -1
  72. package/dist/prometheus-framework.es.js +2 -2
  73. package/dist/states.validation-4594b33c.mjs +13 -0
  74. package/dist/states.validation-69003e66.js +1 -0
  75. package/dist/style.css +1 -1
  76. package/dist/users.client.cjs +1 -1
  77. package/dist/users.client.js +198 -166
  78. package/package.json +1 -1
  79. package/src/components/LocationMarker/LocationMarker.vue +1 -1
  80. package/src/components/LocationSelection/LocationSelection.vue +1 -1
  81. package/src/components/Navigation/Navigation.vue +12 -1
  82. package/src/modules/auth/store/auth.js +7 -4
  83. package/src/modules/files/middlewares/server/md.js +1 -0
  84. package/src/modules/gallery/components/pages/Gallery.vue +21 -0
  85. package/src/modules/gallery/components/sections/GalleryWithCategories.vue +408 -0
  86. package/src/modules/gallery/gallery.client.js +11 -14
  87. package/src/modules/gallery/router/gallery.router.js +10 -0
  88. package/src/modules/globals/components/sections/Title.vue +22 -0
  89. package/src/modules/marketplace/router/marketplace.js +4 -3
  90. package/src/modules/organizations/components/sections/Feed.vue +2 -2
  91. package/src/modules/products/components/pages/ProductRecommmendation.vue +5 -3
  92. package/src/modules/products/components/sections/SectionProduct.vue +17 -5
  93. package/src/modules/products/controllers/products.controller.js +83 -0
  94. package/src/modules/products/routes/products.routes.js +5 -5
  95. package/src/modules/spots/components/layouts/Spots.vue +16 -11
  96. package/src/modules/spots/components/pages/Map.vue +9 -7
  97. package/src/modules/users/components/pages/Profile.vue +15 -5
  98. package/src/modules/users/router/users.js +10 -0
  99. package/src/modules/wallet/components/pages/Wallet.vue +104 -23
@@ -0,0 +1,213 @@
1
+ import { openBlock as o, createElementBlock as a, createElementVNode as d, withModifiers as g, createCommentVNode as i, createBlock as x, toDisplayString as u, Fragment as v, renderList as $, normalizeStyle as P, withCtx as k, reactive as R, watch as E } from "vue";
2
+ import { useRouter as U } from "vue-router";
3
+ import { P as z, D as C, _ as j } from "./Dropdown-ef2df9a9.mjs";
4
+ import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
5
+ import "./auth-076a83d0.mjs";
6
+ import "./memberships-12210953.mjs";
7
+ import { a as M } from "./index-a661083c.mjs";
8
+ import { s as b } from "./globals-96ba60e4.mjs";
9
+ const L = {
10
+ key: 0,
11
+ class: "pd-b-zero"
12
+ }, O = { class: "w-100 flex-v-center flex-nojustify flex" }, S = { class: "w-100 flex-nowrap flex-v-center flex" }, D = ["src"], F = {
13
+ key: 2,
14
+ class: "t-semi"
15
+ }, I = { key: 1 }, A = { key: 2 }, T = { class: "d-block mn-l-auto flex-nowrap flex flex-v-center" }, V = {
16
+ key: 0,
17
+ class: "w-4r i-thin"
18
+ }, B = {
19
+ style: {
20
+ position: "absolute",
21
+ top: "0px",
22
+ right: "0px"
23
+ },
24
+ class: "br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"
25
+ }, N = ["src"], H = { class: "bg-black pd-thin radius-small" }, J = /* @__PURE__ */ d("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), oe = {
26
+ __name: "CardHeader",
27
+ props: [
28
+ "user",
29
+ "entity",
30
+ "entityType",
31
+ "date",
32
+ "dateFormatted",
33
+ "owner",
34
+ "creator",
35
+ "members",
36
+ "membersPhotos",
37
+ "type"
38
+ ],
39
+ setup(e) {
40
+ U();
41
+ function r(n) {
42
+ const t = /* @__PURE__ */ new Date(), s = new Date(n), h = Math.abs(t - s), c = Math.floor(h / 1e3), l = Math.floor(c / 60), f = Math.floor(l / 60), y = Math.floor(f / 24), p = Math.floor(y / 7);
43
+ return p > 0 ? `${p} week${p > 1 ? "s" : ""} ago` : y > 0 ? `${y} day${y > 1 ? "s" : ""} ago` : f > 0 ? `${f} hour${f > 1 ? "s" : ""} ago` : l > 0 ? `${l} minute${l > 1 ? "s" : ""} ago` : "Just now";
44
+ }
45
+ return (n, t) => {
46
+ var s, h;
47
+ return e.owner ? (o(), a("header", L, [
48
+ d("div", O, [
49
+ d("div", S, [
50
+ e.owner.target.profile.photo.length > 0 && e.type !== "short" ? (o(), a("img", {
51
+ key: 0,
52
+ src: (n.FILE_SERVER_URL || "") + e.owner.target.profile.photo,
53
+ class: "radius-medium mn-r-thin i-thin",
54
+ onClick: t[0] || (t[0] = g((c) => n.$router.push({
55
+ name: e.owner.type === "user" ? "User Profile" : "Organization",
56
+ params: {
57
+ _id: e.owner.target._id
58
+ }
59
+ }), ["stop"]))
60
+ }, null, 8, D)) : i("", !0),
61
+ !e.owner.target.profile.photo && e.type !== "short" ? (o(), x(z, {
62
+ key: 1,
63
+ class: "radius-medium mn-r-thin i-thin",
64
+ onClick: t[1] || (t[1] = g((c) => n.$router.push({
65
+ name: e.owner.type === "user" ? "User Profile" : "Organization",
66
+ params: {
67
+ _id: e.owner.target._id
68
+ }
69
+ }), ["stop"]))
70
+ })) : i("", !0),
71
+ e.type !== "short" ? (o(), a("span", F, [
72
+ d("span", {
73
+ onClick: t[2] || (t[2] = g((c) => n.$router.push({
74
+ name: e.owner.type === "user" ? "User Profile" : "Organization",
75
+ params: {
76
+ _id: e.owner.target._id
77
+ }
78
+ }), ["stop"]))
79
+ }, u(e.owner.target.profile.name), 1),
80
+ !e.creator.hidden && e.owner.target.profile.name !== ((s = e.creator.target.profile) == null ? void 0 : s.name) ? (o(), a("span", {
81
+ key: 0,
82
+ onClick: t[3] || (t[3] = g((c) => n.$router.push({
83
+ name: "User Profile",
84
+ params: {
85
+ _id: e.creator.target._id
86
+ }
87
+ }), ["stop"]))
88
+ }, " · by " + u((h = e.creator.target.profile) == null ? void 0 : h.name), 1)) : i("", !0),
89
+ e.date ? (o(), a("span", I, " · " + u(r(e.date)), 1)) : i("", !0),
90
+ e.dateFormatted ? (o(), a("span", A, " · " + u(e.dateFormatted), 1)) : i("", !0)
91
+ ])) : i("", !0),
92
+ d("div", T, [
93
+ e.members ? (o(), a("div", V, [
94
+ d("span", B, u(e.members), 1),
95
+ (o(!0), a(v, null, $(e.membersPhotos.slice(0, 2), (c, l) => (o(), a("img", {
96
+ key: l,
97
+ src: (n.FILE_SERVER_URL || "") + c,
98
+ style: P({
99
+ position: "absolute",
100
+ top: "0px",
101
+ right: l * 20 + 20 + "%",
102
+ zIndex: 1 - l
103
+ }),
104
+ class: "br-solid br-2px br-white i-thin bg-grey radius-big"
105
+ }, null, 12, N))), 128))
106
+ ])) : i("", !0)
107
+ ]),
108
+ e.type !== "short" && e.user && e.user != e.creator.target._id ? (o(), x(C, {
109
+ key: 3,
110
+ label: "...",
111
+ align: "right",
112
+ class: "cursor-pointer z-index-2 pd-thin radius-extra"
113
+ }, {
114
+ default: k(() => [
115
+ d("section", H, [
116
+ e.user !== e.creator.target._id ? (o(), x(j, {
117
+ key: 0,
118
+ user: e.user,
119
+ type: e.entityType,
120
+ target: e.entity._id,
121
+ text: "Report",
122
+ class: "w-100"
123
+ }, {
124
+ default: k(() => [
125
+ J
126
+ ]),
127
+ _: 1
128
+ }, 8, ["user", "type", "target"])) : i("", !0)
129
+ ])
130
+ ]),
131
+ _: 1
132
+ }, 8, ["label"])) : i("", !0)
133
+ ])
134
+ ])
135
+ ])) : i("", !0);
136
+ };
137
+ }
138
+ }, w = M.create({
139
+ baseURL: process.env.API_URL,
140
+ withCredentials: !0
141
+ }), m = R({
142
+ reactions: [],
143
+ error: null
144
+ }), q = {
145
+ async read({ user: e, type: r, target: n, role: t }) {
146
+ try {
147
+ const s = await w.get("/api/reactions", { params: { user: e, type: r, target: n, role: t } });
148
+ return m.error = null, m.reactions = s.data, Promise.resolve(s.data);
149
+ } catch (s) {
150
+ return b(s), Promise.reject(s);
151
+ }
152
+ },
153
+ async create(e) {
154
+ try {
155
+ const r = await w.post("/api/reactions/create", e);
156
+ return m.error = null, Promise.resolve(r.data);
157
+ } catch (r) {
158
+ return console.log(r), b(r), Promise.reject(r);
159
+ }
160
+ },
161
+ async update(e) {
162
+ try {
163
+ const r = await w.post("/api/reactions/update", e);
164
+ return m.error = null, Promise.resolve(r.data);
165
+ } catch (r) {
166
+ return b(r), Promise.reject(r);
167
+ }
168
+ },
169
+ async delete(e) {
170
+ try {
171
+ const r = await w.post("/api/reactions/delete", e);
172
+ return m.error = null, Promise.resolve(r.data);
173
+ } catch (r) {
174
+ return b(r), Promise.reject(r);
175
+ }
176
+ }
177
+ }, G = {
178
+ handleReactionUpdate(e, r, n) {
179
+ let t;
180
+ if (Array.isArray(e) ? t = e.find((s) => s._id === r.target) : typeof e == "object" && e._id === r.target && (t = e), t)
181
+ if (t.hasReaction = n, n)
182
+ t.reactions.push(r), t.numberOfReactions += 1;
183
+ else {
184
+ const s = t.reactions.findIndex((h) => h._id === r._id);
185
+ s !== -1 && (t.reactions.splice(s, 1), t.numberOfReactions -= 1);
186
+ }
187
+ }
188
+ };
189
+ E(m, (e) => {
190
+ });
191
+ const ne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
192
+ __proto__: null,
193
+ actions: q,
194
+ mutations: G,
195
+ state: m
196
+ }, Symbol.toStringTag, { value: "Module" })), K = { class: "flex-v-center gap-thin flex" }, Q = { class: "pd-thin radius-small t-semi bg-main" }, W = {
197
+ key: 1,
198
+ class: "pd-thin radius-small t-semi bg-white"
199
+ }, ae = {
200
+ __name: "Chips",
201
+ props: ["chips"],
202
+ setup(e) {
203
+ return (r, n) => (o(), a("div", K, [
204
+ e.chips.length ? (o(!0), a(v, { key: 0 }, $(e.chips, (t, s) => (o(), a("div", Q, u(t.text ? t.text : t), 1))), 256)) : (o(), a("div", W, u(e.chips), 1))
205
+ ]));
206
+ }
207
+ };
208
+ export {
209
+ oe as _,
210
+ q as a,
211
+ ae as b,
212
+ ne as r
213
+ };
@@ -0,0 +1,130 @@
1
+ import q, { withAsyncContext as R, ref as B, computed as C, openBlock as w, createElementBlock as S, createElementVNode as f, unref as M, Fragment as U, renderList as G, createBlock as H, withCtx as J, pushScopeId as K, popScopeId as Q } from "vue";
2
+ import { r as W, s as E, _ as X, a as Y } from "./CardBlogpost-c7adb0a7.mjs";
3
+ import { s as Z } from "./auth-076a83d0.mjs";
4
+ import { useRouter as ee } from "vue-router";
5
+ import { _ as te } from "./_plugin-vue_export-helper-dad06003.mjs";
6
+ import "./index-a661083c.mjs";
7
+ import "./globals-96ba60e4.mjs";
8
+ import "vue-i18n";
9
+ import "./Chips-f06ec38f.mjs";
10
+ import "./Dropdown-ef2df9a9.mjs";
11
+ import "./Popup-0d8e1392.mjs";
12
+ import "./Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
13
+ import "./Button-9e1a9284.mjs";
14
+ import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
15
+ import "./Select-11ddabf5.mjs";
16
+ import "./reports-79cd9459.mjs";
17
+ import "./click-outside-6101836c.mjs";
18
+ import "./memberships-12210953.mjs";
19
+ import "./IconEdit-9edfd74d.mjs";
20
+ var le = {};
21
+ (function(r) {
22
+ Object.defineProperties(r, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } });
23
+ var e = q;
24
+ const g = { class: "flex-nowrap flex-v-center flex pd-medium bg-white" }, k = { key: 0, class: "t-left mn-r-small w-33" }, y = { class: "w-100" }, h = ["value", "placeholder"], v = e.defineComponent({ __name: "Field", props: { label: { default: "Label" }, placeholder: { default: "Enter something here" }, field: { default: null }, validation: { type: Boolean, default: !1 } }, emits: ["update:modelValue"], setup(t, { emit: a }) {
25
+ const l = t, n = e.ref(l.field);
26
+ return (d, u) => (e.openBlock(), e.createElementBlock("div", g, [t.label ? (e.openBlock(), e.createElementBlock("div", k, [e.createElementVNode("label", null, e.toDisplayString(t.label), 1)])) : e.createCommentVNode("", !0), e.createElementVNode("div", y, [e.createElementVNode("input", { onInput: u[0] || (u[0] = (b) => {
27
+ var i;
28
+ return n.value = a("update:modelValue", (i = b.target) == null ? void 0 : i.value);
29
+ }), type: "text", class: "w-100", value: t.field, placeholder: t.placeholder }, null, 40, h)])]));
30
+ } }), o = { class: "input-wrapper" }, p = { class: "t-transp p-small" }, c = { key: 0, class: "flex-nojustify flex-v-center flex-nowrap flex w-100" }, _ = { key: 1, class: "w-100" }, T = ["onClick"], V = { __name: "Select", props: ["obj", "label", "prop", "value", "options", "content", "textarea", "placeholder", "size"], setup(t) {
31
+ const a = t, l = e.ref(null), n = e.ref(!1);
32
+ e.ref("Please select an item");
33
+ let d = e.computed(() => {
34
+ if (a.prop[a.content]) {
35
+ var i = a.options.indexOf(a.prop[a.content]), m = a.options.map((s) => s);
36
+ return i != -1 && m.splice(i, 1), m;
37
+ } else
38
+ return a.options;
39
+ });
40
+ a.prop[a.content] && (l.value = a.prop[a.content]);
41
+ function u() {
42
+ n.value = !n.value;
43
+ }
44
+ function b(i, m, s) {
45
+ var N = s;
46
+ l.value = N, n.value = !n.value, i[m] = N;
47
+ }
48
+ return (i, m) => (e.openBlock(), e.createElementBlock("div", o, [e.createElementVNode("span", p, e.toDisplayString(t.label), 1), e.createElementVNode("li", { onClick: m[0] || (m[0] = e.withModifiers((s) => u(), ["stop"])), class: e.normalizeClass([{ "input-small": t.size === "small" }, "pd-small flex-center flex-nowrap flex bg-grey input-select input"]) }, [l.value ? (e.openBlock(), e.createElementBlock("span", c, [e.createElementVNode("span", null, e.toDisplayString(l.value.name ? l.value.name : l.value), 1)])) : (e.openBlock(), e.createElementBlock("span", _, e.toDisplayString(t.placeholder ? t.placeholder : "Please select"), 1))], 2), n.value ? (e.openBlock(), e.createElementBlock("ul", { key: 0, class: e.normalizeClass([{ "dropdown-small": t.size === "small" }, "bg-grey dropdown-menu"]) }, [(e.openBlock(!0), e.createElementBlock(e.Fragment, null, e.renderList(e.unref(d), (s) => (e.openBlock(), e.createElementBlock("li", { class: e.normalizeClass([{ "input-small": t.size === "small" }, "pd-small bg-grey input-select input"]) }, [s ? (e.openBlock(), e.createElementBlock("span", { key: 0, onClick: (N) => b(t.prop, t.content, s), class: "flex-nojustify flex-v-center flex-nowrap flex w-100" }, [e.createElementVNode("span", null, e.toDisplayString(s.name ? s.name : s), 1)], 8, T)) : e.createCommentVNode("", !0)], 2))), 256))], 2)) : e.createCommentVNode("", !0)]));
49
+ } }, I = ["disabled"], L = { key: 0 }, $ = { key: 0, class: "loading" }, z = e.createElementVNode("span", null, [e.createElementVNode("svg", { class: "i-default", width: "135", height: "140", viewBox: "0 0 135 140", xmlns: "http://www.w3.org/2000/svg", fill: "#fff" }, [e.createElementVNode("rect", { y: "10", width: "15", height: "120", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0.5s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0.5s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })]), e.createElementVNode("rect", { x: "30", y: "10", width: "15", height: "120", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0.25s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0.25s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })]), e.createElementVNode("rect", { x: "60", width: "15", height: "140", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })]), e.createElementVNode("rect", { x: "90", y: "10", width: "15", height: "120", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0.25s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0.25s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })]), e.createElementVNode("rect", { x: "120", y: "10", width: "15", height: "120", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0.5s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0.5s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })])])], -1), F = [z], D = { key: 0, class: "h4 loading" }, P = e.createElementVNode("span", { class: "t-white" }, "✔", -1), j = [P], A = { key: 0, class: "error" }, x = e.defineComponent({ __name: "Button", props: { submit: { type: Function, default: async () => {
50
+ console.log("Button click.");
51
+ } }, callback: { type: Function, default: async () => {
52
+ console.log("Button callback.");
53
+ } }, validation: { type: Boolean, default: !1 } }, setup(t) {
54
+ const a = t, l = e.ref(null), n = e.ref(null), d = e.ref(!1), u = e.ref(!1);
55
+ async function b() {
56
+ l.value.style["pointer-events"] = "none", n.value = null, d.value = !0;
57
+ try {
58
+ await a.submit(), l.value.classList.add("bg-light-blue"), l.value.classList.remove("bg-blue"), d.value = !1, u.value = !0, setTimeout(() => a.callback(), 750);
59
+ } catch {
60
+ l.value.classList.add("bg-light-red"), l.value.classList.remove("bg-blue"), n.value = "❌", setTimeout(() => {
61
+ l.value.classList.add("bg-blue"), l.value.classList.remove("bg-light-red"), l.value.style.pointerEvents = "auto", d.value = !1, u.value = !1, n.value = null;
62
+ }, 1e3);
63
+ }
64
+ }
65
+ return (i, m) => (e.openBlock(), e.createElementBlock("button", { onClick: b, disabled: t.validation, ref_key: "button", ref: l, class: "w-100 t-white bg-blue button" }, [e.createVNode(e.Transition, { mode: "out-in", name: "fadeIn" }, { default: e.withCtx(() => [!d.value && !n.value && !u.value ? (e.openBlock(), e.createElementBlock("span", L, [e.renderSlot(i.$slots, "default")])) : e.createCommentVNode("", !0)]), _: 3 }), e.createVNode(e.Transition, { mode: "out-in", name: "fadeIn" }, { default: e.withCtx(() => [d.value && !n.value ? (e.openBlock(), e.createElementBlock("div", $, F)) : e.createCommentVNode("", !0)]), _: 1 }), e.createVNode(e.Transition, { mode: "out-in", name: "fadeIn" }, { default: e.withCtx(() => [u.value ? (e.openBlock(), e.createElementBlock("div", D, j)) : e.createCommentVNode("", !0)]), _: 1 }), e.createVNode(e.Transition, { mode: "out-in", name: "fadeIn" }, { default: e.withCtx(() => [n.value ? (e.openBlock(), e.createElementBlock("div", A, [e.createElementVNode("span", null, e.toDisplayString(n.value), 1)])) : e.createCommentVNode("", !0)]), _: 1 })], 8, I));
66
+ } });
67
+ var O = { install: (t) => {
68
+ t.component("Field", v), t.component("Button", x), t.component("Select", V);
69
+ } };
70
+ r.Button = x, r.Field = v, r.Select = V, r.default = O;
71
+ })(le);
72
+ const ae = (r) => (K("data-v-faeb0fe0"), r = r(), Q(), r), ne = { class: "flex-v-center flex-nowrap flex mn-medium" }, oe = /* @__PURE__ */ ae(() => /* @__PURE__ */ f("h3", { class: "mn-r-medium" }, "Blog", -1)), re = { class: "" }, ie = { class: "flex-nowrap flex pd-t-zero pd-b-zero pd-big" }, se = ["onClick"], ce = ["onClick"], ue = {
73
+ __name: "Community",
74
+ async setup(r) {
75
+ let e, g;
76
+ const k = ee();
77
+ [e, g] = R(() => W()), await e, g(), console.log(E), B({
78
+ title: "",
79
+ content: "",
80
+ categories: []
81
+ });
82
+ const y = async (o) => {
83
+ window.confirm("Are you sure you want to delete this post?") && (console.log(o), await Y(o));
84
+ };
85
+ let h = B("all");
86
+ const v = C(() => h.value === "all" ? E.all : E.all.filter((o) => o.categories.includes(h.value)));
87
+ return C(() => {
88
+ for (let o of v.value)
89
+ if (o.blocks && o.blocks.length > 0) {
90
+ const p = o.blocks.find((c) => c.type.name === "ImageUpload");
91
+ if (p)
92
+ return p.content;
93
+ }
94
+ return null;
95
+ }), (o, p) => (w(), S("div", null, [
96
+ f("div", ne, [
97
+ oe,
98
+ f("button", {
99
+ onClick: p[0] || (p[0] = (c) => M(k).push({ name: "Create BlogPost" })),
100
+ class: "t-white bg-second button-small button"
101
+ }, "+")
102
+ ]),
103
+ f("div", re, [
104
+ (w(!0), S(U, null, G(M(v), (c) => (w(), H(X, {
105
+ key: c._id,
106
+ blogpost: c,
107
+ owner: Z.user._id,
108
+ class: "mn-medium"
109
+ }, {
110
+ default: J(() => [
111
+ f("div", ie, [
112
+ f("button", {
113
+ class: "mn-r-thin button-small w-100 button",
114
+ onClick: (_) => o.$router.push({ path: "/community/posts/" + c.url + "/edit" })
115
+ }, "Edit", 8, se),
116
+ f("button", {
117
+ class: "button-small w-100 button",
118
+ onClick: (_) => y(c._id)
119
+ }, "Delete", 8, ce)
120
+ ])
121
+ ]),
122
+ _: 2
123
+ }, 1032, ["blogpost", "owner"]))), 128))
124
+ ])
125
+ ]));
126
+ }
127
+ }, Me = /* @__PURE__ */ te(ue, [["__scopeId", "data-v-faeb0fe0"]]);
128
+ export {
129
+ Me as default
130
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),v=require("./CardBlogpost-f308ff64.js"),$=require("./auth-df5a20c6.js"),D=require("vue-router"),P=require("./_plugin-vue_export-helper-f246444f.js");require("./index-b41aac19.js");require("./globals-928eb13c.js");require("vue-i18n");require("./Chips-edf2b573.js");require("./Dropdown-f2564c92.js");require("./Popup-eb11fa82.js");require("./Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Button-7643c9aa.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Select-3ca5ab39.js");require("./reports-270f69df.js");require("./click-outside-0b0727d1.js");require("./memberships-393765d8.js");require("./IconEdit-c0469b45.js");var j={};(function(i){Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e=t;const h={class:"flex-nowrap flex-v-center flex pd-medium bg-white"},N={key:0,class:"t-left mn-r-small w-33"},y={class:"w-100"},k=["value","placeholder"],b=e.defineComponent({__name:"Field",props:{label:{default:"Label"},placeholder:{default:"Enter something here"},field:{default:null},validation:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(l,{emit:n}){const a=l,o=e.ref(a.field);return(m,d)=>(e.openBlock(),e.createElementBlock("div",h,[l.label?(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("label",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",y,[e.createElementVNode("input",{onInput:d[0]||(d[0]=g=>{var c;return o.value=n("update:modelValue",(c=g.target)==null?void 0:c.value)}),type:"text",class:"w-100",value:l.field,placeholder:l.placeholder},null,40,k)])]))}}),r={class:"input-wrapper"},f={class:"t-transp p-small"},u={key:0,class:"flex-nojustify flex-v-center flex-nowrap flex w-100"},_={key:1,class:"w-100"},B=["onClick"],V={__name:"Select",props:["obj","label","prop","value","options","content","textarea","placeholder","size"],setup(l){const n=l,a=e.ref(null),o=e.ref(!1);e.ref("Please select an item");let m=e.computed(()=>{if(n.prop[n.content]){var c=n.options.indexOf(n.prop[n.content]),p=n.options.map(s=>s);return c!=-1&&p.splice(c,1),p}else return n.options});n.prop[n.content]&&(a.value=n.prop[n.content]);function d(){o.value=!o.value}function g(c,p,s){var E=s;a.value=E,o.value=!o.value,c[p]=E}return(c,p)=>(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("span",f,e.toDisplayString(l.label),1),e.createElementVNode("li",{onClick:p[0]||(p[0]=e.withModifiers(s=>d(),["stop"])),class:e.normalizeClass([{"input-small":l.size==="small"},"pd-small flex-center flex-nowrap flex bg-grey input-select input"])},[a.value?(e.openBlock(),e.createElementBlock("span",u,[e.createElementVNode("span",null,e.toDisplayString(a.value.name?a.value.name:a.value),1)])):(e.openBlock(),e.createElementBlock("span",_,e.toDisplayString(l.placeholder?l.placeholder:"Please select"),1))],2),o.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([{"dropdown-small":l.size==="small"},"bg-grey dropdown-menu"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),s=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass([{"input-small":l.size==="small"},"pd-small bg-grey input-select input"])},[s?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:E=>g(l.prop,l.content,s),class:"flex-nojustify flex-v-center flex-nowrap flex w-100"},[e.createElementVNode("span",null,e.toDisplayString(s.name?s.name:s),1)],8,B)):e.createCommentVNode("",!0)],2))),256))],2)):e.createCommentVNode("",!0)]))}},C=["disabled"],x={key:0},q={key:0,class:"loading"},S=e.createElementVNode("span",null,[e.createElementVNode("svg",{class:"i-default",width:"135",height:"140",viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:"#fff"},[e.createElementVNode("rect",{y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"60",width:"15",height:"140",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})])])],-1),M=[S],T={key:0,class:"h4 loading"},I=e.createElementVNode("span",{class:"t-white"},"✔",-1),L=[I],z={key:0,class:"error"},w=e.defineComponent({__name:"Button",props:{submit:{type:Function,default:async()=>{console.log("Button click.")}},callback:{type:Function,default:async()=>{console.log("Button callback.")}},validation:{type:Boolean,default:!1}},setup(l){const n=l,a=e.ref(null),o=e.ref(null),m=e.ref(!1),d=e.ref(!1);async function g(){a.value.style["pointer-events"]="none",o.value=null,m.value=!0;try{await n.submit(),a.value.classList.add("bg-light-blue"),a.value.classList.remove("bg-blue"),m.value=!1,d.value=!0,setTimeout(()=>n.callback(),750)}catch{a.value.classList.add("bg-light-red"),a.value.classList.remove("bg-blue"),o.value="❌",setTimeout(()=>{a.value.classList.add("bg-blue"),a.value.classList.remove("bg-light-red"),a.value.style.pointerEvents="auto",m.value=!1,d.value=!1,o.value=null},1e3)}}return(c,p)=>(e.openBlock(),e.createElementBlock("button",{onClick:g,disabled:l.validation,ref_key:"button",ref:a,class:"w-100 t-white bg-blue button"},[e.createVNode(e.Transition,{mode:"out-in",name:"fadeIn"},{default:e.withCtx(()=>[!m.value&&!o.value&&!d.value?(e.openBlock(),e.createElementBlock("span",x,[e.renderSlot(c.$slots,"default")])):e.createCommentVNode("",!0)]),_:3}),e.createVNode(e.Transition,{mode:"out-in",name:"fadeIn"},{default:e.withCtx(()=>[m.value&&!o.value?(e.openBlock(),e.createElementBlock("div",q,M)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{mode:"out-in",name:"fadeIn"},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",T,L)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{mode:"out-in",name:"fadeIn"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("span",null,e.toDisplayString(o.value),1)])):e.createCommentVNode("",!0)]),_:1})],8,C))}});var F={install:l=>{l.component("Field",b),l.component("Button",w),l.component("Select",V)}};i.Button=w,i.Field=b,i.Select=V,i.default=F})(j);const O=i=>(t.pushScopeId("data-v-faeb0fe0"),i=i(),t.popScopeId(),i),A={class:"flex-v-center flex-nowrap flex mn-medium"},R=O(()=>t.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),H={class:""},U={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},G=["onClick"],J=["onClick"],K={__name:"Community",async setup(i){let e,h;const N=D.useRouter();[e,h]=t.withAsyncContext(()=>v.read()),await e,h(),console.log(v.state),t.ref({title:"",content:"",categories:[]});const y=async r=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(r),await v.remove(r))};let k=t.ref("all");const b=t.computed(()=>k.value==="all"?v.state.all:v.state.all.filter(r=>r.categories.includes(k.value)));return t.computed(()=>{for(let r of b.value)if(r.blocks&&r.blocks.length>0){const f=r.blocks.find(u=>u.type.name==="ImageUpload");if(f)return f.content}return null}),(r,f)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",A,[R,t.createElementVNode("button",{onClick:f[0]||(f[0]=u=>t.unref(N).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),t.createElementVNode("div",H,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(b),u=>(t.openBlock(),t.createBlock(v._sfc_main,{key:u._id,blogpost:u,owner:$.state.user._id,class:"mn-medium"},{default:t.withCtx(()=>[t.createElementVNode("div",U,[t.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:_=>r.$router.push({path:"/community/posts/"+u.url+"/edit"})},"Edit",8,G),t.createElementVNode("button",{class:"button-small w-100 button",onClick:_=>y(u._id)},"Delete",8,J)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},Q=P._export_sfc(K,[["__scopeId","data-v-faeb0fe0"]]);exports.default=Q;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),s=require("vue-router");require("vue-i18n");require("./globals-928eb13c.js");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const o=require("./Feed-6ca0541a.js");require("./Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js");const f=require("./EmptyState-d65bab5b.js"),m=require("./_plugin-vue_export-helper-f246444f.js"),u=require("./auth-df5a20c6.js"),y={},h={width:"100%",height:"50",xmlns:"http://www.w3.org/2000/svg"},k=e.createStaticVNode('<rect x="0" y="0" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="3" ry="3" width="40" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="65" y="15" rx="3" ry="3" width="150" height="20" fill="rgba(var(--black),0.05)"></rect><circle cx="250" cy="25" r="10" fill="rgba(var(--black),0.1)"></circle><circle cx="265" cy="25" r="10" fill="rgba(var(--black),0.05)"></circle><circle cx="280" cy="25" r="10" fill="rgba(var(--black),0.025)"></circle><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',7),v=[k];function b(c,t){return e.openBlock(),e.createElementBlock("svg",h,v)}const w=m._export_sfc(y,[["render",b]]);const x={class:"today-events"},d={__name:"List",props:{category:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},period:{type:String,default:null},phase:{type:String,default:null}},setup(c){const t=c,r=e.ref([]),a=e.ref(!0),p=e.ref(0),i=e.ref(5);return e.onMounted(async()=>{const l=await o.read({skip:p.value,limit:i.value,sortOrder:"desc",category:t.category,user:t.user,owner:t.owner,organization:t.organization,period:t.period,phase:t.phase});r.value=l,a.value=!1}),(l,q)=>(e.openBlock(),e.createElementBlock("section",x,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[a.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(i.value,n=>(e.openBlock(),e.createBlock(w,{key:n}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!a.value&&r.value.length<1?(e.openBlock(),e.createBlock(f._sfc_main,{key:0,title:"No Events Today",description:"Today, are no events available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!a.value&&r.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(r.value,(n,g)=>(e.openBlock(),e.createBlock(o._sfc_main$1,{onClick:E=>l.$router.push({name:"Event",params:{url:n.url}}),key:n._id,event:n,owner:c.user,type:"short",class:e.normalizeClass(["pd-medium",{"br-b br-solid br-black-transp-10":g!==r.value.length-1}])},null,8,["onClick","event","owner","class"]))),128)):e.createCommentVNode("",!0)]),_:1})]))}},_={__name:"Events",setup(c){const t=s.useRoute();return s.useRouter(),(r,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(d,{user:u.state.user._id,class:"bg-grey mn-thin radius-big",phase:"week"},null,8,["user"]),e.createVNode(o._sfc_main,{category:e.unref(t).params.category,user:u.state.user._id,period:e.unref(t).query.period,selectedDate:o.state.filter.date},null,8,["category","user","period","selectedDate"])]))}},B=Object.freeze(Object.defineProperty({__proto__:null,default:_},Symbol.toStringTag,{value:"Module"}));exports.Events=B;exports._sfc_main=d;exports._sfc_main$1=_;
@@ -0,0 +1,134 @@
1
+ import { openBlock as t, createElementBlock as s, createStaticVNode as k, ref as l, onMounted as w, createVNode as i, TransitionGroup as m, withCtx as u, Fragment as g, renderList as f, createBlock as d, createCommentVNode as _, Transition as x, normalizeClass as S, unref as y } from "vue";
2
+ import { useRoute as $, useRouter as E } from "vue-router";
3
+ import "vue-i18n";
4
+ import "./globals-96ba60e4.mjs";
5
+ import "./Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
6
+ import { r as C, a as N, _ as z, s as L } from "./Feed-04fe1f7a.mjs";
7
+ import "./Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
8
+ import { _ as T } from "./EmptyState-e404b05d.mjs";
9
+ import { _ as B } from "./_plugin-vue_export-helper-dad06003.mjs";
10
+ import { s as h } from "./auth-076a83d0.mjs";
11
+ const O = {}, V = {
12
+ width: "100%",
13
+ height: "50",
14
+ xmlns: "http://www.w3.org/2000/svg"
15
+ }, j = /* @__PURE__ */ k('<rect x="0" y="0" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="3" ry="3" width="40" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="65" y="15" rx="3" ry="3" width="150" height="20" fill="rgba(var(--black),0.05)"></rect><circle cx="250" cy="25" r="10" fill="rgba(var(--black),0.1)"></circle><circle cx="265" cy="25" r="10" fill="rgba(var(--black),0.05)"></circle><circle cx="280" cy="25" r="10" fill="rgba(var(--black),0.025)"></circle><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 7), D = [
16
+ j
17
+ ];
18
+ function M(o, e) {
19
+ return t(), s("svg", V, D);
20
+ }
21
+ const P = /* @__PURE__ */ B(O, [["render", M]]);
22
+ const R = { class: "today-events" }, q = {
23
+ __name: "List",
24
+ props: {
25
+ category: {
26
+ type: String,
27
+ default: null
28
+ },
29
+ organization: {
30
+ type: String,
31
+ default: null
32
+ },
33
+ owner: {
34
+ type: String,
35
+ default: null
36
+ },
37
+ user: {
38
+ type: [String, Number],
39
+ default: null
40
+ },
41
+ period: {
42
+ type: String,
43
+ default: null
44
+ },
45
+ phase: {
46
+ type: String,
47
+ default: null
48
+ }
49
+ },
50
+ setup(o) {
51
+ const e = o, r = l([]), a = l(!0), v = l(0), p = l(5);
52
+ return w(async () => {
53
+ const c = await C({
54
+ skip: v.value,
55
+ limit: p.value,
56
+ sortOrder: "desc",
57
+ category: e.category,
58
+ user: e.user,
59
+ owner: e.owner,
60
+ organization: e.organization,
61
+ period: e.period,
62
+ phase: e.phase
63
+ });
64
+ r.value = c, a.value = !1;
65
+ }), (c, G) => (t(), s("section", R, [
66
+ i(m, {
67
+ tag: "ul",
68
+ name: "fade",
69
+ class: "o-hidden bg-grey radius-big"
70
+ }, {
71
+ default: u(() => [
72
+ a.value ? (t(!0), s(g, { key: 0 }, f(p.value, (n) => (t(), d(P, { key: n }))), 128)) : _("", !0)
73
+ ]),
74
+ _: 1
75
+ }),
76
+ i(x, { name: "fade" }, {
77
+ default: u(() => [
78
+ !a.value && r.value.length < 1 ? (t(), d(T, {
79
+ key: 0,
80
+ title: "No Events Today",
81
+ description: "Today, are no events available. Please check back later.",
82
+ class: "pd-medium mn-thin bg-grey radius-big"
83
+ })) : _("", !0)
84
+ ]),
85
+ _: 1
86
+ }),
87
+ i(m, {
88
+ tag: "ul",
89
+ name: "fade",
90
+ class: "container"
91
+ }, {
92
+ default: u(() => [
93
+ !a.value && r.value.length > 0 ? (t(!0), s(g, { key: 0 }, f(r.value, (n, b) => (t(), d(N, {
94
+ onClick: (A) => c.$router.push({ name: "Event", params: { url: n.url } }),
95
+ key: n._id,
96
+ event: n,
97
+ owner: o.user,
98
+ type: "short",
99
+ class: S(["pd-medium", {
100
+ "br-b br-solid br-black-transp-10": b !== r.value.length - 1
101
+ }])
102
+ }, null, 8, ["onClick", "event", "owner", "class"]))), 128)) : _("", !0)
103
+ ]),
104
+ _: 1
105
+ })
106
+ ]));
107
+ }
108
+ }, F = {
109
+ __name: "Events",
110
+ setup(o) {
111
+ const e = $();
112
+ return E(), (r, a) => (t(), s("section", null, [
113
+ i(q, {
114
+ user: h.user._id,
115
+ class: "bg-grey mn-thin radius-big",
116
+ phase: "week"
117
+ }, null, 8, ["user"]),
118
+ i(z, {
119
+ category: y(e).params.category,
120
+ user: h.user._id,
121
+ period: y(e).query.period,
122
+ selectedDate: L.filter.date
123
+ }, null, 8, ["category", "user", "period", "selectedDate"])
124
+ ]));
125
+ }
126
+ }, ee = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
127
+ __proto__: null,
128
+ default: F
129
+ }, Symbol.toStringTag, { value: "Module" }));
130
+ export {
131
+ ee as E,
132
+ q as _,
133
+ F as a
134
+ };