@ozdao/prometheus-framework 0.0.95 → 0.0.97
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/CardOrganization-1b0da77c.mjs +230 -0
- package/dist/CardOrganization-43e80590.js +1 -0
- package/dist/Chips-32092a52.js +1 -0
- package/dist/Chips-4316f652.mjs +110 -0
- package/dist/Chips-92ccc11f.js +1 -0
- package/dist/Chips-cc08d85a.mjs +108 -0
- package/dist/Feed-361761f5.mjs +366 -0
- package/dist/Feed-44f715a7.mjs +439 -0
- package/dist/Feed-67f403fb.mjs +366 -0
- package/dist/Feed-8a867bfc.js +1 -0
- package/dist/Feed-8acc6844.js +1 -0
- package/dist/Feed-8f6eb29d.mjs +439 -0
- package/dist/Feed-c88eb3aa.js +1 -0
- package/dist/Feed-c8dc4359.js +1 -0
- package/dist/IconEdit-4cfe2115.js +1 -0
- package/dist/IconEdit-eacf3856.mjs +44 -0
- package/dist/Image-661e2fbc.mjs +477 -0
- package/dist/Image-d74c19ee.mjs +477 -0
- package/dist/Image-f66dbbf4.js +9 -0
- package/dist/Image-fd501859.js +9 -0
- package/dist/Product-09a39f0b.js +7 -0
- package/dist/Product-601a9d5b.mjs +838 -0
- package/dist/Product-b7c53f33.mjs +838 -0
- package/dist/Product-f017e6cd.js +7 -0
- package/dist/ProductEdit-3d7f2823.js +1 -0
- package/dist/ProductEdit-dae66a53.js +1 -0
- package/dist/ProductEdit-e827ea38.mjs +350 -0
- package/dist/ProductEdit-fa0117b6.mjs +350 -0
- package/dist/ProfileBlogposts-69beaa14.js +1 -0
- package/dist/ProfileBlogposts-6f80b734.mjs +64 -0
- package/dist/ProfileBlogposts-92c4addb.mjs +64 -0
- package/dist/ProfileBlogposts-e3ea2c82.js +1 -0
- package/dist/ProfileComments-0d22a8ec.js +1 -0
- package/dist/ProfileComments-bae499e9.js +1 -0
- package/dist/ProfileComments-c7230f42.mjs +44 -0
- package/dist/ProfileComments-cdaccefe.mjs +44 -0
- package/dist/ProfileEvents-2f22e7cf.mjs +56 -0
- package/dist/ProfileEvents-3089a526.mjs +56 -0
- package/dist/ProfileEvents-cc65404c.js +1 -0
- package/dist/ProfileEvents-e62e76cf.js +1 -0
- package/dist/ProfileLikes-6cf19687.js +1 -0
- package/dist/ProfileLikes-75215d15.mjs +44 -0
- package/dist/ProfileLikes-e4fa0792.mjs +44 -0
- package/dist/ProfileLikes-fa41bad0.js +1 -0
- package/dist/ProfileOrganizations-55914b43.js +1 -0
- package/dist/ProfileOrganizations-cef668b5.mjs +212 -0
- package/dist/ProfileOrganizations-d4ec181b.js +1 -0
- package/dist/ProfileOrganizations-ec908108.mjs +212 -0
- package/dist/Publics-6b7c97bd.js +1 -0
- package/dist/Publics-abbe2e0c.mjs +123 -0
- package/dist/Socials-8193477c.mjs +189 -0
- package/dist/Socials-821bd677.js +1 -0
- package/dist/UploadImage-1b4c2a5e.mjs +83 -0
- package/dist/UploadImage-39d42048.js +1 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +18 -10
- package/dist/components/Text/Text.vue.d.ts +1 -0
- package/dist/components/Text/Text.vue.d.ts.map +1 -1
- package/dist/events.client.cjs +1 -1
- package/dist/events.client.js +41 -33
- package/dist/landing.client.cjs +1 -1
- package/dist/landing.client.js +38 -38
- package/dist/main.css +1 -1
- package/dist/organizations.client-723ebb3b.js +3 -0
- package/dist/organizations.client-8aa34e80.mjs +3017 -0
- package/dist/organizations.client-b0878617.js +3 -0
- package/dist/organizations.client-f4dff584.mjs +3017 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +9 -9
- package/dist/prometheus-framework.cjs.js +2 -2
- package/dist/prometheus-framework.es.js +4 -3
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +49 -46
- package/package.json +1 -1
- package/src/components/CardHeader/CardHeader.vue +2 -2
- package/src/components/Chips/Chips.vue +1 -2
- package/src/components/Magnifier/Magnifier.vue +1 -1
- package/src/components/Text/Text.vue +4 -3
- package/src/components/UploadImage/UploadImage.vue +8 -1
- package/src/modules/backoffice/components/pages/Organizations.vue +2 -2
- package/src/modules/community/components/blocks/CardBlogpost.vue +16 -1
- package/src/modules/community/components/layouts/Community.vue +2 -2
- package/src/modules/community/components/pages/Blog.vue +1 -1
- package/src/modules/community/router/blogposts.js +9 -1
- package/src/modules/constructor/components/elements/Image.vue +1 -1
- package/src/modules/constructor/components/elements/ImageUpload.vue +1 -1
- package/src/modules/events/components/blocks/CardEvent.vue +18 -6
- package/src/modules/events/components/elements/ButtonJoin.vue +1 -1
- package/src/modules/events/router/events.js +9 -1
- package/src/modules/landing/components/sections/MobileApp.vue +1 -1
- package/src/modules/orders/components/blocks/CardOrderItem.vue +1 -1
- package/src/modules/orders/components/blocks/Positions.vue +2 -2
- package/src/modules/organizations/components/blocks/CardOrganization.vue +5 -5
- package/src/modules/organizations/components/blocks/DepartmentSub.vue +1 -1
- package/src/modules/organizations/components/blocks/User.vue +1 -1
- package/src/modules/organizations/components/pages/Organization.vue +1 -1
- package/src/modules/organizations/components/pages/Organizations.vue +2 -2
- package/src/modules/organizations/components/pages/OrganizationsAccount.vue +2 -2
- package/src/modules/organizations/components/sections/DetailsTab.vue +1 -1
- package/src/modules/organizations/components/sections/Organizations.vue +1 -1
- package/src/modules/organizations/components/sections/Publics.vue +1 -1
- package/src/modules/products/components/blocks/Images360.vue +1 -1
- package/src/modules/products/components/blocks/ImagesThumbnails.vue +1 -1
- package/src/modules/products/components/blocks/LeftoverPositions.vue +2 -2
- package/src/modules/products/components/blocks/ProductCard.vue +1 -1
- package/src/modules/products/components/sections/EditProductImages.vue +1 -1
- package/src/modules/products/components/sections/HeroRecommendation.vue +1 -1
- package/src/modules/products/components/sections/SectionProduct.vue +1 -1
- package/src/modules/users/components/pages/Profile.vue +3 -3
- package/src/modules/users/components/pages/ProfileBlogposts.vue +1 -1
- package/src/modules/users/components/pages/ProfileComments.vue +1 -1
- package/src/modules/users/components/pages/ProfileEdit.vue +1 -1
- package/src/modules/users/components/pages/ProfileEvents.vue +1 -1
- package/src/modules/users/components/pages/ProfileLikes.vue +1 -1
- package/src/modules/users/components/pages/ProfileOrganizations.vue +1 -1
- package/src/modules/users/router/users.js +10 -7
- package/src/styles/base/all.scss +1 -0
@@ -0,0 +1,366 @@
|
|
1
|
+
import { ref as h, computed as m, openBlock as r, createElementBlock as i, normalizeClass as p, createVNode as T, unref as C, createElementVNode as f, createCommentVNode as l, createBlock as w, withModifiers as L, toDisplayString as g, renderSlot as O, createStaticVNode as R, reactive as N, watch as _, onMounted as j, TransitionGroup as z, withCtx as D, Fragment as I, renderList as F, Transition as V } from "vue";
|
2
|
+
import { _ as B } from "./EmptyState-34d85f10.mjs";
|
3
|
+
import { _ as H, a as Y } from "./Chips-cc08d85a.mjs";
|
4
|
+
import { I as q } from "./IconEdit-eacf3856.mjs";
|
5
|
+
import { a as A } from "./auth-cfeacd61.mjs";
|
6
|
+
import { useRouter as G } from "vue-router";
|
7
|
+
import { _ as J } from "./_plugin-vue_export-helper-dad06003.mjs";
|
8
|
+
import { s as S } from "./globals-96ba60e4.mjs";
|
9
|
+
const K = {
|
10
|
+
key: 0,
|
11
|
+
class: "o-hidden bg-grey mn-small w-100"
|
12
|
+
}, Q = ["src"], W = ["src"], X = { class: "w-max mn-r-thin pd-thin radius-small t-semi bg-main" }, Z = {
|
13
|
+
key: 0,
|
14
|
+
class: "t-semi"
|
15
|
+
}, ee = { class: "t-semi" }, te = {
|
16
|
+
key: 0,
|
17
|
+
class: "t-semi uppercase"
|
18
|
+
}, ae = {
|
19
|
+
key: 1,
|
20
|
+
class: "cursor-pointer mn-thin flex-nowrap flex w-100"
|
21
|
+
}, re = {
|
22
|
+
key: 0,
|
23
|
+
class: ""
|
24
|
+
}, ne = {
|
25
|
+
key: 1,
|
26
|
+
class: "pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"
|
27
|
+
}, se = {
|
28
|
+
key: 2,
|
29
|
+
class: "mn-small p-big"
|
30
|
+
}, le = {
|
31
|
+
__name: "CardEvent",
|
32
|
+
props: ["event", "user", "short", "type"],
|
33
|
+
setup(e) {
|
34
|
+
const t = e;
|
35
|
+
h(/* @__PURE__ */ new Date()), G(), m(() => t.event.content.find((a) => a.type.name === "ImageUpload")), m(() => t.event.content.find((a) => a.type.name === "Textarea"));
|
36
|
+
const s = m(() => {
|
37
|
+
const a = /* @__PURE__ */ new Date(), u = Date.UTC(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate(), a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds()), n = new Date(t.event.date.start), o = Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate(), n.getUTCHours(), n.getUTCMinutes(), n.getUTCSeconds()) - u;
|
38
|
+
if (o < 0)
|
39
|
+
return "Finished";
|
40
|
+
if (o === 0)
|
41
|
+
return "Starting Now";
|
42
|
+
{
|
43
|
+
const k = Math.floor(o / 1e3), x = Math.floor(k / 60), E = Math.floor(x / 60), M = Math.floor(E / 24);
|
44
|
+
return M > 0 ? `${M} days until event` : E > 0 ? `${E} hours until event` : x > 0 ? `${x} minutes until event` : `${k} seconds until event`;
|
45
|
+
}
|
46
|
+
}), c = m(() => {
|
47
|
+
const a = new Date(t.event.date.start), u = { day: "2-digit", month: "2-digit" };
|
48
|
+
return a.toLocaleDateString(void 0, u);
|
49
|
+
}), d = m(() => {
|
50
|
+
const a = new Date(t.event.date.start), u = new Date(t.event.date.end), n = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(a), $ = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(u);
|
51
|
+
return `${n}-${$}`;
|
52
|
+
}), y = m(() => {
|
53
|
+
const a = t.event.name;
|
54
|
+
return a.length > 26 ? `${a.substring(0, 22)}…` : a;
|
55
|
+
});
|
56
|
+
return (a, u) => (r(), i("article", {
|
57
|
+
class: p({
|
58
|
+
"flex-nowrap flex-v-center flex": e.type === "short"
|
59
|
+
})
|
60
|
+
}, [
|
61
|
+
T(H, {
|
62
|
+
class: p({
|
63
|
+
"mn-small pd-medium": e.type !== "short",
|
64
|
+
"flex-child-order-last flex-child mn-l-small": e.type === "short"
|
65
|
+
}),
|
66
|
+
owner: e.event.owner,
|
67
|
+
creator: e.event.creator,
|
68
|
+
members: e.event.numberOfTickets,
|
69
|
+
membersPhotos: e.event.participantsPhotos,
|
70
|
+
type: e.type,
|
71
|
+
dateFormatted: C(s)
|
72
|
+
}, null, 8, ["class", "owner", "creator", "members", "membersPhotos", "type", "dateFormatted"]),
|
73
|
+
e.event.cover && e.type !== "short" ? (r(), i("div", K, [
|
74
|
+
f("img", {
|
75
|
+
src: (a.FILE_SERVER_URL || "") + e.event.cover,
|
76
|
+
alt: "Event image",
|
77
|
+
class: "z-index-1 d-block mn-auto h-20r"
|
78
|
+
}, null, 8, Q),
|
79
|
+
f("img", {
|
80
|
+
src: (a.FILE_SERVER_URL || "") + e.event.cover,
|
81
|
+
alt: "Event Background",
|
82
|
+
class: "z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",
|
83
|
+
style: { transform: "scale(1.5)", filter: "blur(2rem)", "-webkit-filter": "blur(2rem)" }
|
84
|
+
}, null, 8, W)
|
85
|
+
])) : l("", !0),
|
86
|
+
f("section", {
|
87
|
+
class: p(["w-100", { "pd-t-zero pd-medium": e.type !== "short" }])
|
88
|
+
}, [
|
89
|
+
e.user === e.event.creator.target._id ? (r(), w(q, {
|
90
|
+
key: 0,
|
91
|
+
onClick: u[0] || (u[0] = L((n) => a.$router.push({
|
92
|
+
name: "Edit Event",
|
93
|
+
params: {
|
94
|
+
url: e.event.url
|
95
|
+
}
|
96
|
+
}), ["stop"])),
|
97
|
+
class: "z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
|
98
|
+
})) : l("", !0),
|
99
|
+
f("div", {
|
100
|
+
class: p([{ "mn-small": e.type !== "short" }, "flex-v-center flex-nowrap flex"])
|
101
|
+
}, [
|
102
|
+
f("div", X, [
|
103
|
+
e.type !== "short" ? (r(), i("span", Z, g(C(c)) + " | ", 1)) : l("", !0),
|
104
|
+
f("span", ee, g(C(d)), 1)
|
105
|
+
]),
|
106
|
+
e.type === "short" ? (r(), i("span", te, g(C(y)), 1)) : l("", !0)
|
107
|
+
], 2),
|
108
|
+
e.type !== "short" ? (r(), i("div", ae, [
|
109
|
+
e.type !== "short" ? (r(), i("h3", re, g(e.event.name), 1)) : l("", !0),
|
110
|
+
e.event.status === "draft" ? (r(), i("div", ne, g(e.event.status), 1)) : l("", !0)
|
111
|
+
])) : l("", !0),
|
112
|
+
e.type !== "short" ? (r(), i("p", se, g(e.event.description), 1)) : l("", !0),
|
113
|
+
O(a.$slots, "default"),
|
114
|
+
e.type !== "short" && e.event.tags.length > 0 ? (r(), w(Y, {
|
115
|
+
key: 3,
|
116
|
+
chips: e.event.tags
|
117
|
+
}, null, 8, ["chips"])) : l("", !0)
|
118
|
+
], 2)
|
119
|
+
], 2));
|
120
|
+
}
|
121
|
+
}, ie = {}, ce = {
|
122
|
+
width: "100%",
|
123
|
+
height: "20rem",
|
124
|
+
xmlns: "http://www.w3.org/2000/svg"
|
125
|
+
}, ue = /* @__PURE__ */ R('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>', 6), oe = [
|
126
|
+
ue
|
127
|
+
];
|
128
|
+
function de(e, t) {
|
129
|
+
return r(), i("svg", ce, oe);
|
130
|
+
}
|
131
|
+
const me = /* @__PURE__ */ J(ie, [["render", de]]), U = A.create({ baseURL: process.env.API_URL, withCredentials: !0 }), v = N({
|
132
|
+
all: [],
|
133
|
+
filter: {
|
134
|
+
// query
|
135
|
+
tags: [],
|
136
|
+
period: "",
|
137
|
+
date: null
|
138
|
+
// pagination
|
139
|
+
},
|
140
|
+
pagination: {
|
141
|
+
page: 1,
|
142
|
+
perPage: 18
|
143
|
+
},
|
144
|
+
// Sort
|
145
|
+
sort: {
|
146
|
+
current: "popularity",
|
147
|
+
ascending: !1
|
148
|
+
},
|
149
|
+
current: {
|
150
|
+
_id: "",
|
151
|
+
cover: "",
|
152
|
+
url: "",
|
153
|
+
status: "",
|
154
|
+
name: "",
|
155
|
+
tags: [],
|
156
|
+
date: {
|
157
|
+
start: null,
|
158
|
+
false: null
|
159
|
+
},
|
160
|
+
views: 0,
|
161
|
+
content: []
|
162
|
+
}
|
163
|
+
});
|
164
|
+
async function P(e = {}) {
|
165
|
+
e.params = e.params || {}, e.params.skip = e.skip || 0, e.params.limit = e.limit || 9, e.params.tags = e.tags || [], e.status && (e.params = { status: e.status }), e.url && (e.params = { url: e.url }), e.period && (e.params.period = e.period), e.category && (e.params.category = e.category), e.organization && (e.params.organization = e.organization), e.date && (e.params.date = e.date), e.participant && (e.params.participant = e.participant), e.owner && (e.params.owner = e.owner), e.creator && (e.params.creator = e.creator), e.user && (e.params.user = e.user), e.sortOrder && (e.params.sortOrder = e.sortOrder), e.sortParam && (e.params.sortParam = e.sortParam), e.params.skip = e.skip || 0, e.params.limit = e.limit || 10;
|
166
|
+
try {
|
167
|
+
console.log("Request params:" + e.params);
|
168
|
+
const t = await U.get("/api/events/read", { params: e.params });
|
169
|
+
return console.log(e.params), e.url ? b(t.data, "current") : b(t.data, "all"), Promise.resolve(t.data);
|
170
|
+
} catch (t) {
|
171
|
+
return S(t), Promise.reject(t);
|
172
|
+
}
|
173
|
+
}
|
174
|
+
async function fe(e) {
|
175
|
+
return U.post("/api/events/create", e).then(
|
176
|
+
(t) => (b(t.data, "current"), Promise.resolve(t.data)),
|
177
|
+
(t) => (S(t), Promise.reject(t))
|
178
|
+
);
|
179
|
+
}
|
180
|
+
async function ge(e) {
|
181
|
+
return U.post("/api/events/update", e).then(
|
182
|
+
(t) => (b(t.data, "current"), Promise.resolve(t.data)),
|
183
|
+
(t) => (S(t), Promise.reject(t))
|
184
|
+
);
|
185
|
+
}
|
186
|
+
async function he(e) {
|
187
|
+
return await U.delete(`/api/events/delete/${e}`).then(
|
188
|
+
(t) => {
|
189
|
+
const s = v.all.findIndex((c) => c._id === e);
|
190
|
+
return s !== -1 && v.all.splice(s, 1), Promise.resolve(t.data);
|
191
|
+
},
|
192
|
+
(t) => (S(t), Promise.reject(t))
|
193
|
+
);
|
194
|
+
}
|
195
|
+
function b(e, t) {
|
196
|
+
v[t] = e;
|
197
|
+
}
|
198
|
+
function ve() {
|
199
|
+
v.current = {
|
200
|
+
_id: "",
|
201
|
+
cover: "",
|
202
|
+
url: "",
|
203
|
+
status: "",
|
204
|
+
name: "",
|
205
|
+
tags: [],
|
206
|
+
date: {
|
207
|
+
start: null,
|
208
|
+
false: null
|
209
|
+
},
|
210
|
+
views: 0,
|
211
|
+
content: []
|
212
|
+
};
|
213
|
+
}
|
214
|
+
_(v, (e, t) => {
|
215
|
+
});
|
216
|
+
const Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
217
|
+
__proto__: null,
|
218
|
+
clean: ve,
|
219
|
+
create: fe,
|
220
|
+
read: P,
|
221
|
+
remove: he,
|
222
|
+
set: b,
|
223
|
+
state: v,
|
224
|
+
update: ge
|
225
|
+
}, Symbol.toStringTag, { value: "Module" })), ye = { class: "feed" }, $e = {
|
226
|
+
__name: "Feed",
|
227
|
+
props: {
|
228
|
+
category: {
|
229
|
+
type: String,
|
230
|
+
default: null
|
231
|
+
},
|
232
|
+
selectedDate: {
|
233
|
+
type: String,
|
234
|
+
default: null
|
235
|
+
},
|
236
|
+
organization: {
|
237
|
+
type: String,
|
238
|
+
default: null
|
239
|
+
},
|
240
|
+
owner: {
|
241
|
+
type: String,
|
242
|
+
default: null
|
243
|
+
},
|
244
|
+
creator: {
|
245
|
+
type: String,
|
246
|
+
default: null
|
247
|
+
},
|
248
|
+
user: {
|
249
|
+
type: [String, Number],
|
250
|
+
default: null
|
251
|
+
},
|
252
|
+
sortOrder: {
|
253
|
+
type: String,
|
254
|
+
default: "desc"
|
255
|
+
},
|
256
|
+
participant: {
|
257
|
+
type: String,
|
258
|
+
default: null
|
259
|
+
},
|
260
|
+
period: {
|
261
|
+
type: String,
|
262
|
+
default: null
|
263
|
+
},
|
264
|
+
status: {
|
265
|
+
type: String,
|
266
|
+
default: null
|
267
|
+
}
|
268
|
+
},
|
269
|
+
setup(e) {
|
270
|
+
const t = e, s = h([]), c = h(!1), d = h(!0), y = h(0), a = h(20), u = async () => {
|
271
|
+
if (c.value) {
|
272
|
+
y.value += a.value;
|
273
|
+
const n = await P({
|
274
|
+
skip: y.value,
|
275
|
+
limit: a.value,
|
276
|
+
category: t.category,
|
277
|
+
sortOrder: t.sortOrder,
|
278
|
+
participant: t.participant,
|
279
|
+
creator: t.creator,
|
280
|
+
user: t.user,
|
281
|
+
date: t.selectedDate,
|
282
|
+
owner: t.owner,
|
283
|
+
organization: t.organization,
|
284
|
+
period: t.period,
|
285
|
+
status: t.status
|
286
|
+
});
|
287
|
+
n.length === 0 ? c.value = !1 : c.value = !0, s.value = [...s.value, ...n];
|
288
|
+
}
|
289
|
+
};
|
290
|
+
return j(async () => {
|
291
|
+
d.value = !0, console.log(t.selectedDate);
|
292
|
+
const n = await P({
|
293
|
+
skip: y.value,
|
294
|
+
limit: a.value,
|
295
|
+
category: t.category,
|
296
|
+
participant: t.participant,
|
297
|
+
sortOrder: t.sortOrder,
|
298
|
+
user: t.user,
|
299
|
+
owner: t.owner,
|
300
|
+
creator: t.creator,
|
301
|
+
date: t.selectedDate,
|
302
|
+
organization: t.organization,
|
303
|
+
period: t.period,
|
304
|
+
status: t.status
|
305
|
+
});
|
306
|
+
n.length === 0 ? c.value = !1 : c.value = !0, s.value = n, d.value = !1;
|
307
|
+
}), (n, $) => (r(), i("section", ye, [
|
308
|
+
T(z, {
|
309
|
+
tag: "ul",
|
310
|
+
name: "fade",
|
311
|
+
class: "o-hidden bg-grey radius-big"
|
312
|
+
}, {
|
313
|
+
default: D(() => [
|
314
|
+
d.value ? (r(!0), i(I, { key: 0 }, F(a.value, (o) => (r(), w(me, { key: o }))), 128)) : l("", !0)
|
315
|
+
]),
|
316
|
+
_: 1
|
317
|
+
}),
|
318
|
+
T(V, { name: "fade" }, {
|
319
|
+
default: D(() => [
|
320
|
+
!d.value && s.value.length < 1 ? (r(), w(B, {
|
321
|
+
key: 0,
|
322
|
+
title: "No Events Found",
|
323
|
+
description: "Currently, there are no events available. Please check back later.",
|
324
|
+
class: "pd-medium mn-thin bg-grey radius-big"
|
325
|
+
})) : l("", !0)
|
326
|
+
]),
|
327
|
+
_: 1
|
328
|
+
}),
|
329
|
+
T(z, {
|
330
|
+
tag: "ul",
|
331
|
+
name: "fade",
|
332
|
+
class: "container"
|
333
|
+
}, {
|
334
|
+
default: D(() => [
|
335
|
+
!d.value && s.value.length > 0 ? (r(!0), i(I, { key: 0 }, F(s.value, (o, k) => (r(), w(le, {
|
336
|
+
onClick: (x) => n.$router.push({ name: "Event", params: { url: o.url } }),
|
337
|
+
key: o._id,
|
338
|
+
event: o,
|
339
|
+
owner: e.user,
|
340
|
+
type: "normal",
|
341
|
+
class: p(["bg-grey radius-big mn-medium", {
|
342
|
+
"br-b br-solid br-black-transp-10": k !== s.value.length - 1
|
343
|
+
}])
|
344
|
+
}, null, 8, ["onClick", "event", "owner", "class"]))), 128)) : l("", !0),
|
345
|
+
c.value && s.value.length > 0 ? (r(), i("button", {
|
346
|
+
key: 1,
|
347
|
+
onClick: u,
|
348
|
+
class: "w-100 bg-main button"
|
349
|
+
}, "Load more")) : l("", !0)
|
350
|
+
]),
|
351
|
+
_: 1
|
352
|
+
})
|
353
|
+
]));
|
354
|
+
}
|
355
|
+
};
|
356
|
+
export {
|
357
|
+
me as S,
|
358
|
+
$e as _,
|
359
|
+
le as a,
|
360
|
+
fe as b,
|
361
|
+
ve as c,
|
362
|
+
Ue as e,
|
363
|
+
P as r,
|
364
|
+
v as s,
|
365
|
+
ge as u
|
366
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),N=require("./EmptyState-7658d7d6.js"),C=require("./Chips-32092a52.js"),T=require("./IconEdit-4cfe2115.js"),V=require("./auth-b61483ce.js"),D=require("vue-router"),U=require("./_plugin-vue_export-helper-f246444f.js"),v=require("./globals-928eb13c.js"),$={key:0,class:"o-hidden bg-grey mn-small w-100"},z=["src"],P=["src"],M={class:"w-max mn-r-thin pd-thin radius-small t-semi bg-main"},I={key:0,class:"t-semi"},F={class:"t-semi"},L={key:0,class:"t-semi uppercase"},R={key:1,class:"cursor-pointer mn-thin flex-nowrap flex w-100"},O={key:0,class:""},_={key:1,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},q={key:2,class:"mn-small p-big"},b={__name:"CardEvent",props:["event","user","short","type"],setup(t){const r=t;e.ref(new Date),D.useRouter(),e.computed(()=>r.event.content.find(a=>a.type.name==="ImageUpload")),e.computed(()=>r.event.content.find(a=>a.type.name==="Textarea"));const s=e.computed(()=>{const a=new Date,c=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds()),n=new Date(r.event.date.start),o=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds())-c;if(o<0)return"Finished";if(o===0)return"Starting Now";{const f=Math.floor(o/1e3),g=Math.floor(f/60),k=Math.floor(g/60),w=Math.floor(k/24);return w>0?`${w} days until event`:k>0?`${k} hours until event`:g>0?`${g} minutes until event`:`${f} seconds until event`}}),l=e.computed(()=>{const a=new Date(r.event.date.start),c={day:"2-digit",month:"2-digit"};return a.toLocaleDateString(void 0,c)}),i=e.computed(()=>{const a=new Date(r.event.date.start),c=new Date(r.event.date.end),n=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(a),p=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(c);return`${n}-${p}`}),d=e.computed(()=>{const a=r.event.name;return a.length>26?`${a.substring(0,22)}…`:a});return(a,c)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass({"flex-nowrap flex-v-center flex":t.type==="short"})},[e.createVNode(C._sfc_main,{class:e.normalizeClass({"mn-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),owner:t.event.owner,creator:t.event.creator,members:t.event.numberOfTickets,membersPhotos:t.event.participantsPhotos,type:t.type,dateFormatted:e.unref(s)},null,8,["class","owner","creator","members","membersPhotos","type","dateFormatted"]),t.event.cover&&t.type!=="short"?(e.openBlock(),e.createElementBlock("div",$,[e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+t.event.cover,alt:"Event image",class:"z-index-1 d-block mn-auto h-20r"},null,8,z),e.createElementVNode("img",{src:(a.FILE_SERVER_URL||"")+t.event.cover,alt:"Event Background",class:"z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",style:{transform:"scale(1.5)",filter:"blur(2rem)","-webkit-filter":"blur(2rem)"}},null,8,P)])):e.createCommentVNode("",!0),e.createElementVNode("section",{class:e.normalizeClass(["w-100",{"pd-t-zero pd-medium":t.type!=="short"}])},[t.user===t.event.creator.target._id?(e.openBlock(),e.createBlock(T.IconEdit,{key:0,onClick:c[0]||(c[0]=e.withModifiers(n=>a.$router.push({name:"Edit Event",params:{url:t.event.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass([{"mn-small":t.type!=="short"},"flex-v-center flex-nowrap flex"])},[e.createElementVNode("div",M,[t.type!=="short"?(e.openBlock(),e.createElementBlock("span",I,e.toDisplayString(e.unref(l))+" | ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",F,e.toDisplayString(e.unref(i)),1)]),t.type==="short"?(e.openBlock(),e.createElementBlock("span",L,e.toDisplayString(e.unref(d)),1)):e.createCommentVNode("",!0)],2),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",R,[t.type!=="short"?(e.openBlock(),e.createElementBlock("h3",O,e.toDisplayString(t.event.name),1)):e.createCommentVNode("",!0),t.event.status==="draft"?(e.openBlock(),e.createElementBlock("div",_,e.toDisplayString(t.event.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("p",q,e.toDisplayString(t.event.description),1)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default"),t.type!=="short"&&t.event.tags.length>0?(e.openBlock(),e.createBlock(C._sfc_main$1,{key:3,chips:t.event.tags},null,8,["chips"])):e.createCommentVNode("",!0)],2)],2))}},j={},H={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},G=e.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',6),Y=[G];function A(t,r){return e.openBlock(),e.createElementBlock("svg",H,Y)}const E=U._export_sfc(j,[["render",A]]),y=V.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),u=e.reactive({all:[],filter:{tags:[],period:"",date:null},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",cover:"",url:"",status:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}});async function h(t={}){t.params=t.params||{},t.params.skip=t.skip||0,t.params.limit=t.limit||9,t.params.tags=t.tags||[],t.status&&(t.params={status:t.status}),t.url&&(t.params={url:t.url}),t.period&&(t.params.period=t.period),t.category&&(t.params.category=t.category),t.organization&&(t.params.organization=t.organization),t.date&&(t.params.date=t.date),t.participant&&(t.params.participant=t.participant),t.owner&&(t.params.owner=t.owner),t.creator&&(t.params.creator=t.creator),t.user&&(t.params.user=t.user),t.sortOrder&&(t.params.sortOrder=t.sortOrder),t.sortParam&&(t.params.sortParam=t.sortParam),t.params.skip=t.skip||0,t.params.limit=t.limit||10;try{console.log("Request params:"+t.params);const r=await y.get("/api/events/read",{params:t.params});return console.log(t.params),t.url?m(r.data,"current"):m(r.data,"all"),Promise.resolve(r.data)}catch(r){return v.setError(r),Promise.reject(r)}}async function x(t){return y.post("/api/events/create",t).then(r=>(m(r.data,"current"),Promise.resolve(r.data)),r=>(v.setError(r),Promise.reject(r)))}async function B(t){return y.post("/api/events/update",t).then(r=>(m(r.data,"current"),Promise.resolve(r.data)),r=>(v.setError(r),Promise.reject(r)))}async function J(t){return await y.delete(`/api/events/delete/${t}`).then(r=>{const s=u.all.findIndex(l=>l._id===t);return s!==-1&&u.all.splice(s,1),Promise.resolve(r.data)},r=>(v.setError(r),Promise.reject(r)))}function m(t,r){u[r]=t}function S(){u.current={_id:"",cover:"",url:"",status:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}}e.watch(u,(t,r)=>{});const K=Object.freeze(Object.defineProperty({__proto__:null,clean:S,create:x,read:h,remove:J,set:m,state:u,update:B},Symbol.toStringTag,{value:"Module"})),Q={class:"feed"},W={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},creator:{type:String,default:null},user:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(t){const r=t,s=e.ref([]),l=e.ref(!1),i=e.ref(!0),d=e.ref(0),a=e.ref(20),c=async()=>{if(l.value){d.value+=a.value;const n=await h({skip:d.value,limit:a.value,category:r.category,sortOrder:r.sortOrder,participant:r.participant,creator:r.creator,user:r.user,date:r.selectedDate,owner:r.owner,organization:r.organization,period:r.period,status:r.status});n.length===0?l.value=!1:l.value=!0,s.value=[...s.value,...n]}};return e.onMounted(async()=>{i.value=!0,console.log(r.selectedDate);const n=await h({skip:d.value,limit:a.value,category:r.category,participant:r.participant,sortOrder:r.sortOrder,user:r.user,owner:r.owner,creator:r.creator,date:r.selectedDate,organization:r.organization,period:r.period,status:r.status});n.length===0?l.value=!1:l.value=!0,s.value=n,i.value=!1}),(n,p)=>(e.openBlock(),e.createElementBlock("section",Q,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[i.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,o=>(e.openBlock(),e.createBlock(E,{key:o}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!i.value&&s.value.length<1?(e.openBlock(),e.createBlock(N._sfc_main,{key:0,title:"No Events Found",description:"Currently, there 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(()=>[!i.value&&s.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.value,(o,f)=>(e.openBlock(),e.createBlock(b,{onClick:g=>n.$router.push({name:"Event",params:{url:o.url}}),key:o._id,event:o,owner:t.user,type:"normal",class:e.normalizeClass(["bg-grey radius-big mn-medium",{"br-b br-solid br-black-transp-10":f!==s.value.length-1}])},null,8,["onClick","event","owner","class"]))),128)):e.createCommentVNode("",!0),l.value&&s.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:c,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports.SkeletonEvent=E;exports._sfc_main=W;exports._sfc_main$1=b;exports.clean=S;exports.create=x;exports.events=K;exports.read=h;exports.state=u;exports.update=B;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),V=require("./EmptyState-7658d7d6.js"),S=require("./_plugin-vue_export-helper-f246444f.js"),v=require("./Chips-92ccc11f.js"),$=require("vue-router"),w=require("./auth-b61483ce.js"),u=require("./globals-928eb13c.js"),R=require("./IconEdit-4cfe2115.js"),f=w.axios.create({baseURL:process.env.API_URL,withCredentials:!0});f.defaults.withCredentials=!0;const i=e.reactive({all:[],filter:{tags:[],period:""},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",url:"",status:"",name:"",tags:[],owner:{},date:"",views:0,content:[]}});async function k(t={}){t.params=t.params||{},t.params.skip=t.skip||0,t.params.limit=t.limit||9,t.params.tags=t.tags||[],t.period&&(t.params.period=t.period),t.url&&(t.params={url:t.url}),t.category&&(t.params.category=t.category),t.organization&&(t.params.organization=t.organization),t.owner&&(t.params.owner=t.owner),t.creator&&(t.params.creator=t.creator),t.status&&(t.params.status=t.status),t.user&&(t.params.user=t.user),t.params.skip=t.skip||0,t.params.limit=t.limit||10;try{console.log("Request params:"+t.params);const r=await f.get("/api/blog/read",{params:t.params});return t.url?g(r.data,"current"):g(r.data,"all"),Promise.resolve(r.data)}catch(r){return u.setError(r),Promise.reject(r)}}async function B(t){return f.post("/api/blog/create",t).then(r=>(g(r.data,"current"),Promise.resolve(r.data)),r=>(u.setError(r),Promise.reject(r)))}async function E(t){return f.post("/api/blog/update",t).then(r=>(g(r.data,"current"),Promise.resolve(r.data)),r=>(u.setError(r),Promise.reject(r)))}async function _(t){return await f.delete(`/api/blog/delete/${t}`).then(r=>{const o=i.all.findIndex(a=>a._id===t);return o!==-1&&i.all.splice(o,1),Promise.resolve(r.data)},r=>(u.setError(r),Promise.reject(r)))}function g(t,r){i[r]=t}function P(){i.current={_id:"",url:"",status:"",name:"",tags:[],author:"",owner:"",date:"",views:0,content:[]}}function j(t){const r={order:i.project.content.length+1,type:t.type,data:t.data,class:t.class,content:t.content};i.project.content.push(r)}e.watch(i,(t,r)=>{});const I=Object.freeze(Object.defineProperty({__proto__:null,blockAdd:j,clean:P,create:B,read:k,remove:_,set:g,state:i,update:E},Symbol.toStringTag,{value:"Module"})),L={props:{progress:{type:Number,default:null},status:{type:String,default:null}}},z={class:"circular-loader"},D=e.createElementVNode("svg",{viewBox:"25 25 50 50"},[e.createElementVNode("circle",{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"4","stroke-miterlimit":"10"})],-1),q={key:0,class:"progress-text"},T={key:1,class:"uppercase t-semi w-m-10r status-text"};function O(t,r,o,a,s,l){return e.openBlock(),e.createElementBlock("div",z,[D,o.progress?(e.openBlock(),e.createElementBlock("div",q,e.toDisplayString(o.progress),1)):e.createCommentVNode("",!0),o.status?(e.openBlock(),e.createElementBlock("div",T,e.toDisplayString(o.status),1)):e.createCommentVNode("",!0)])}const x=S._export_sfc(L,[["render",O]]),y=w.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),d=e.reactive({reactions:[],error:null}),b={async read({user:t,type:r,target:o,role:a}){try{const s=await y.get("/api/reactions",{params:{user:t,type:r,target:o,role:a}});return d.error=null,d.reactions=s.data,Promise.resolve(s.data)}catch(s){return u.setError(s),Promise.reject(s)}},async create(t){try{const r=await y.post("/api/reactions/create",t);return d.error=null,Promise.resolve(r.data)}catch(r){return console.log(r),u.setError(r),Promise.reject(r)}},async update(t){try{const r=await y.post("/api/reactions/update",t);return d.error=null,Promise.resolve(r.data)}catch(r){return u.setError(r),Promise.reject(r)}},async delete(t){try{const r=await y.post("/api/reactions/delete",t);return d.error=null,Promise.resolve(r.data)}catch(r){return u.setError(r),Promise.reject(r)}}},U={handleReactionUpdate(t,r,o){let a;if(Array.isArray(t)?a=t.find(s=>s._id===r.target):typeof t=="object"&&t._id===r.target&&(a=t),a)if(a.hasReaction=o,o)a.reactions.push(r),a.numberOfReactions+=1;else{const s=a.reactions.findIndex(l=>l._id===r._id);s!==-1&&(a.reactions.splice(s,1),a.numberOfReactions-=1)}}};e.watch(d,t=>{});const A=Object.freeze(Object.defineProperty({__proto__:null,actions:b,mutations:U,state:d},Symbol.toStringTag,{value:"Module"})),M={class:"t-semi br-top-dark flex-nowrap flex-nojustify flex"},F=e.createElementVNode("span",{class:"mn-r-small mn-l-small d-block"},"·",-1),H={class:"cursor-pointer"},G=e.createElementVNode("span",{class:"mn-r-small mn-l-small d-block"},"·",-1),N={__name:"FooterBlogpost",props:["blogpost","owner","user"],setup(t){const r=t,o=e.ref(r.blogpost.numberOfReactions),a=e.ref(r.blogpost.isReacted),s=e.ref(r.blogpost.reactionId);async function l(m){if(!r.user){alert("Please login to add a reaction");return}try{const n={target:r.blogpost._id,type:"blogpost",user:r.user,class:"like"},p=await b.create(n);p.reaction.class==="like"&&(o.value+=1,a.value=!0,s.value=p.reaction._id)}catch(n){console.error(n),alert("Error adding reaction. Please try again later.")}}async function c(m){if(!r.user){alert("Please login to add a reaction");return}try{const n={_id:s.value};await b.delete(n),o.value-=1,a.value=!1,s.value=null}catch{alert("Error adding reaction. Please try again later.")}}return(m,n)=>(e.openBlock(),e.createElementBlock("footer",M,[e.createTextVNode(" 👁️ "+e.toDisplayString(t.blogpost.views)+" ",1),F,e.createElementVNode("div",H,[a.value?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"cursor-pointer",onClick:n[0]||(n[0]=p=>l())}," 👍 "+e.toDisplayString(o.value),1)),a.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:"cursor-pointer",onClick:n[1]||(n[1]=p=>c())}," 👍 "+e.toDisplayString(o.value),1)):e.createCommentVNode("",!0)]),G,e.createTextVNode(" 💬 "+e.toDisplayString(t.blogpost.numberOfComments),1)]))}},J={class:"bg-grey radius-big"},K=["src"],Q={class:"pd-t-zero pd-medium"},W={key:0,class:"cursor-pointer mn-thin flex-nowrap flex w-100"},X={key:0,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},Y={key:1,class:"mn-small t-transp p-big"},Z={key:2,class:"mn-small h2"},C={__name:"CardBlogpost",props:["blogpost","user","type"],setup(t){const r=t,o=$.useRouter(),a=e.computed(()=>r.blogpost.content.find(l=>l.type==="ImageUpload")),s=e.computed(()=>r.blogpost.content.find(l=>l.type==="Textarea"));return(l,c)=>(e.openBlock(),e.createElementBlock("article",J,[t.user===t.blogpost.creator.target._id?(e.openBlock(),e.createBlock(R.IconEdit,{key:0,onClick:c[0]||(c[0]=e.withModifiers(m=>l.$router.push({name:"Edit BlogPost",params:{url:t.blogpost.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),e.createVNode(v._sfc_main,{class:e.normalizeClass({"mn-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),owner:t.blogpost.owner,creator:t.blogpost.creator,date:t.blogpost.createdAt},null,8,["class","owner","creator","date"]),e.unref(a)&&e.unref(a).content&&t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("img",{key:1,src:(l.FILE_SERVER_URL||"")+e.unref(a).content,alt:"Blog post image",class:"mn-medium object-fit-cover w-100 h-20r"},null,8,K)):e.createCommentVNode("",!0),e.createElementVNode("section",Q,[t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("div",W,[e.createElementVNode("h3",{onClick:c[1]||(c[1]=m=>e.unref(o).push({name:"BlogPost",params:{url:t.blogpost.url}})),class:""},e.toDisplayString(t.blogpost.name),1),t.blogpost.status==="draft"?(e.openBlock(),e.createElementBlock("div",X,e.toDisplayString(t.blogpost.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.unref(s)&&e.unref(s).content&&t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("p",Y,e.toDisplayString(e.unref(s).content.slice(0,120))+"... ",1)):e.createCommentVNode("",!0),t.type==="blogpostPage"?(e.openBlock(),e.createElementBlock("h3",Z,e.toDisplayString(t.blogpost.name),1)):e.createCommentVNode("",!0),e.renderSlot(l.$slots,"default"),t.type!=="short"&&t.blogpost.tags.length>0?(e.openBlock(),e.createBlock(v._sfc_main$1,{key:3,chips:t.blogpost.tags},null,8,["chips"])):e.createCommentVNode("",!0)]),e.createVNode(N,{class:"pd-t-zero pd-medium",blogpost:t.blogpost,user:t.user},null,8,["blogpost","user"])]))}},ee={class:"feed"},te={key:1},re={__name:"Feed",props:{category:{type:String,default:null},owner:{type:String,default:null},creator:{type:String,default:null},status:{type:String,default:"published"},user:{type:[String,Number],default:null},period:{type:String,default:null}},setup(t){const r=t,o=e.ref([]),a=e.ref(!0);let s=e.ref(!0),l=e.ref(0),c=e.ref(7);const m=async()=>{if(a.value){l.value+=c.value;const n=await k({skip:l.value,limit:c.value,category:r.category,user:r.user,owner:r.owner,status:r.status,creator:r.creator,period:r.period});n.length===0&&(a.value=!1),o.value=[...o.value,...n]}};return e.onMounted(async()=>{const n=await k({skip:l.value,limit:c.value,category:r.category,user:r.user,owner:r.owner,status:r.status,creator:r.creator,period:r.period});n.length===0?a.value=!1:a.value=!0,o.value=n,s.value=!1}),(n,p)=>(e.openBlock(),e.createElementBlock("section",ee,[e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createBlock(x,{key:0,class:"z-index-5 pos-t-50 left-t-50 pos-absolute"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!e.unref(s)&&o.value.length<1?(e.openBlock(),e.createBlock(V._sfc_main,{key:0,title:"No Blog Posts Found",description:"Currently, there are no posts available in this blog. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):(e.openBlock(),e.createElementBlock("div",te,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,h=>(e.openBlock(),e.createBlock(C,{key:h._id,blogpost:h,user:t.user,class:"mn-medium"},null,8,["blogpost","user"]))),128)),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[a.value&&o.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:m,class:"w-100 bg-main button"}," Load more ")):e.createCommentVNode("",!0)]),_:1})]))]),_:1})]))}};exports.Loader=x;exports._sfc_main=re;exports._sfc_main$1=C;exports._sfc_main$2=N;exports.blogposts=I;exports.clean=P;exports.create=B;exports.reactions=A;exports.read=k;exports.remove=_;exports.state=i;exports.update=E;
|