@ozdao/prometheus-framework 0.0.87 → 0.0.89

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-300fcb55.js +1 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-afba007a.mjs +1944 -0
  3. package/dist/ButtonFollow-001c4a65.mjs +130 -0
  4. package/dist/ButtonFollow-48043cc7.js +1 -0
  5. package/dist/CardHeader-0677d446.js +1 -0
  6. package/dist/CardHeader-e361dada.mjs +96 -0
  7. package/dist/CardOrganization-51309400.js +1 -0
  8. package/dist/CardOrganization-bacc2ef6.mjs +202 -0
  9. package/dist/Feed-4b28adc5.mjs +423 -0
  10. package/dist/Feed-51e4e232.js +1 -0
  11. package/dist/Feed-5d8d5c21.js +1 -0
  12. package/dist/Feed-76b2997e.mjs +367 -0
  13. package/dist/Feed-dc8b66bf.mjs +367 -0
  14. package/dist/Feed-eeb63363.js +1 -0
  15. package/dist/IconEdit-3028a3b7.js +1 -0
  16. package/dist/IconEdit-8df23653.mjs +205 -0
  17. package/dist/Image-30f04604.js +9 -0
  18. package/dist/Image-6c7584f5.mjs +477 -0
  19. package/dist/Image-6ec294f3.mjs +477 -0
  20. package/dist/Image-9a870c88.js +9 -0
  21. package/dist/PlaceholderUserpic-10fd9026.js +1 -0
  22. package/dist/PlaceholderUserpic-eb9820ce.mjs +28 -0
  23. package/dist/Popup-7c331e1c.js +1 -0
  24. package/dist/Popup-bdf043ba.mjs +76 -0
  25. package/dist/Product-1724d88d.mjs +837 -0
  26. package/dist/Product-a94d8b65.js +7 -0
  27. package/dist/Product-b233e2a3.js +7 -0
  28. package/dist/Product-eb00f35e.mjs +837 -0
  29. package/dist/ProductEdit-57484f1e.mjs +349 -0
  30. package/dist/ProductEdit-61413d02.mjs +349 -0
  31. package/dist/ProductEdit-ef301baa.js +1 -0
  32. package/dist/ProductEdit-fca68ff9.js +1 -0
  33. package/dist/ProfileBlogposts-6704a38c.js +1 -0
  34. package/dist/ProfileBlogposts-775b1cfa.mjs +63 -0
  35. package/dist/ProfileComments-175e42da.js +1 -0
  36. package/dist/ProfileComments-fd7d66bf.mjs +43 -0
  37. package/dist/ProfileEvents-1cfe6858.mjs +55 -0
  38. package/dist/ProfileEvents-4f2a5f00.js +1 -0
  39. package/dist/ProfileEvents-7a51a9e6.mjs +55 -0
  40. package/dist/ProfileEvents-d8e16509.js +1 -0
  41. package/dist/ProfileLikes-20a8a3c9.mjs +43 -0
  42. package/dist/ProfileLikes-b3b1350a.js +1 -0
  43. package/dist/ProfileOrganizations-4b866823.mjs +211 -0
  44. package/dist/ProfileOrganizations-6d3a43e4.js +1 -0
  45. package/dist/Publics-0e44c61e.mjs +122 -0
  46. package/dist/Publics-4e1c14fc.js +1 -0
  47. package/dist/Tab-a243605d.mjs +46 -0
  48. package/dist/UploadImage-6e312c46.mjs +83 -0
  49. package/dist/UploadImage-9e7e7468.js +1 -0
  50. package/dist/auth-2bc18d1e.js +8 -0
  51. package/dist/auth-fefd15a3.mjs +1503 -0
  52. package/dist/auth.client.cjs +1 -1
  53. package/dist/auth.client.js +5 -5
  54. package/dist/auth.validation-4a617c0b.mjs +20 -0
  55. package/dist/auth.validation-78a90fed.js +1 -0
  56. package/dist/community.client.cjs +1 -1
  57. package/dist/community.client.js +206 -222
  58. package/dist/components/Field/Field.vue.d.ts.map +1 -1
  59. package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
  60. package/dist/components/FieldPhone/FieldPhone.vue.d.ts +1 -1
  61. package/dist/events.client.cjs +1 -1
  62. package/dist/events.client.js +332 -312
  63. package/dist/events.server.js +77 -0
  64. package/dist/events.server.mjs +77 -0
  65. package/dist/inputs.validation-14e8e01f.mjs +93 -0
  66. package/dist/main.css +1 -1
  67. package/dist/organizations-1581c013.mjs +121 -0
  68. package/dist/organizations-c455dad7.js +1 -0
  69. package/dist/organizations.client-040ec107.js +3 -0
  70. package/dist/organizations.client-686845be.mjs +3179 -0
  71. package/dist/organizations.client-7937e180.mjs +3037 -0
  72. package/dist/organizations.client-99bfc474.js +3 -0
  73. package/dist/organizations.client.cjs +1 -1
  74. package/dist/organizations.client.js +39 -39
  75. package/dist/organizations.server.js +7 -3
  76. package/dist/organizations.server.mjs +7 -3
  77. package/dist/prometheus-framework.cjs.js +1 -1
  78. package/dist/prometheus-framework.es.js +3 -2
  79. package/dist/style.css +1 -1
  80. package/dist/users.client.cjs +1 -1
  81. package/dist/users.client.js +265 -256
  82. package/dist/users.server.js +2 -2
  83. package/dist/users.server.mjs +2 -2
  84. package/package.json +1 -1
  85. package/src/components/Field/Field.vue +2 -1
  86. package/src/modules/community/components/pages/CreateBlogPost.vue +2 -1
  87. package/src/modules/events/components/blocks/CardEvent.vue +1 -1
  88. package/src/modules/events/components/pages/EditEvent.vue +9 -3
  89. package/src/modules/events/components/pages/Event.vue +43 -4
  90. package/src/modules/events/middlewares/server/index.js +10 -0
  91. package/src/modules/events/middlewares/server/verifyEvent.js +60 -0
  92. package/src/modules/events/routes/events.routes.js +14 -1
  93. package/src/modules/organizations/components/blocks/Socials.vue +16 -3
  94. package/src/modules/organizations/components/pages/OrganizationEdit.vue +39 -15
  95. package/src/modules/organizations/components/sections/DetailsTab.vue +13 -9
  96. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  97. package/src/modules/organizations/models/organization.model.js +6 -2
  98. package/src/modules/organizations/store/organizations.js +2 -2
  99. package/src/modules/users/components/pages/Profile.vue +26 -11
  100. package/src/modules/users/components/pages/ProfileEdit.vue +28 -10
  101. package/src/modules/users/models/user.model.js +2 -2
  102. package/src/modules/users/store/users.js +1 -2
@@ -0,0 +1,367 @@
1
+ import { openBlock as r, createElementBlock as n, Fragment as _, renderList as M, normalizeClass as v, toDisplayString as m, ref as h, computed as f, createVNode as C, unref as k, createElementVNode as g, createCommentVNode as c, renderSlot as F, createBlock as T, createStaticVNode as I, reactive as N, watch as L, onMounted as j, TransitionGroup as O, withCtx as P, Transition as R } from "vue";
2
+ import { _ as V } from "./EmptyState-34d85f10.mjs";
3
+ import { _ as B } from "./CardHeader-e361dada.mjs";
4
+ import { _ as H, a as Y } from "./auth-fefd15a3.mjs";
5
+ import { useRouter as q } from "vue-router";
6
+ import { s as S } from "./globals-96ba60e4.mjs";
7
+ const A = { 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, l) => (r(), n("div", A, [
15
+ e.chips.length ? (r(!0), n(_, { key: 0 }, M(e.chips, (i, u) => (r(), n("div", {
16
+ class: v(["pd-thin radius-small t-semi bg-main", { "mn-r-thin": u !== e.chips.length - 1 }])
17
+ }, m(i.text ? i.text : i), 3))), 256)) : (r(), n("div", G, m(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 flex-nowrap flex w-100"
32
+ }, re = {
33
+ key: 0,
34
+ class: ""
35
+ }, ne = {
36
+ key: 1,
37
+ 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"
38
+ }, se = {
39
+ key: 1,
40
+ class: "mn-small p-big"
41
+ }, le = {
42
+ __name: "CardEvent",
43
+ props: ["event", "user", "short", "type"],
44
+ setup(e) {
45
+ const t = e;
46
+ h(/* @__PURE__ */ new Date()), q(), f(() => t.event.content.find((a) => a.type.name === "ImageUpload")), f(() => t.event.content.find((a) => a.type.name === "Textarea"));
47
+ const l = f(() => {
48
+ const a = /* @__PURE__ */ new Date(), d = Date.UTC(a.getUTCFullYear(), a.getUTCMonth(), a.getUTCDate(), a.getUTCHours(), a.getUTCMinutes(), a.getUTCSeconds()), s = new Date(t.event.date.start), o = Date.UTC(s.getUTCFullYear(), s.getUTCMonth(), s.getUTCDate(), s.getUTCHours(), s.getUTCMinutes(), s.getUTCSeconds()) - d;
49
+ if (o < 0)
50
+ return "Finished";
51
+ if (o === 0)
52
+ return "Starting Now";
53
+ {
54
+ const b = Math.floor(o / 1e3), x = Math.floor(b / 60), D = Math.floor(x / 60), E = Math.floor(D / 24);
55
+ return E > 0 ? `${E} days until event` : D > 0 ? `${D} hours until event` : x > 0 ? `${x} minutes until event` : `${b} seconds until event`;
56
+ }
57
+ }), i = f(() => {
58
+ const a = new Date(t.event.date.start), d = { day: "2-digit", month: "2-digit" };
59
+ return a.toLocaleDateString(void 0, d);
60
+ }), u = f(() => {
61
+ const a = new Date(t.event.date.start), d = new Date(t.event.date.end), s = 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);
62
+ return `${s}-${U}`;
63
+ }), p = f(() => {
64
+ const a = t.event.name;
65
+ return a.length > 26 ? `${a.substring(0, 22)}…` : a;
66
+ });
67
+ return (a, d) => (r(), n("article", {
68
+ class: v({
69
+ "flex-nowrap flex-v-center flex": e.type === "short"
70
+ })
71
+ }, [
72
+ C(B, {
73
+ class: v({
74
+ "mn-small pd-medium": e.type !== "short",
75
+ "flex-child-order-last flex-child mn-l-small": e.type === "short"
76
+ }),
77
+ owner: e.event.owner,
78
+ creator: e.event.creator,
79
+ members: e.event.numberOfTickets,
80
+ membersPhotos: e.event.participantsPhotos,
81
+ type: e.type,
82
+ dateFormatted: k(l)
83
+ }, null, 8, ["class", "owner", "creator", "members", "membersPhotos", "type", "dateFormatted"]),
84
+ e.event.cover && e.type !== "short" ? (r(), n("div", K, [
85
+ g("img", {
86
+ src: e.event.cover,
87
+ alt: "Event image",
88
+ class: "z-index-1 d-block mn-auto h-20r"
89
+ }, null, 8, Q),
90
+ g("img", {
91
+ src: e.event.cover,
92
+ alt: "Event image",
93
+ class: "z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",
94
+ style: { transform: "scale(1.5)", filter: "blur(2rem)", "-webkit-filter": "blur(2rem)" }
95
+ }, null, 8, W)
96
+ ])) : c("", !0),
97
+ g("section", {
98
+ class: v(["w-100", { "pd-t-zero pd-medium": e.type !== "short" }])
99
+ }, [
100
+ g("div", {
101
+ class: v([{ "mn-small": e.type !== "short" }, "flex-v-center flex-nowrap flex"])
102
+ }, [
103
+ g("div", X, [
104
+ e.type !== "short" ? (r(), n("span", Z, m(k(i)) + " | ", 1)) : c("", !0),
105
+ g("span", ee, m(k(u)), 1)
106
+ ]),
107
+ e.type === "short" ? (r(), n("span", te, m(k(p)), 1)) : c("", !0)
108
+ ], 2),
109
+ e.type !== "short" ? (r(), n("div", ae, [
110
+ e.type !== "short" ? (r(), n("h3", re, m(e.event.name), 1)) : c("", !0),
111
+ e.event.status === "draft" ? (r(), n("div", ne, m(e.event.status), 1)) : c("", !0)
112
+ ])) : c("", !0),
113
+ e.type !== "short" ? (r(), n("p", se, m(e.event.description), 1)) : c("", !0),
114
+ F(a.$slots, "default"),
115
+ e.type !== "short" && e.event.tags.length > 0 ? (r(), T(J, {
116
+ key: 2,
117
+ chips: e.event.tags
118
+ }, null, 8, ["chips"])) : c("", !0)
119
+ ], 2)
120
+ ], 2));
121
+ }
122
+ }, ie = {}, ce = {
123
+ width: "100%",
124
+ height: "20rem",
125
+ xmlns: "http://www.w3.org/2000/svg"
126
+ }, ue = /* @__PURE__ */ I('<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 = [
127
+ ue
128
+ ];
129
+ function de(e, t) {
130
+ return r(), n("svg", ce, oe);
131
+ }
132
+ const me = /* @__PURE__ */ H(ie, [["render", de]]), $ = Y.create({ baseURL: process.env.API_URL, withCredentials: !0 }), y = N({
133
+ all: [],
134
+ filter: {
135
+ // query
136
+ tags: [],
137
+ period: "",
138
+ date: null
139
+ // pagination
140
+ },
141
+ pagination: {
142
+ page: 1,
143
+ perPage: 18
144
+ },
145
+ // Sort
146
+ sort: {
147
+ current: "popularity",
148
+ ascending: !1
149
+ },
150
+ current: {
151
+ _id: "",
152
+ cover: "",
153
+ url: "",
154
+ status: "",
155
+ name: "",
156
+ tags: [],
157
+ date: {
158
+ start: null,
159
+ false: null
160
+ },
161
+ views: 0,
162
+ content: []
163
+ }
164
+ });
165
+ async function z(e = {}) {
166
+ 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;
167
+ try {
168
+ console.log("Request params:" + e.params);
169
+ const t = await $.get("/api/events/read", { params: e.params });
170
+ return console.log(e.params), e.url ? w(t.data, "current") : w(t.data, "all"), Promise.resolve(t.data);
171
+ } catch (t) {
172
+ return S(t), Promise.reject(t);
173
+ }
174
+ }
175
+ async function fe(e) {
176
+ return $.post("/api/events/create", e).then(
177
+ (t) => (w(t.data, "current"), Promise.resolve(t.data)),
178
+ (t) => (S(t), Promise.reject(t))
179
+ );
180
+ }
181
+ async function ge(e) {
182
+ return $.post("/api/events/update", e).then(
183
+ (t) => (w(t.data, "current"), Promise.resolve(t.data)),
184
+ (t) => (S(t), Promise.reject(t))
185
+ );
186
+ }
187
+ async function he(e) {
188
+ return await $.delete(`/api/events/delete/${e}`).then(
189
+ (t) => {
190
+ const l = y.all.findIndex((i) => i._id === e);
191
+ return l !== -1 && y.all.splice(l, 1), Promise.resolve(t.data);
192
+ },
193
+ (t) => (S(t), Promise.reject(t))
194
+ );
195
+ }
196
+ function w(e, t) {
197
+ y[t] = e;
198
+ }
199
+ function ve() {
200
+ y.current = {
201
+ _id: "",
202
+ cover: "",
203
+ url: "",
204
+ status: "",
205
+ name: "",
206
+ tags: [],
207
+ date: {
208
+ start: null,
209
+ false: null
210
+ },
211
+ views: 0,
212
+ content: []
213
+ };
214
+ }
215
+ L(y, (e, t) => {
216
+ });
217
+ const Te = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
218
+ __proto__: null,
219
+ clean: ve,
220
+ create: fe,
221
+ read: z,
222
+ remove: he,
223
+ set: w,
224
+ state: y,
225
+ update: ge
226
+ }, Symbol.toStringTag, { value: "Module" })), ye = { class: "feed" }, Se = {
227
+ __name: "Feed",
228
+ props: {
229
+ category: {
230
+ type: String,
231
+ default: null
232
+ },
233
+ selectedDate: {
234
+ type: String,
235
+ default: null
236
+ },
237
+ organization: {
238
+ type: String,
239
+ default: null
240
+ },
241
+ owner: {
242
+ type: String,
243
+ default: null
244
+ },
245
+ creator: {
246
+ type: String,
247
+ default: null
248
+ },
249
+ user: {
250
+ type: [String, Number],
251
+ default: null
252
+ },
253
+ sortOrder: {
254
+ type: String,
255
+ default: "desc"
256
+ },
257
+ participant: {
258
+ type: String,
259
+ default: null
260
+ },
261
+ period: {
262
+ type: String,
263
+ default: null
264
+ },
265
+ status: {
266
+ type: String,
267
+ default: null
268
+ }
269
+ },
270
+ setup(e) {
271
+ const t = e, l = h([]), i = h(!1), u = h(!0), p = h(0), a = h(20), d = async () => {
272
+ if (i.value) {
273
+ p.value += a.value;
274
+ const s = await z({
275
+ skip: p.value,
276
+ limit: a.value,
277
+ category: t.category,
278
+ sortOrder: t.sortOrder,
279
+ participant: t.participant,
280
+ creator: t.creator,
281
+ user: t.user,
282
+ date: t.selectedDate,
283
+ owner: t.owner,
284
+ organization: t.organization,
285
+ period: t.period,
286
+ status: t.status
287
+ });
288
+ s.length === 0 ? i.value = !1 : i.value = !0, l.value = [...l.value, ...s];
289
+ }
290
+ };
291
+ return j(async () => {
292
+ u.value = !0, console.log(t.selectedDate);
293
+ const s = await z({
294
+ skip: p.value,
295
+ limit: a.value,
296
+ category: t.category,
297
+ participant: t.participant,
298
+ sortOrder: t.sortOrder,
299
+ user: t.user,
300
+ owner: t.owner,
301
+ creator: t.creator,
302
+ date: t.selectedDate,
303
+ organization: t.organization,
304
+ period: t.period,
305
+ status: t.status
306
+ });
307
+ s.length === 0 ? i.value = !1 : i.value = !0, l.value = s, u.value = !1;
308
+ }), (s, U) => (r(), n("section", ye, [
309
+ C(O, {
310
+ tag: "ul",
311
+ name: "fade",
312
+ class: "o-hidden bg-grey radius-big"
313
+ }, {
314
+ default: P(() => [
315
+ u.value ? (r(!0), n(_, { key: 0 }, M(a.value, (o) => (r(), T(me, { key: o }))), 128)) : c("", !0)
316
+ ]),
317
+ _: 1
318
+ }),
319
+ C(R, { name: "fade" }, {
320
+ default: P(() => [
321
+ !u.value && l.value.length < 1 ? (r(), T(V, {
322
+ key: 0,
323
+ title: "No Events Found",
324
+ description: "Currently, there are no events available. Please check back later.",
325
+ class: "pd-medium mn-thin bg-grey radius-big"
326
+ })) : c("", !0)
327
+ ]),
328
+ _: 1
329
+ }),
330
+ C(O, {
331
+ tag: "ul",
332
+ name: "fade",
333
+ class: "container"
334
+ }, {
335
+ default: P(() => [
336
+ !u.value && l.value.length > 0 ? (r(!0), n(_, { key: 0 }, M(l.value, (o, b) => (r(), T(le, {
337
+ onClick: (x) => s.$router.push({ name: "Event", params: { url: o.url } }),
338
+ key: o._id,
339
+ event: o,
340
+ owner: e.user,
341
+ type: "normal",
342
+ class: v(["bg-grey radius-big mn-medium", {
343
+ "br-b br-solid br-black-transp-10": b !== l.value.length - 1
344
+ }])
345
+ }, null, 8, ["onClick", "event", "owner", "class"]))), 128)) : c("", !0),
346
+ i.value && l.value.length > 0 ? (r(), n("button", {
347
+ key: 1,
348
+ onClick: d,
349
+ class: "w-100 bg-main button"
350
+ }, "Load more")) : c("", !0)
351
+ ]),
352
+ _: 1
353
+ })
354
+ ]));
355
+ }
356
+ };
357
+ export {
358
+ me as S,
359
+ Se as _,
360
+ le as a,
361
+ fe as b,
362
+ ve as c,
363
+ Te as e,
364
+ z as r,
365
+ y as s,
366
+ ge as u
367
+ };