@ozdao/prometheus-framework 0.0.85 → 0.0.86
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-628f013e.mjs +138 -0
- package/dist/ButtonFollow-728aab73.mjs +130 -0
- package/dist/CardHeader-ce5a1a75.mjs +96 -0
- package/dist/CardOrganization-58b54995.js +1 -0
- package/dist/CardOrganization-91e79698.mjs +320 -0
- package/dist/Comments-c092550f.mjs +76 -0
- package/dist/EditProductImages-61ff4321.mjs +236 -0
- package/dist/Feed-926cf4f3.mjs +355 -0
- package/dist/Feed-a31c43c2.mjs +423 -0
- package/dist/PlaceholderUserpic-995da0fc.mjs +28 -0
- package/dist/Popup-0c791801.mjs +76 -0
- package/dist/Product-6c37ef35.js +7 -0
- package/dist/Product-7087b358.mjs +837 -0
- package/dist/ProductEdit-c5067942.mjs +113 -0
- package/dist/ProfileBlogposts-79d5c858.mjs +63 -0
- package/dist/ProfileComments-48f3d4bc.mjs +43 -0
- package/dist/ProfileEvents-20695376.mjs +55 -0
- package/dist/ProfileLikes-503712ec.mjs +43 -0
- package/dist/ProfileOrganizations-3f305f4e.mjs +210 -0
- package/dist/ProfileOrganizations-50fce34e.js +1 -0
- package/dist/Publics-49dbeafc.js +1 -0
- package/dist/Publics-b0fad2b0.mjs +1926 -0
- package/dist/UploadImage-d1dbc280.mjs +99 -0
- package/dist/auth-35ef1791.mjs +1502 -0
- package/dist/auth.client.js +3 -3
- package/dist/auth.validation-29113f37.mjs +20 -0
- package/dist/categories-d669f3af.mjs +225 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +11 -11
- package/dist/events.client.js +9 -9
- package/dist/modules/icons/entities/IconCommunity.vue.d.ts +2 -0
- package/dist/organizations.client.cjs +2 -2
- package/dist/organizations.client.js +17 -17
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +244 -207
- package/package.json +1 -1
- package/src/modules/icons/entities/IconCommunity.vue +8 -0
- package/src/modules/organizations/components/blocks/CardOrganization.vue +2 -2
- package/src/modules/organizations/components/sections/Publics.vue +1 -0
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/users/components/pages/Profile.vue +15 -4
@@ -0,0 +1,355 @@
|
|
1
|
+
import { openBlock as r, createElementBlock as s, Fragment as P, renderList as M, normalizeClass as y, toDisplayString as f, ref as v, computed as g, createVNode as C, unref as x, createElementVNode as h, createCommentVNode as c, renderSlot as O, createBlock as T, createStaticVNode as F, reactive as I, watch as j, onMounted as L, TransitionGroup as N, withCtx as D, Transition as R } from "vue";
|
2
|
+
import { _ as V } from "./EmptyState-34d85f10.mjs";
|
3
|
+
import { _ as B } from "./CardHeader-ce5a1a75.mjs";
|
4
|
+
import { _ as H, a as A } from "./auth-35ef1791.mjs";
|
5
|
+
import { useRouter as Y } from "vue-router";
|
6
|
+
import { s as S } from "./globals-96ba60e4.mjs";
|
7
|
+
const q = { class: "flex-v-center flex-nowrap flex" }, G = {
|
8
|
+
key: 1,
|
9
|
+
class: "pd-thin radius-small t-semi bg-white"
|
10
|
+
}, J = {
|
11
|
+
__name: "Chips",
|
12
|
+
props: ["chips"],
|
13
|
+
setup(e) {
|
14
|
+
return (t, i) => (r(), s("div", q, [
|
15
|
+
e.chips.length ? (r(!0), s(P, { key: 0 }, M(e.chips, (l, u) => (r(), s("div", {
|
16
|
+
class: y(["pd-thin radius-small t-semi bg-main", { "mn-r-thin": u !== e.chips.length - 1 }])
|
17
|
+
}, f(l.text ? l.text : l), 3))), 256)) : (r(), s("div", G, f(e.chips), 1))
|
18
|
+
]));
|
19
|
+
}
|
20
|
+
}, K = {
|
21
|
+
key: 0,
|
22
|
+
class: "o-hidden bg-grey mn-small w-100"
|
23
|
+
}, Q = ["src"], W = ["src"], X = { class: "w-max mn-r-thin pd-thin radius-small t-semi bg-main" }, Z = {
|
24
|
+
key: 0,
|
25
|
+
class: "t-semi"
|
26
|
+
}, ee = { class: "t-semi" }, te = {
|
27
|
+
key: 0,
|
28
|
+
class: "t-semi uppercase"
|
29
|
+
}, ae = {
|
30
|
+
key: 0,
|
31
|
+
class: "cursor-pointer mn-thin"
|
32
|
+
}, re = {
|
33
|
+
key: 1,
|
34
|
+
class: "mn-small p-big"
|
35
|
+
}, ne = {
|
36
|
+
__name: "CardEvent",
|
37
|
+
props: ["event", "user", "short", "type"],
|
38
|
+
setup(e) {
|
39
|
+
const t = e;
|
40
|
+
v(/* @__PURE__ */ new Date()), Y(), g(() => t.event.content.find((a) => a.type.name === "ImageUpload")), g(() => t.event.content.find((a) => a.type.name === "Textarea"));
|
41
|
+
const i = g(() => {
|
42
|
+
const a = /* @__PURE__ */ new Date(), d = 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()) - d;
|
43
|
+
if (o < 0)
|
44
|
+
return "Finished";
|
45
|
+
if (o === 0)
|
46
|
+
return "Starting Now";
|
47
|
+
{
|
48
|
+
const b = Math.floor(o / 1e3), k = Math.floor(b / 60), _ = Math.floor(k / 60), E = Math.floor(_ / 24);
|
49
|
+
return E > 0 ? `${E} days until event` : _ > 0 ? `${_} hours until event` : k > 0 ? `${k} minutes until event` : `${b} seconds until event`;
|
50
|
+
}
|
51
|
+
}), l = g(() => {
|
52
|
+
const a = new Date(t.event.date.start), d = { day: "2-digit", month: "2-digit" };
|
53
|
+
return a.toLocaleDateString(void 0, d);
|
54
|
+
}), u = g(() => {
|
55
|
+
const a = new Date(t.event.date.start), d = new Date(t.event.date.end), n = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(a), U = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(d);
|
56
|
+
return `${n}-${U}`;
|
57
|
+
}), p = g(() => {
|
58
|
+
const a = t.event.name;
|
59
|
+
return a.length > 26 ? `${a.substring(0, 22)}…` : a;
|
60
|
+
});
|
61
|
+
return (a, d) => (r(), s("article", {
|
62
|
+
class: y({
|
63
|
+
"flex-nowrap flex-v-center flex": e.type === "short"
|
64
|
+
})
|
65
|
+
}, [
|
66
|
+
C(B, {
|
67
|
+
class: y({
|
68
|
+
"mn-small pd-medium": e.type !== "short",
|
69
|
+
"flex-child-order-last flex-child mn-l-small": e.type === "short"
|
70
|
+
}),
|
71
|
+
owner: e.event.owner,
|
72
|
+
creator: e.event.creator,
|
73
|
+
members: e.event.numberOfTickets,
|
74
|
+
membersPhotos: e.event.participantsPhotos,
|
75
|
+
type: e.type,
|
76
|
+
dateFormatted: x(i)
|
77
|
+
}, null, 8, ["class", "owner", "creator", "members", "membersPhotos", "type", "dateFormatted"]),
|
78
|
+
e.event.cover && e.type !== "short" ? (r(), s("div", K, [
|
79
|
+
h("img", {
|
80
|
+
src: e.event.cover,
|
81
|
+
alt: "Event image",
|
82
|
+
class: "z-index-1 d-block mn-auto h-20r"
|
83
|
+
}, null, 8, Q),
|
84
|
+
h("img", {
|
85
|
+
src: e.event.cover,
|
86
|
+
alt: "Event image",
|
87
|
+
class: "z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",
|
88
|
+
style: { transform: "scale(1.5)", filter: "blur(2rem)", "-webkit-filter": "blur(2rem)" }
|
89
|
+
}, null, 8, W)
|
90
|
+
])) : c("", !0),
|
91
|
+
h("section", {
|
92
|
+
class: y(["w-100", { "pd-t-zero pd-medium": e.type !== "short" }])
|
93
|
+
}, [
|
94
|
+
h("div", {
|
95
|
+
class: y([{ "mn-small": e.type !== "short" }, "flex-v-center flex-nowrap flex"])
|
96
|
+
}, [
|
97
|
+
h("div", X, [
|
98
|
+
e.type !== "short" ? (r(), s("span", Z, f(x(l)) + " | ", 1)) : c("", !0),
|
99
|
+
h("span", ee, f(x(u)), 1)
|
100
|
+
]),
|
101
|
+
e.type === "short" ? (r(), s("span", te, f(x(p)), 1)) : c("", !0)
|
102
|
+
], 2),
|
103
|
+
e.type !== "short" ? (r(), s("h3", ae, f(e.event.name), 1)) : c("", !0),
|
104
|
+
e.type !== "short" ? (r(), s("p", re, f(e.event.description), 1)) : c("", !0),
|
105
|
+
O(a.$slots, "default"),
|
106
|
+
e.type !== "short" ? (r(), T(J, {
|
107
|
+
key: 2,
|
108
|
+
chips: e.event.tags
|
109
|
+
}, null, 8, ["chips"])) : c("", !0)
|
110
|
+
], 2)
|
111
|
+
], 2));
|
112
|
+
}
|
113
|
+
}, se = {}, ie = {
|
114
|
+
width: "100%",
|
115
|
+
height: "20rem",
|
116
|
+
xmlns: "http://www.w3.org/2000/svg"
|
117
|
+
}, le = /* @__PURE__ */ F('<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), ce = [
|
118
|
+
le
|
119
|
+
];
|
120
|
+
function ue(e, t) {
|
121
|
+
return r(), s("svg", ie, ce);
|
122
|
+
}
|
123
|
+
const oe = /* @__PURE__ */ H(se, [["render", ue]]), $ = A.create({ baseURL: process.env.API_URL, withCredentials: !0 }), m = I({
|
124
|
+
all: [],
|
125
|
+
filter: {
|
126
|
+
// query
|
127
|
+
tags: [],
|
128
|
+
period: "",
|
129
|
+
date: null
|
130
|
+
// pagination
|
131
|
+
},
|
132
|
+
pagination: {
|
133
|
+
page: 1,
|
134
|
+
perPage: 18
|
135
|
+
},
|
136
|
+
// Sort
|
137
|
+
sort: {
|
138
|
+
current: "popularity",
|
139
|
+
ascending: !1
|
140
|
+
},
|
141
|
+
current: {
|
142
|
+
_id: "",
|
143
|
+
url: "",
|
144
|
+
status: "",
|
145
|
+
name: "",
|
146
|
+
tags: [],
|
147
|
+
owner: {},
|
148
|
+
date: "",
|
149
|
+
views: 0,
|
150
|
+
content: []
|
151
|
+
}
|
152
|
+
});
|
153
|
+
async function z(e = {}) {
|
154
|
+
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.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;
|
155
|
+
try {
|
156
|
+
console.log("Request params:" + e.params);
|
157
|
+
const t = await $.get("/api/events/read", { params: e.params });
|
158
|
+
return console.log(e.params), e.url ? w(t.data, "current") : w(t.data, "all"), Promise.resolve(t.data);
|
159
|
+
} catch (t) {
|
160
|
+
return S(t), Promise.reject(t);
|
161
|
+
}
|
162
|
+
}
|
163
|
+
async function de(e) {
|
164
|
+
return $.post("/api/events/create", e).then(
|
165
|
+
(t) => (w(t.data, "current"), Promise.resolve(t.data)),
|
166
|
+
(t) => (S(t), Promise.reject(t))
|
167
|
+
);
|
168
|
+
}
|
169
|
+
async function me(e) {
|
170
|
+
return $.post("/api/events/update", e).then(
|
171
|
+
(t) => (w(t.data, "current"), Promise.resolve(t.data)),
|
172
|
+
(t) => (S(t), Promise.reject(t))
|
173
|
+
);
|
174
|
+
}
|
175
|
+
async function fe(e) {
|
176
|
+
return await $.delete(`/api/events/delete/${e}`).then(
|
177
|
+
(t) => {
|
178
|
+
const i = m.all.findIndex((l) => l._id === e);
|
179
|
+
return i !== -1 && m.all.splice(i, 1), Promise.resolve(t.data);
|
180
|
+
},
|
181
|
+
(t) => (S(t), Promise.reject(t))
|
182
|
+
);
|
183
|
+
}
|
184
|
+
function w(e, t) {
|
185
|
+
m[t] = e;
|
186
|
+
}
|
187
|
+
function ge() {
|
188
|
+
m.current = {
|
189
|
+
_id: "",
|
190
|
+
url: "",
|
191
|
+
status: "",
|
192
|
+
name: "",
|
193
|
+
tags: [],
|
194
|
+
author: "",
|
195
|
+
owner: "",
|
196
|
+
date: "",
|
197
|
+
views: 0,
|
198
|
+
content: []
|
199
|
+
};
|
200
|
+
}
|
201
|
+
function he(e) {
|
202
|
+
const t = {
|
203
|
+
order: m.project.content.length + 1,
|
204
|
+
type: e.type,
|
205
|
+
data: e.data,
|
206
|
+
class: e.class,
|
207
|
+
content: e.content
|
208
|
+
};
|
209
|
+
m.project.content.push(t);
|
210
|
+
}
|
211
|
+
j(m, (e, t) => {
|
212
|
+
});
|
213
|
+
const Ce = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
214
|
+
__proto__: null,
|
215
|
+
blockAdd: he,
|
216
|
+
clean: ge,
|
217
|
+
create: de,
|
218
|
+
read: z,
|
219
|
+
remove: fe,
|
220
|
+
set: w,
|
221
|
+
state: m,
|
222
|
+
update: me
|
223
|
+
}, Symbol.toStringTag, { value: "Module" })), ve = { class: "feed" }, Te = {
|
224
|
+
__name: "Feed",
|
225
|
+
props: {
|
226
|
+
category: {
|
227
|
+
type: String,
|
228
|
+
default: null
|
229
|
+
},
|
230
|
+
selectedDate: {
|
231
|
+
type: String,
|
232
|
+
default: null
|
233
|
+
},
|
234
|
+
organization: {
|
235
|
+
type: String,
|
236
|
+
default: null
|
237
|
+
},
|
238
|
+
owner: {
|
239
|
+
type: String,
|
240
|
+
default: null
|
241
|
+
},
|
242
|
+
user: {
|
243
|
+
type: [String, Number],
|
244
|
+
default: null
|
245
|
+
},
|
246
|
+
sortOrder: {
|
247
|
+
type: String,
|
248
|
+
default: "desc"
|
249
|
+
},
|
250
|
+
participant: {
|
251
|
+
type: String,
|
252
|
+
default: null
|
253
|
+
},
|
254
|
+
period: {
|
255
|
+
type: String,
|
256
|
+
default: null
|
257
|
+
},
|
258
|
+
status: {
|
259
|
+
type: String,
|
260
|
+
default: null
|
261
|
+
}
|
262
|
+
},
|
263
|
+
setup(e) {
|
264
|
+
const t = e, i = v([]), l = v(!1), u = v(!0), p = v(0), a = v(20), d = async () => {
|
265
|
+
if (l.value) {
|
266
|
+
p.value += a.value;
|
267
|
+
const n = await z({
|
268
|
+
skip: p.value,
|
269
|
+
limit: a.value,
|
270
|
+
category: t.category,
|
271
|
+
sortOrder: t.sortOrder,
|
272
|
+
participant: t.participant,
|
273
|
+
user: t.user,
|
274
|
+
date: t.selectedDate,
|
275
|
+
owner: t.owner,
|
276
|
+
organization: t.organization,
|
277
|
+
period: t.period,
|
278
|
+
status: t.status
|
279
|
+
});
|
280
|
+
n.length === 0 ? l.value = !1 : l.value = !0, i.value = [...i.value, ...n];
|
281
|
+
}
|
282
|
+
};
|
283
|
+
return L(async () => {
|
284
|
+
u.value = !0, console.log(t.selectedDate);
|
285
|
+
const n = await z({
|
286
|
+
skip: p.value,
|
287
|
+
limit: a.value,
|
288
|
+
category: t.category,
|
289
|
+
participant: t.participant,
|
290
|
+
sortOrder: t.sortOrder,
|
291
|
+
user: t.user,
|
292
|
+
owner: t.owner,
|
293
|
+
date: t.selectedDate,
|
294
|
+
organization: t.organization,
|
295
|
+
period: t.period,
|
296
|
+
status: t.status
|
297
|
+
});
|
298
|
+
n.length === 0 ? l.value = !1 : l.value = !0, i.value = n, u.value = !1;
|
299
|
+
}), (n, U) => (r(), s("section", ve, [
|
300
|
+
C(N, {
|
301
|
+
tag: "ul",
|
302
|
+
name: "fade",
|
303
|
+
class: "o-hidden bg-grey radius-big"
|
304
|
+
}, {
|
305
|
+
default: D(() => [
|
306
|
+
u.value ? (r(!0), s(P, { key: 0 }, M(a.value, (o) => (r(), T(oe, { key: o }))), 128)) : c("", !0)
|
307
|
+
]),
|
308
|
+
_: 1
|
309
|
+
}),
|
310
|
+
C(R, { name: "fade" }, {
|
311
|
+
default: D(() => [
|
312
|
+
!u.value && i.value.length < 1 ? (r(), T(V, {
|
313
|
+
key: 0,
|
314
|
+
title: "No Events Found",
|
315
|
+
description: "Currently, there are no events available. Please check back later.",
|
316
|
+
class: "pd-medium mn-thin bg-grey radius-big"
|
317
|
+
})) : c("", !0)
|
318
|
+
]),
|
319
|
+
_: 1
|
320
|
+
}),
|
321
|
+
C(N, {
|
322
|
+
tag: "ul",
|
323
|
+
name: "fade",
|
324
|
+
class: "container"
|
325
|
+
}, {
|
326
|
+
default: D(() => [
|
327
|
+
!u.value && i.value.length > 0 ? (r(!0), s(P, { key: 0 }, M(i.value, (o, b) => (r(), T(ne, {
|
328
|
+
onClick: (k) => n.$router.push({ name: "Event", params: { url: o.url } }),
|
329
|
+
key: o._id,
|
330
|
+
event: o,
|
331
|
+
owner: e.user,
|
332
|
+
type: "normal",
|
333
|
+
class: y(["bg-grey radius-big mn-medium", {
|
334
|
+
"br-b br-solid br-black-transp-10": b !== i.value.length - 1
|
335
|
+
}])
|
336
|
+
}, null, 8, ["onClick", "event", "owner", "class"]))), 128)) : c("", !0),
|
337
|
+
l.value && i.value.length > 0 ? (r(), s("button", {
|
338
|
+
key: 1,
|
339
|
+
onClick: d,
|
340
|
+
class: "w-100 bg-main button"
|
341
|
+
}, "Load more")) : c("", !0)
|
342
|
+
]),
|
343
|
+
_: 1
|
344
|
+
})
|
345
|
+
]));
|
346
|
+
}
|
347
|
+
};
|
348
|
+
export {
|
349
|
+
oe as S,
|
350
|
+
Te as _,
|
351
|
+
ne as a,
|
352
|
+
Ce as e,
|
353
|
+
z as r,
|
354
|
+
m as s
|
355
|
+
};
|