@ozdao/prometheus-framework 0.1.30 → 0.1.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (175) hide show
  1. package/dist/BackofficeGallery-02c9721b.mjs +304 -0
  2. package/dist/BackofficeGallery-1d117a40.js +1 -0
  3. package/dist/BackofficeReports-cb4b180d.mjs +44 -0
  4. package/dist/BackofficeReports-d021871f.js +1 -0
  5. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-505c3ca5.js +1 -0
  6. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-b1873cb7.mjs +1945 -0
  7. package/dist/Button-2ca405bd.js +1 -0
  8. package/dist/Button-c59d387c.mjs +283 -0
  9. package/dist/Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
  10. package/dist/Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
  11. package/dist/ButtonFollow.vue_vue_type_style_index_0_scoped_0634d4a1_lang-0ea8fbf8.js +1 -0
  12. package/dist/ButtonFollow.vue_vue_type_style_index_0_scoped_0634d4a1_lang-4ed993c7.mjs +1 -0
  13. package/dist/CardOrganization-18c1e3fa.mjs +297 -0
  14. package/dist/CardOrganization-7d679e75.js +1 -0
  15. package/dist/Chips-2ada5eda.mjs +200 -0
  16. package/dist/Chips-8d0a1d2c.js +1 -0
  17. package/dist/Dashboard-239fb7a6.mjs +52 -0
  18. package/dist/Dashboard-94267906.js +1 -0
  19. package/dist/EULA-8265b0cf.mjs +4218 -0
  20. package/dist/EULA-cbb27503.js +1 -0
  21. package/dist/Feed-66095e66.js +1 -0
  22. package/dist/Feed-76fc4475.mjs +383 -0
  23. package/dist/Feed-e55bc6fa.js +1 -0
  24. package/dist/Feed-ef6c6ca3.mjs +371 -0
  25. package/dist/IconEdit-c98d3d06.mjs +339 -0
  26. package/dist/IconEdit-e4d0cc6e.js +1 -0
  27. package/dist/Image-052a3cc2.mjs +480 -0
  28. package/dist/Image-c90ee624.js +9 -0
  29. package/dist/MenuItem-0b249b94.mjs +93 -0
  30. package/dist/MenuItem-8b70d2cf.js +1 -0
  31. package/dist/Product-4b58701f.js +7 -0
  32. package/dist/Product-a6251018.mjs +844 -0
  33. package/dist/ProductEdit-3ff2af92.js +1 -0
  34. package/dist/ProductEdit-f901314c.mjs +306 -0
  35. package/dist/ProfileBlogposts-57931834.mjs +70 -0
  36. package/dist/ProfileBlogposts-af88ce98.js +1 -0
  37. package/dist/ProfileEvents-588eadf9.js +1 -0
  38. package/dist/ProfileEvents-ed7f9603.mjs +62 -0
  39. package/dist/ProfileOrganizations-7911deec.mjs +219 -0
  40. package/dist/ProfileOrganizations-ae258581.js +1 -0
  41. package/dist/Publics-50c0ff6c.js +1 -0
  42. package/dist/Publics-f34131bf.mjs +45 -0
  43. package/dist/Select-11ddabf5.mjs +79 -0
  44. package/dist/Select-3ca5ab39.js +1 -0
  45. package/dist/Socials-3fe01af1.mjs +275 -0
  46. package/dist/Socials-b19d0cb1.js +1 -0
  47. package/dist/addMembersQuantity-ea216f92.mjs +85 -0
  48. package/dist/addMembersQuantity-f922d82b.js +84 -0
  49. package/dist/auth-98fe3efb.mjs +612 -0
  50. package/dist/auth-acbe3ae1.js +7 -0
  51. package/dist/auth.client.cjs +7 -8
  52. package/dist/auth.client.js +435 -439
  53. package/dist/auth.validation-495e9d6d.js +1 -0
  54. package/dist/auth.validation-e265b496.mjs +23 -0
  55. package/dist/backoffice.client.cjs +1 -1
  56. package/dist/backoffice.client.js +55 -28
  57. package/dist/click-outside-0b0727d1.js +2 -0
  58. package/dist/click-outside-6101836c.mjs +19 -0
  59. package/dist/community.client.cjs +1 -1
  60. package/dist/community.client.js +121 -121
  61. package/dist/community.server.js +35 -5
  62. package/dist/community.server.mjs +35 -5
  63. package/dist/components/Button/Button.vue.d.ts +3 -0
  64. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  65. package/dist/components/CardHeader/CardHeader.vue.d.ts +3 -0
  66. package/dist/components/Dropdown/Dropdown.vue.d.ts +3 -0
  67. package/dist/components/Dropdown/Dropdown.vue.d.ts.map +1 -1
  68. package/dist/components/Field/Field.vue.d.ts +1 -1
  69. package/dist/components/FieldPhone/FieldPhone(script-setup).vue.d.ts +3 -3
  70. package/dist/components/Popup/Popup.vue.d.ts +2 -1
  71. package/dist/components/Popup/Popup.vue.d.ts.map +1 -1
  72. package/dist/components/Select/Select.vue.d.ts +1 -1
  73. package/dist/components/Select/Select.vue.d.ts.map +1 -1
  74. package/dist/components/Upload/Upload.vue.d.ts +1 -1
  75. package/dist/events.client.cjs +2 -2
  76. package/dist/events.client.js +219 -217
  77. package/dist/events.server.js +2 -9
  78. package/dist/events.server.mjs +2 -9
  79. package/dist/legal.client.cjs +1 -1
  80. package/dist/legal.client.js +2565 -2545
  81. package/dist/main.css +1 -1
  82. package/dist/main.d.ts +1 -1
  83. package/dist/modules/backoffice/components/pages/Dashboard.vue.d.ts +6 -0
  84. package/dist/modules/icons/navigation/IconCross.vue.d.ts +4 -0
  85. package/dist/modules/legal/components/pages/legal/EULA.vue.d.ts +2 -0
  86. package/dist/modules/organizations/components/elements/ButtonFollow.vue.d.ts +1 -1
  87. package/dist/modules/organizations/components/elements/ButtonToggleMembership.vue.d.ts +12 -0
  88. package/dist/modules/organizations/components/sections/DetailsTab.vue.d.ts +2 -58
  89. package/dist/modules/organizations/components/sections/Feed.vue.d.ts +1 -1
  90. package/dist/modules/reports/components/pages/BackofficeReports.vue.d.ts +2 -0
  91. package/dist/modules/reports/components/sections/FormReport.vue.d.ts +75 -0
  92. package/dist/modules/reports/store/reports.d.ts +41 -0
  93. package/dist/organizations-a241b21d.js +1 -0
  94. package/dist/organizations-ea9de495.mjs +122 -0
  95. package/dist/organizations.client-292e8444.js +3 -0
  96. package/dist/organizations.client-6fc91683.mjs +3072 -0
  97. package/dist/organizations.client.cjs +1 -1
  98. package/dist/organizations.client.js +51 -49
  99. package/dist/organizations.server.js +20 -28
  100. package/dist/organizations.server.mjs +20 -28
  101. package/dist/prometheus-framework.cjs.js +19 -19
  102. package/dist/prometheus-framework.es.js +1635 -1608
  103. package/dist/reports-270f69df.js +1 -0
  104. package/dist/reports-79cd9459.mjs +91 -0
  105. package/dist/reports.client.cjs +1 -0
  106. package/dist/reports.client.js +8 -0
  107. package/dist/reports.server.js +159 -0
  108. package/dist/reports.server.mjs +160 -0
  109. package/dist/states.validation-02ba0aee.js +1 -0
  110. package/dist/states.validation-e5f4fa3a.mjs +13 -0
  111. package/dist/style.css +1 -1
  112. package/dist/users.client.cjs +1 -1
  113. package/dist/users.client.js +286 -242
  114. package/dist/users.server.js +6 -18
  115. package/dist/users.server.mjs +6 -18
  116. package/package.json +9 -1
  117. package/src/components/Button/Button.vue +66 -60
  118. package/src/components/CardHeader/CardHeader.vue +51 -50
  119. package/src/components/Dropdown/Dropdown.vue +28 -12
  120. package/src/components/FieldPhone/click-outside.js +0 -48
  121. package/src/components/Popup/Popup.vue +74 -23
  122. package/src/components/Select/Select.vue +10 -6
  123. package/src/main.ts +1 -1
  124. package/src/modules/auth/components/pages/EnterPassword.vue +6 -0
  125. package/src/modules/auth/router/auth.js +1 -1
  126. package/src/modules/auth/store/auth.js +1 -1
  127. package/src/modules/backoffice/components/layouts/Backoffice.vue +3 -3
  128. package/src/modules/backoffice/components/pages/Dashboard.vue +62 -0
  129. package/src/modules/backoffice/router/backoffice.js +26 -0
  130. package/src/modules/community/components/blocks/CardBlogpost.vue +3 -0
  131. package/src/modules/community/components/layouts/Community.vue +4 -4
  132. package/src/modules/community/components/pages/CreateBlogPost.vue +27 -28
  133. package/src/modules/community/components/sections/Comments.vue +4 -2
  134. package/src/modules/community/components/sections/Feed.vue +1 -1
  135. package/src/modules/community/controllers/blog.controller.js +22 -3
  136. package/src/modules/community/controllers/comments.controller.js +23 -5
  137. package/src/modules/events/components/blocks/CardEvent.vue +4 -0
  138. package/src/modules/events/components/pages/EditEvent.vue +27 -28
  139. package/src/modules/events/components/sections/Feed.vue +1 -1
  140. package/src/modules/events/controllers/events.controller.js +3 -10
  141. package/src/modules/gallery/components/sections/BackofficeGallery.vue +7 -23
  142. package/src/modules/icons/navigation/IconCross.vue +22 -0
  143. package/src/modules/legal/components/pages/Legal.vue +3 -0
  144. package/src/modules/legal/components/pages/legal/EULA.vue +2148 -0
  145. package/src/modules/legal/router/legal.js +11 -4
  146. package/src/modules/middlewares/client/auth.validation.js +14 -0
  147. package/src/modules/mobile/components/Menu/Menu.vue +1 -1
  148. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -1
  149. package/src/modules/organizations/components/elements/ButtonFollow.vue +9 -7
  150. package/src/modules/organizations/components/elements/ButtonToggleMembership.vue +101 -0
  151. package/src/modules/organizations/components/pages/Organization.vue +1 -34
  152. package/src/modules/organizations/components/sections/DetailsTab.vue +86 -8
  153. package/src/modules/organizations/controllers/memberships.controller.js +10 -7
  154. package/src/modules/organizations/controllers/organizations.controller.js +9 -20
  155. package/src/modules/organizations/controllers/utils/addMembersQuantity.js +21 -0
  156. package/src/modules/organizations/controllers/utils/addUserStatusFields.js +65 -0
  157. package/src/modules/organizations/controllers/utils/excludeBlockedMembers.js +18 -0
  158. package/src/modules/organizations/models/membership.model.js +5 -5
  159. package/src/modules/organizations/store/memberships.js +6 -6
  160. package/src/modules/organizations/store/organizations.js +0 -1
  161. package/src/modules/products/products.server.js +5 -0
  162. package/src/modules/reports/components/pages/BackofficeReports.vue +67 -0
  163. package/src/modules/reports/components/sections/FormReport.vue +114 -0
  164. package/src/modules/reports/controllers/reports.controller.js +67 -0
  165. package/src/modules/reports/models/report.model.js +58 -0
  166. package/src/modules/reports/reports.client.js +17 -0
  167. package/src/modules/reports/reports.server.js +13 -0
  168. package/src/modules/reports/routes/reports.routes.js +43 -0
  169. package/src/modules/reports/store/reports.js +118 -0
  170. package/src/modules/users/components/pages/Profile.vue +57 -10
  171. package/src/modules/users/controllers/users.controller.js +6 -19
  172. package/src/styles/base/all.scss +2 -0
  173. package/src/styles/layout.scss +39 -63
  174. package/src/styles/theme.scss +0 -1
  175. package/src/styles/components/popup.scss +0 -55
@@ -0,0 +1,371 @@
1
+ import { ref as v, computed as m, openBlock as r, createElementBlock as i, normalizeClass as p, createVNode as C, unref as T, 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 j, onMounted as V, TransitionGroup as z, withCtx as D, Fragment as I, renderList as F, Transition as _ } from "vue";
2
+ import { _ as B } from "./EmptyState-34d85f10.mjs";
3
+ import { _ as H, a as Y } from "./Chips-2ada5eda.mjs";
4
+ import { I as q } from "./IconEdit-c98d3d06.mjs";
5
+ import { useRouter as A } from "vue-router";
6
+ import { _ as G } from "./_plugin-vue_export-helper-dad06003.mjs";
7
+ import { a as J } from "./index-a661083c.mjs";
8
+ import { s as S } from "./globals-96ba60e4.mjs";
9
+ const K = {
10
+ key: 0,
11
+ class: "o-hidden pos-relative 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
+ v(/* @__PURE__ */ new Date()), A(), 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), $ = Math.floor(x / 60), M = Math.floor($ / 24);
44
+ return M > 0 ? `${M} days until event` : $ > 0 ? `${$} 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
+ console.log(t.event.date.start), console.log(t.event.date.end);
51
+ 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), E = new Intl.DateTimeFormat(void 0, { hour: "2-digit", minute: "2-digit", hourCycle: "h23" }).format(u);
52
+ return `${n}-${E}`;
53
+ }), y = m(() => {
54
+ const a = t.event.name;
55
+ return a.length > 26 ? `${a.substring(0, 22)}…` : a;
56
+ });
57
+ return (a, u) => (r(), i("article", {
58
+ class: p([{
59
+ "flex-nowrap flex-v-center flex": e.type === "short"
60
+ }, "pos-relative"])
61
+ }, [
62
+ C(H, {
63
+ class: p({
64
+ "mn-small pd-medium": e.type !== "short",
65
+ "flex-child-order-last flex-child mn-l-small": e.type === "short"
66
+ }),
67
+ entity: e.event,
68
+ entityType: "event",
69
+ user: e.user,
70
+ owner: e.event.owner,
71
+ creator: e.event.creator,
72
+ members: e.event.numberOfTickets,
73
+ membersPhotos: e.event.participantsPhotos,
74
+ type: e.type,
75
+ dateFormatted: T(s)
76
+ }, null, 8, ["class", "entity", "user", "owner", "creator", "members", "membersPhotos", "type", "dateFormatted"]),
77
+ e.event.cover && e.type !== "short" ? (r(), i("div", K, [
78
+ f("img", {
79
+ src: (a.FILE_SERVER_URL || "") + e.event.cover,
80
+ alt: "Event image",
81
+ class: "pos-relative z-index-1 d-block mn-auto h-20r"
82
+ }, null, 8, Q),
83
+ f("img", {
84
+ src: (a.FILE_SERVER_URL || "") + e.event.cover,
85
+ alt: "Event Background",
86
+ class: "z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",
87
+ style: { transform: "scale(1.5)", filter: "blur(2rem)", "-webkit-filter": "blur(2rem)" }
88
+ }, null, 8, W)
89
+ ])) : l("", !0),
90
+ f("section", {
91
+ class: p(["pos-relative w-100", { "pd-t-zero pd-medium": e.type !== "short" }])
92
+ }, [
93
+ e.user === e.event.creator.target._id ? (r(), w(q, {
94
+ key: 0,
95
+ onClick: u[0] || (u[0] = L((n) => a.$router.push({
96
+ name: "Edit Event",
97
+ params: {
98
+ url: e.event.url
99
+ }
100
+ }), ["stop"])),
101
+ class: "z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
102
+ })) : l("", !0),
103
+ f("div", {
104
+ class: p([{ "mn-small": e.type !== "short" }, "flex-v-center flex-nowrap flex"])
105
+ }, [
106
+ f("div", X, [
107
+ e.type !== "short" ? (r(), i("span", Z, g(T(c)) + " | ", 1)) : l("", !0),
108
+ f("span", ee, g(T(d)), 1)
109
+ ]),
110
+ e.type === "short" ? (r(), i("span", te, g(T(y)), 1)) : l("", !0)
111
+ ], 2),
112
+ e.type !== "short" ? (r(), i("div", ae, [
113
+ e.type !== "short" ? (r(), i("h3", re, g(e.event.name), 1)) : l("", !0),
114
+ e.event.status === "draft" ? (r(), i("div", ne, g(e.event.status), 1)) : l("", !0)
115
+ ])) : l("", !0),
116
+ e.type !== "short" ? (r(), i("p", se, g(e.event.description), 1)) : l("", !0),
117
+ O(a.$slots, "default"),
118
+ e.type !== "short" && e.event.tags.length > 0 ? (r(), w(Y, {
119
+ key: 3,
120
+ chips: e.event.tags
121
+ }, null, 8, ["chips"])) : l("", !0)
122
+ ], 2)
123
+ ], 2));
124
+ }
125
+ }, ie = {}, ce = {
126
+ width: "100%",
127
+ height: "20rem",
128
+ xmlns: "http://www.w3.org/2000/svg"
129
+ }, 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 = [
130
+ ue
131
+ ];
132
+ function de(e, t) {
133
+ return r(), i("svg", ce, oe);
134
+ }
135
+ const me = /* @__PURE__ */ G(ie, [["render", de]]), U = J.create({ baseURL: process.env.API_URL, withCredentials: !0 }), h = N({
136
+ all: [],
137
+ filter: {
138
+ // query
139
+ tags: [],
140
+ period: "",
141
+ date: null
142
+ // pagination
143
+ },
144
+ pagination: {
145
+ page: 1,
146
+ perPage: 18
147
+ },
148
+ // Sort
149
+ sort: {
150
+ current: "popularity",
151
+ ascending: !1
152
+ },
153
+ current: {
154
+ _id: "",
155
+ cover: "",
156
+ url: "",
157
+ status: "",
158
+ name: "",
159
+ tags: [],
160
+ date: {
161
+ start: null,
162
+ false: null
163
+ },
164
+ views: 0,
165
+ content: []
166
+ }
167
+ });
168
+ async function P(e = {}) {
169
+ 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;
170
+ try {
171
+ console.log("Request params:" + e.params);
172
+ const t = await U.get("/api/events/read", { params: e.params });
173
+ return console.log(e.params), e.url ? b(t.data, "current") : b(t.data, "all"), Promise.resolve(t.data);
174
+ } catch (t) {
175
+ return S(t), Promise.reject(t);
176
+ }
177
+ }
178
+ async function fe(e) {
179
+ return U.post("/api/events/create", e).then(
180
+ (t) => (b(t.data, "current"), Promise.resolve(t.data)),
181
+ (t) => (S(t), Promise.reject(t))
182
+ );
183
+ }
184
+ async function ge(e) {
185
+ return U.post("/api/events/update", e).then(
186
+ (t) => (b(t.data, "current"), Promise.resolve(t.data)),
187
+ (t) => (S(t), Promise.reject(t))
188
+ );
189
+ }
190
+ async function ve(e) {
191
+ return await U.post("/api/events/delete", { _id: e }).then(
192
+ (t) => {
193
+ const s = h.all.findIndex((c) => c._id === e);
194
+ return s !== -1 && h.all.splice(s, 1), Promise.resolve(t.data);
195
+ },
196
+ (t) => (S(t), Promise.reject(t))
197
+ );
198
+ }
199
+ function b(e, t) {
200
+ h[t] = e;
201
+ }
202
+ function he() {
203
+ h.current = {
204
+ _id: "",
205
+ cover: "",
206
+ url: "",
207
+ status: "",
208
+ name: "",
209
+ tags: [],
210
+ date: {
211
+ start: null,
212
+ false: null
213
+ },
214
+ views: 0,
215
+ content: []
216
+ };
217
+ }
218
+ j(h, (e, t) => {
219
+ });
220
+ const Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
221
+ __proto__: null,
222
+ clean: he,
223
+ create: fe,
224
+ read: P,
225
+ remove: ve,
226
+ set: b,
227
+ state: h,
228
+ update: ge
229
+ }, Symbol.toStringTag, { value: "Module" })), ye = { class: "feed" }, Ee = {
230
+ __name: "Feed",
231
+ props: {
232
+ category: {
233
+ type: String,
234
+ default: null
235
+ },
236
+ selectedDate: {
237
+ type: String,
238
+ default: null
239
+ },
240
+ organization: {
241
+ type: String,
242
+ default: null
243
+ },
244
+ owner: {
245
+ type: String,
246
+ default: null
247
+ },
248
+ creator: {
249
+ type: String,
250
+ default: null
251
+ },
252
+ user: {
253
+ type: [String, Number],
254
+ default: null
255
+ },
256
+ sortOrder: {
257
+ type: String,
258
+ default: "desc"
259
+ },
260
+ participant: {
261
+ type: String,
262
+ default: null
263
+ },
264
+ period: {
265
+ type: String,
266
+ default: null
267
+ },
268
+ status: {
269
+ type: String,
270
+ default: null
271
+ }
272
+ },
273
+ setup(e) {
274
+ const t = e, s = v([]), c = v(!1), d = v(!0), y = v(0), a = v(20), u = async () => {
275
+ if (c.value) {
276
+ y.value += a.value;
277
+ const n = await P({
278
+ skip: y.value,
279
+ limit: a.value,
280
+ category: t.category,
281
+ sortOrder: t.sortOrder,
282
+ participant: t.participant,
283
+ creator: t.creator,
284
+ user: t.user,
285
+ date: t.selectedDate,
286
+ owner: t.owner,
287
+ organization: t.organization,
288
+ period: t.period,
289
+ status: t.status
290
+ });
291
+ n.length === 0 ? c.value = !1 : c.value = !0, s.value = [...s.value, ...n];
292
+ }
293
+ };
294
+ return V(async () => {
295
+ d.value = !0, console.log(t.selectedDate);
296
+ const n = await P({
297
+ skip: y.value,
298
+ limit: a.value,
299
+ category: t.category,
300
+ participant: t.participant,
301
+ sortOrder: t.sortOrder,
302
+ user: t.user,
303
+ owner: t.owner,
304
+ creator: t.creator,
305
+ date: t.selectedDate,
306
+ organization: t.organization,
307
+ period: t.period,
308
+ status: t.status
309
+ });
310
+ n.length === 0 ? c.value = !1 : c.value = !0, s.value = n, d.value = !1;
311
+ }), (n, E) => (r(), i("section", ye, [
312
+ C(z, {
313
+ tag: "ul",
314
+ name: "scaleTransition",
315
+ class: "o-hidden bg-grey radius-big"
316
+ }, {
317
+ default: D(() => [
318
+ d.value ? (r(!0), i(I, { key: 0 }, F(a.value, (o) => (r(), w(me, { key: o }))), 128)) : l("", !0)
319
+ ]),
320
+ _: 1
321
+ }),
322
+ C(_, { name: "scaleTransition" }, {
323
+ default: D(() => [
324
+ !d.value && s.value.length < 1 ? (r(), w(B, {
325
+ key: 0,
326
+ title: "No Events Found",
327
+ description: "Currently, there are no events available. Please check back later.",
328
+ class: "pd-medium mn-thin bg-grey radius-big"
329
+ })) : l("", !0)
330
+ ]),
331
+ _: 1
332
+ }),
333
+ C(z, {
334
+ tag: "ul",
335
+ name: "scaleTransition",
336
+ class: "container"
337
+ }, {
338
+ default: D(() => [
339
+ !d.value && s.value.length > 0 ? (r(!0), i(I, { key: 0 }, F(s.value, (o, k) => (r(), w(le, {
340
+ onClick: (x) => n.$router.push({ name: "Event", params: { url: o.url } }),
341
+ key: o._id,
342
+ event: o,
343
+ user: e.user,
344
+ type: "normal",
345
+ class: p(["bg-grey radius-big mn-medium", {
346
+ "br-b br-solid br-black-transp-10": k !== s.value.length - 1
347
+ }])
348
+ }, null, 8, ["onClick", "event", "user", "class"]))), 128)) : l("", !0),
349
+ c.value && s.value.length > 0 ? (r(), i("button", {
350
+ key: 1,
351
+ onClick: u,
352
+ class: "w-100 bg-main button"
353
+ }, "Load more")) : l("", !0)
354
+ ]),
355
+ _: 1
356
+ })
357
+ ]));
358
+ }
359
+ };
360
+ export {
361
+ me as S,
362
+ Ee as _,
363
+ le as a,
364
+ fe as b,
365
+ he as c,
366
+ ve as d,
367
+ Ue as e,
368
+ P as r,
369
+ h as s,
370
+ ge as u
371
+ };
@@ -0,0 +1,339 @@
1
+ import { openBlock as p, createElementBlock as d, createElementVNode as i, watch as C, createBlock as k, Teleport as S, createVNode as u, Transition as y, withCtx as f, mergeProps as O, renderSlot as w, createCommentVNode as g, normalizeClass as M, reactive as $, ref as P, Fragment as R, createTextVNode as x, withDirectives as L, withModifiers as T, toDisplayString as I, normalizeStyle as j, vShow as B, unref as Z } from "vue";
2
+ import { _ as v } from "./_plugin-vue_export-helper-dad06003.mjs";
3
+ import { useRoute as z, useRouter as D } from "vue-router";
4
+ import { useI18n as U } from "vue-i18n";
5
+ import { _ as q } from "./Button-c59d387c.mjs";
6
+ import { S as E } from "./Select-11ddabf5.mjs";
7
+ import { a as V } from "./reports-79cd9459.mjs";
8
+ import { c as A } from "./click-outside-6101836c.mjs";
9
+ import { a as N } from "./index-a661083c.mjs";
10
+ import { s as _ } from "./globals-96ba60e4.mjs";
11
+ const Y = {}, F = {
12
+ width: "26",
13
+ height: "26",
14
+ viewBox: "0 0 26 26",
15
+ fill: "none",
16
+ xmlns: "http://www.w3.org/2000/svg"
17
+ }, H = /* @__PURE__ */ i("rect", {
18
+ width: "24",
19
+ height: "24",
20
+ transform: "translate(1 1)"
21
+ }, null, -1), W = /* @__PURE__ */ i("path", {
22
+ fill: "rgb(var(--black))",
23
+ "fill-rule": "evenodd",
24
+ "clip-rule": "evenodd",
25
+ d: "M12.9996 10.8L22.8994 0.900244L25.0993 3.1002L15.1995 13L25.0993 22.8998L22.8994 25.0998L12.9996 15.2L3.09976 25.0998L0.899801 22.8998L10.7996 13L0.899801 3.1002L3.09976 0.900244L12.9996 10.8Z"
26
+ }, null, -1), G = [
27
+ H,
28
+ W
29
+ ];
30
+ function J(t, e) {
31
+ return p(), d("svg", F, G);
32
+ }
33
+ const K = /* @__PURE__ */ v(Y, [["render", J]]);
34
+ const Q = {
35
+ key: "popup-content",
36
+ class: "pd-small popup-wrapper"
37
+ }, X = {
38
+ __name: "Popup",
39
+ props: {
40
+ isPopupOpen: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ style: String
45
+ },
46
+ emits: ["close-popup"],
47
+ setup(t, { emit: e }) {
48
+ const r = t;
49
+ function a() {
50
+ e("close-popup");
51
+ }
52
+ return C(() => r.isPopupOpen, (n) => {
53
+ n ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
54
+ }), z(), D(), U({
55
+ messages: {
56
+ en: {},
57
+ ru: {}
58
+ }
59
+ }), (n, s) => t.isPopupOpen ? (p(), k(S, {
60
+ key: 0,
61
+ to: "body"
62
+ }, [
63
+ u(y, {
64
+ name: "TransitionTranslateY",
65
+ appear: ""
66
+ }, {
67
+ default: f(() => [
68
+ t.isPopupOpen ? (p(), d("div", Q, [
69
+ u(y, {
70
+ name: "TransitionTranslateY",
71
+ mode: "out-in"
72
+ }, {
73
+ default: f(() => [
74
+ t.isPopupOpen ? (p(), d("section", O({
75
+ key: 0,
76
+ class: "pos-relative z-index-4"
77
+ }, n.$attrs), [
78
+ i("button", {
79
+ onClick: s[0] || (s[0] = (l) => a()),
80
+ class: "pd-regular hover-scale-1 z-index-5 button-close-popup button"
81
+ }, [
82
+ u(K)
83
+ ]),
84
+ w(n.$slots, "default")
85
+ ], 16)) : g("", !0)
86
+ ]),
87
+ _: 3
88
+ }),
89
+ i("div", {
90
+ onClick: s[1] || (s[1] = (l) => a()),
91
+ class: M([{ active: t.isPopupOpen === !0 }, "color-overlay z-index-3"])
92
+ }, null, 2)
93
+ ])) : g("", !0)
94
+ ]),
95
+ _: 3
96
+ })
97
+ ])) : g("", !0);
98
+ }
99
+ }, ee = {}, te = {
100
+ viewBox: "0 0 42 42",
101
+ fill: "none",
102
+ xmlns: "http://www.w3.org/2000/svg"
103
+ }, se = /* @__PURE__ */ i("circle", {
104
+ fill: "rgb(var(--main))",
105
+ cx: "21",
106
+ cy: "21",
107
+ r: "21"
108
+ }, null, -1), re = /* @__PURE__ */ i("path", {
109
+ fill: "#242424",
110
+ "fill-opacity": "0.1",
111
+ "fill-rule": "evenodd",
112
+ "clip-rule": "evenodd",
113
+ d: "M8.00233 37.4954C8.00078 37.4458 8 37.3961 8 37.3462C8 32.9066 11.5673 29.3077 15.9677 29.3077H26.0323C30.4328 29.3077 34 32.9066 34 37.3462C34 37.3961 33.9992 37.4458 33.9977 37.4954C30.4223 40.3165 25.9078 42 21 42C16.0922 42 11.5777 40.3164 8.00233 37.4954ZM21 9C16.5995 9 13.0323 12.5989 13.0323 17.0385C13.0323 21.478 16.5995 25.0769 21 25.0769C25.4005 25.0769 28.9677 21.478 28.9677 17.0385C28.9677 12.5989 25.4005 9 21 9Z"
114
+ }, null, -1), oe = [
115
+ se,
116
+ re
117
+ ];
118
+ function ne(t, e) {
119
+ return p(), d("svg", te, oe);
120
+ }
121
+ const ke = /* @__PURE__ */ v(ee, [["render", ne]]), ie = /* @__PURE__ */ i("h3", { class: "mn-small" }, " Report Content ", -1), ae = /* @__PURE__ */ i("p", { class: "p-medium mn-small" }, " We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ", -1), le = /* @__PURE__ */ i("p", { class: "p-medium mn-small" }, "Our moderators will review your report within 24 hours and take action if it violates our policies.", -1), Se = {
122
+ __name: "FormReport",
123
+ props: {
124
+ user: {
125
+ type: String,
126
+ required: !1
127
+ },
128
+ type: {
129
+ type: String,
130
+ required: !1
131
+ },
132
+ reason: {
133
+ type: String,
134
+ required: !1
135
+ },
136
+ target: {
137
+ type: String,
138
+ required: !0
139
+ },
140
+ text: {
141
+ type: String,
142
+ default: "!"
143
+ },
144
+ status: {
145
+ type: String,
146
+ default: "new"
147
+ }
148
+ },
149
+ setup(t) {
150
+ const e = t, r = $({
151
+ user: e.user,
152
+ type: e.type,
153
+ reason: e.reason,
154
+ target: e.target,
155
+ status: e.status
156
+ });
157
+ function a() {
158
+ V.create(r);
159
+ }
160
+ const o = P(!1);
161
+ function n() {
162
+ o.value = !0;
163
+ }
164
+ function s() {
165
+ o.value = !1;
166
+ }
167
+ return (l, m) => (p(), d(R, null, [
168
+ i("div", {
169
+ onClick: m[0] || (m[0] = (b) => n())
170
+ }, [
171
+ w(l.$slots, "default")
172
+ ]),
173
+ u(X, {
174
+ onClosePopup: s,
175
+ isPopupOpen: o.value,
176
+ class: "w-m-33r t-left pd-big bg-white radius-big"
177
+ }, {
178
+ default: f(() => [
179
+ ie,
180
+ ae,
181
+ u(E, {
182
+ select: r.reason,
183
+ "onUpdate:select": m[1] || (m[1] = (b) => r.reason = b),
184
+ options: [
185
+ "harassment",
186
+ "spam",
187
+ "inappropriate",
188
+ "misinformation",
189
+ "copyright",
190
+ "other"
191
+ ],
192
+ placeholder: "Select reason",
193
+ class: "mn-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"
194
+ }, null, 8, ["select"]),
195
+ le,
196
+ u(q, {
197
+ submit: a,
198
+ callback: s,
199
+ class: "w-100 bg-black t-white"
200
+ }, {
201
+ default: f(() => [
202
+ x(" Report ")
203
+ ]),
204
+ _: 1
205
+ })
206
+ ]),
207
+ _: 1
208
+ }, 8, ["isPopupOpen"])
209
+ ], 64));
210
+ }
211
+ };
212
+ const pe = {
213
+ __name: "Dropdown",
214
+ props: {
215
+ label: {
216
+ type: String,
217
+ default: "Open"
218
+ },
219
+ align: {
220
+ type: String,
221
+ default: "left"
222
+ }
223
+ },
224
+ setup(t) {
225
+ let e = A;
226
+ const r = P(!1);
227
+ function a() {
228
+ r.value = !1;
229
+ }
230
+ return (o, n) => L((p(), d("div", {
231
+ class: "dropdown pos-relative",
232
+ onClick: n[0] || (n[0] = T((s) => r.value = !r.value, ["stop"]))
233
+ }, [
234
+ x(I(t.label) + " ", 1),
235
+ u(y, {
236
+ name: "TransitionTranslateY",
237
+ mode: "out-in"
238
+ }, {
239
+ default: f(() => [
240
+ L(i("div", {
241
+ style: j({ left: t.align === "left" ? "0" : "auto", right: t.align === "right" ? "0" : "auto" }),
242
+ class: "dropdown-content w-15r radius-big"
243
+ }, [
244
+ w(o.$slots, "default", {}, void 0, !0)
245
+ ], 4), [
246
+ [B, r.value]
247
+ ])
248
+ ]),
249
+ _: 3
250
+ })
251
+ ])), [
252
+ [Z(e), a]
253
+ ]);
254
+ }
255
+ }, Oe = /* @__PURE__ */ v(pe, [["__scopeId", "data-v-5646d77f"]]), h = N.create({
256
+ baseURL: process.env.API_URL,
257
+ withCredentials: !0
258
+ }), c = $({
259
+ memberships: [],
260
+ error: null
261
+ }), ce = {
262
+ async read({ user: t, type: e, target: r, role: a }) {
263
+ try {
264
+ const o = await h.get("/api/memberships", { params: { user: t, type: e, target: r, role: a } });
265
+ return c.error = null, c.memberships = o.data, Promise.resolve(o.data);
266
+ } catch (o) {
267
+ return _(o), Promise.reject(o);
268
+ }
269
+ },
270
+ async create(t) {
271
+ try {
272
+ const e = await h.post("/api/memberships/create", t);
273
+ return c.error = null, Promise.resolve(e.data);
274
+ } catch (e) {
275
+ return _(e), Promise.reject(e);
276
+ }
277
+ },
278
+ async update(t) {
279
+ try {
280
+ const e = await h.post("/api/memberships/update", t);
281
+ return c.error = null, Promise.resolve(e.data);
282
+ } catch (e) {
283
+ return _(e), Promise.reject(e);
284
+ }
285
+ },
286
+ async delete(t) {
287
+ try {
288
+ const e = await h.post("/api/memberships/delete", t);
289
+ return c.error = null, Promise.resolve(e.data);
290
+ } catch (e) {
291
+ return _(e), Promise.reject(e);
292
+ }
293
+ }
294
+ }, ue = {
295
+ handleMembershipUpdate(t, e, r, a, o, n) {
296
+ let s;
297
+ if (Array.isArray(t) ? s = t.find((l) => l._id === e.target) : typeof t == "object" && t._id === e.target && (s = t), s)
298
+ if (s[o] = r, r)
299
+ s.memberships.push(e), s[n] += 1;
300
+ else {
301
+ const l = s.memberships.findIndex((m) => m._id === e._id);
302
+ l !== -1 && (s.memberships.splice(l, 1), s[n] -= 1);
303
+ }
304
+ }
305
+ };
306
+ C(c, (t) => {
307
+ });
308
+ const Me = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
309
+ __proto__: null,
310
+ actions: ce,
311
+ mutations: ue,
312
+ state: c
313
+ }, Symbol.toStringTag, { value: "Module" })), de = {}, me = {
314
+ width: "652",
315
+ height: "652",
316
+ viewBox: "0 0 652 652",
317
+ fill: "none",
318
+ xmlns: "http://www.w3.org/2000/svg"
319
+ }, fe = /* @__PURE__ */ i("path", {
320
+ fill: "rgb(var(--black))",
321
+ d: "M515.693 9.52082C510.095 3.91669 502.49 0.765625 494.563 0.765625C486.635 0.765625 479.036 3.91669 473.432 9.52082L48.7255 434.307C44.8244 438.214 42.0848 443.125 40.8088 448.496L0.939444 615.069C-1.47202 625.168 1.528 635.788 8.86652 643.132C16.2103 650.47 26.8305 653.47 36.9292 651.059L203.516 611.261H203.511C208.88 609.985 213.792 607.246 217.699 603.35L642.485 178.496C648.089 172.892 651.241 165.293 651.241 157.366C651.241 149.439 648.089 141.835 642.485 136.235L515.693 9.52082ZM113.76 453.708L388.307 179.161L472.828 263.682L198.281 538.229L113.76 453.708ZM87.1041 511.5L140.416 564.812L70.3014 581.614L87.1041 511.5ZM515.091 221.793L430.195 136.897L494.184 72.9075L579.08 157.429L515.091 221.793Z"
322
+ }, null, -1), _e = [
323
+ fe
324
+ ];
325
+ function he(t, e) {
326
+ return p(), d("svg", me, _e);
327
+ }
328
+ const Re = /* @__PURE__ */ v(de, [["render", he]]);
329
+ export {
330
+ Oe as D,
331
+ Re as I,
332
+ ke as P,
333
+ Se as _,
334
+ ce as a,
335
+ X as b,
336
+ Me as c,
337
+ ue as m,
338
+ c as s
339
+ };