@ozdao/prometheus-framework 0.1.27 → 0.1.29

Sign up to get free protection for your applications and to get access to all the features.
Files changed (67) hide show
  1. package/dist/Chips-493042f7.js +1 -0
  2. package/dist/Chips-9cf6c0da.mjs +286 -0
  3. package/dist/Feed-27f62b1c.mjs +368 -0
  4. package/dist/Feed-7c8c901a.mjs +380 -0
  5. package/dist/Feed-aee74095.js +1 -0
  6. package/dist/Feed-bfd7d1d9.js +1 -0
  7. package/dist/Image-1f7252c0.mjs +477 -0
  8. package/dist/Image-448f9228.js +9 -0
  9. package/dist/Product-3c9c8197.js +7 -0
  10. package/dist/Product-748ec8b7.mjs +842 -0
  11. package/dist/Product-852f952c.js +7 -0
  12. package/dist/Product-bbdc8460.mjs +841 -0
  13. package/dist/ProductEdit-17f4e395.mjs +304 -0
  14. package/dist/ProductEdit-4af06681.js +1 -0
  15. package/dist/ProductEdit-4f9b6d56.js +1 -0
  16. package/dist/ProductEdit-a1050ab6.mjs +303 -0
  17. package/dist/ProfileBlogposts-03d04b92.mjs +66 -0
  18. package/dist/ProfileBlogposts-f9312adf.js +1 -0
  19. package/dist/ProfileComments-6d863cd3.mjs +45 -0
  20. package/dist/ProfileComments-e6970923.js +1 -0
  21. package/dist/ProfileEvents-917169c6.mjs +58 -0
  22. package/dist/ProfileEvents-996bce18.js +1 -0
  23. package/dist/ProfileLikes-0402d1fb.js +1 -0
  24. package/dist/ProfileLikes-92196922.mjs +45 -0
  25. package/dist/auth.client.cjs +8 -8
  26. package/dist/auth.client.js +581 -602
  27. package/dist/auth.validation-2cdd2231.mjs +17 -0
  28. package/dist/auth.validation-30bb0efd.js +1 -0
  29. package/dist/community.client.cjs +1 -1
  30. package/dist/community.client.js +65 -65
  31. package/dist/components/CardFooter/CardFooter.vue.d.ts +1 -1
  32. package/dist/components/CardHeader/CardHeader.vue.d.ts +1 -1
  33. package/dist/events.client.cjs +2 -2
  34. package/dist/events.client.js +6 -6
  35. package/dist/legal.client.cjs +1 -1
  36. package/dist/legal.client.js +2596 -2567
  37. package/dist/modules/community/components/blocks/FooterBlogpost.vue.d.ts +1 -1
  38. package/dist/modules/community/components/sections/Feed.vue.d.ts +1 -1
  39. package/dist/modules/events/components/blocks/CardEvent.vue.d.ts +3 -3
  40. package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -1
  41. package/dist/modules/events/components/sections/List.vue.d.ts +1 -1
  42. package/dist/modules/organizations/components/sections/Feed.vue.d.ts +1 -1
  43. package/dist/modules/organizations/components/sections/Organizations.vue.d.ts +1 -1
  44. package/dist/organizations.client-13fc2cbe.js +3 -0
  45. package/dist/organizations.client-39196bef.mjs +3041 -0
  46. package/dist/organizations.client-85a2ae66.js +3 -0
  47. package/dist/organizations.client-91e84d4f.mjs +3022 -0
  48. package/dist/organizations.client.cjs +1 -1
  49. package/dist/organizations.client.js +43 -42
  50. package/dist/states.validation-766a62a6.mjs +13 -0
  51. package/dist/states.validation-92231934.js +1 -0
  52. package/dist/style.css +1 -1
  53. package/dist/users.client.cjs +1 -1
  54. package/dist/users.client.js +199 -194
  55. package/package.json +1 -1
  56. package/src/components/CardFooter/CardFooter.vue +27 -30
  57. package/src/components/CardHeader/CardHeader.vue +56 -3
  58. package/src/modules/auth/components/pages/SignIn.vue +2 -2
  59. package/src/modules/community/components/layouts/Community.vue +5 -5
  60. package/src/modules/events/components/blocks/CardEvent.vue +3 -2
  61. package/src/modules/events/components/pages/EditEvent.vue +1 -1
  62. package/src/modules/events/router/events.js +1 -0
  63. package/src/modules/legal/components/pages/Legal.vue +33 -17
  64. package/src/modules/legal/router/legal.js +51 -21
  65. package/src/modules/organizations/router/organizations.js +19 -0
  66. package/src/modules/users/components/pages/Profile.vue +2 -2
  67. package/src/modules/users/router/users.js +36 -31
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),y=require("vue-router"),E=require("./IconEdit-4cfe2115.js"),V=require("vue-i18n"),x=require("./Button-ee08e6bf.js"),B=require("./index-7ecbf72a.js"),f=require("./globals-928eb13c.js");const N={class:"pd-small popup-wrapper"},P=e.createElementVNode("svg",{width:"26",height:"26",viewBox:"0 0 26 26",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("rect",{width:"24",height:"24",transform:"translate(1 1)"}),e.createElementVNode("path",{"fill-rule":"evenodd","clip-rule":"evenodd",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",fill:"white"})],-1),$=[P],k={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String},emits:["close-popup"],setup(t,{emit:o}){const a=t;function r(){o("close-popup")}e.watch(()=>a.isPopupOpen,l=>{l?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),y.useRoute(),y.useRouter();const n={messages:{en:{},ru:{}}};return V.useI18n(n),(l,i)=>t.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"scale"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",N,[e.createElementVNode("section",e.mergeProps({class:"t-center z-index-4"},l.$attrs),[e.createElementVNode("button",{onClick:i[0]||(i[0]=s=>r()),class:"pd-regular hover-scale-1 z-index-5 button-close-popup button"},$),e.renderSlot(l.$slots,"default")],16),e.createElementVNode("div",{onClick:i[1]||(i[1]=s=>r()),class:e.normalizeClass([{active:t.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)],512),[[e.vShow,t.isPopupOpen]])]),_:3})])):e.createCommentVNode("",!0)}},C={key:0,class:"pd-b-zero"},L={class:"w-100 flex-v-center flex-nojustify flex"},R={class:"w-100 flex-nowrap flex-v-center flex"},S=["src"],_={key:2,class:"t-semi"},O={key:1},z={key:2},M={class:"d-block mn-l-auto flex-nowrap flex flex-v-center"},D={key:0,class:"w-4r i-thin"},I={style:{position:"absolute",top:"0px",right:"0px"},class:"br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"},U=["src"],j={class:"w-m-66r t-left pd-big bg-white radius-big"},q=e.createElementVNode("h3",{class:"mn-small"},"Report Inappropriate Content",-1),F=e.createElementVNode("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. Here’s what you can report:",-1),T=e.createElementVNode("ul",{class:"p-medium mn-small"},[e.createElementVNode("li",null,"1. Abusive or harmful content"),e.createElementVNode("li",null,"2. Spam or misleading information"),e.createElementVNode("li",null,"3. Inappropriate or offensive material"),e.createElementVNode("li",null,"4. Unauthorized sharing of personal information")],-1),A=e.createElementVNode("p",{class:"p-medium mn-small"},"Our team of moderators will review your report and take appropriate action, which may include removing the content if it is found to be in violation of our policies.",-1),H={__name:"CardHeader",props:["date","dateFormatted","owner","creator","members","membersPhotos","type"],setup(t){y.useRouter();const o=e.ref(!1);function a(){o.value=!0}function r(){o.value=!1}async function n(){setTimeout(function(){},1)}function l(i){const s=new Date,c=new Date(i),u=Math.abs(s-c),b=Math.floor(u/1e3),m=Math.floor(b/60),p=Math.floor(m/60),h=Math.floor(p/24),w=Math.floor(h/7);return w>0?`${w} week${w>1?"s":""} ago`:h>0?`${h} day${h>1?"s":""} ago`:p>0?`${p} hour${p>1?"s":""} ago`:m>0?`${m} minute${m>1?"s":""} ago`:"Just now"}return(i,s)=>t.owner?(e.openBlock(),e.createElementBlock("header",C,[e.createElementVNode("div",L,[e.createElementVNode("div",R,[t.owner.target.profile.photo.length>0&&t.type!=="short"?(e.openBlock(),e.createElementBlock("img",{key:0,src:(i.FILE_SERVER_URL||"")+t.owner.target.profile.photo,class:"radius-medium mn-r-thin i-thin",onClick:s[0]||(s[0]=e.withModifiers(c=>i.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},null,8,S)):e.createCommentVNode("",!0),!t.owner.target.profile.photo&&t.type!=="short"?(e.openBlock(),e.createBlock(E.PlaceholderUserpic,{key:1,class:"radius-medium mn-r-thin i-thin",onClick:s[1]||(s[1]=e.withModifiers(c=>i.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))})):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("span",_,[e.createElementVNode("span",{onClick:s[2]||(s[2]=e.withModifiers(c=>i.$router.push({name:t.owner.type==="user"?"User Profile":"Organization",params:{_id:t.owner.target._id}}),["stop"]))},e.toDisplayString(t.owner.target.profile.name),1),!t.creator.hidden&&t.owner.target.profile.name!==t.creator.target.profile.name?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:s[3]||(s[3]=e.withModifiers(c=>i.$router.push({name:"User Profile",params:{_id:t.creator.target._id}}),["stop"]))}," · by "+e.toDisplayString(t.creator.target.profile.name),1)):e.createCommentVNode("",!0),t.date?(e.openBlock(),e.createElementBlock("span",O," · "+e.toDisplayString(l(t.date)),1)):e.createCommentVNode("",!0),t.dateFormatted?(e.openBlock(),e.createElementBlock("span",z," · "+e.toDisplayString(t.dateFormatted),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),e.createElementVNode("div",M,[t.members?(e.openBlock(),e.createElementBlock("div",D,[e.createElementVNode("span",I,e.toDisplayString(t.members),1),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.membersPhotos.slice(0,2),(c,u)=>(e.openBlock(),e.createElementBlock("img",{key:u,src:(i.FILE_SERVER_URL||"")+c,style:e.normalizeStyle({position:"absolute",top:"0px",right:u*20+20+"%",zIndex:1-u}),class:"br-solid br-2px br-white i-thin bg-grey radius-big"},null,12,U))),128))])):e.createCommentVNode("",!0)]),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",{key:3,onClick:s[4]||(s[4]=e.withModifiers(c=>a(),["stop"])),class:"t-transp t-white flex-center flex t-semi mn-l-thin i-medium radius-extra bg-black"}," ! ")):e.createCommentVNode("",!0),e.createVNode(k,{onClosePopup:r,isPopupOpen:o.value},{default:e.withCtx(()=>[e.createElementVNode("div",j,[q,F,T,A,e.createVNode(x._sfc_main,{submit:n,callback:r,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})])]),_:1},8,["isPopupOpen"])])])])):e.createCommentVNode("",!0)}},g=B.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),d=e.reactive({reactions:[],error:null}),v={async read({user:t,type:o,target:a,role:r}){try{const n=await g.get("/api/reactions",{params:{user:t,type:o,target:a,role:r}});return d.error=null,d.reactions=n.data,Promise.resolve(n.data)}catch(n){return f.setError(n),Promise.reject(n)}},async create(t){try{const o=await g.post("/api/reactions/create",t);return d.error=null,Promise.resolve(o.data)}catch(o){return console.log(o),f.setError(o),Promise.reject(o)}},async update(t){try{const o=await g.post("/api/reactions/update",t);return d.error=null,Promise.resolve(o.data)}catch(o){return f.setError(o),Promise.reject(o)}},async delete(t){try{const o=await g.post("/api/reactions/delete",t);return d.error=null,Promise.resolve(o.data)}catch(o){return f.setError(o),Promise.reject(o)}}},J={handleReactionUpdate(t,o,a){let r;if(Array.isArray(t)?r=t.find(n=>n._id===o.target):typeof t=="object"&&t._id===o.target&&(r=t),r)if(r.hasReaction=a,a)r.reactions.push(o),r.numberOfReactions+=1;else{const n=r.reactions.findIndex(l=>l._id===o._id);n!==-1&&(r.reactions.splice(n,1),r.numberOfReactions-=1)}}};e.watch(d,t=>{});const W=Object.freeze(Object.defineProperty({__proto__:null,actions:v,mutations:J,state:d},Symbol.toStringTag,{value:"Module"})),Z={class:"flex-v-center gap-thin flex"},G={class:"pd-thin radius-small t-semi bg-main"},K={key:1,class:"pd-thin radius-small t-semi bg-white"},Q={__name:"Chips",props:["chips"],setup(t){return(o,a)=>(e.openBlock(),e.createElementBlock("div",Z,[t.chips.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.chips,(r,n)=>(e.openBlock(),e.createElementBlock("div",G,e.toDisplayString(r.text?r.text:r),1))),256)):(e.openBlock(),e.createElementBlock("div",K,e.toDisplayString(t.chips),1))]))}};exports._sfc_main=H;exports._sfc_main$1=Q;exports._sfc_main$2=k;exports.actions=v;exports.reactions=W;
@@ -0,0 +1,286 @@
1
+ import { watch as L, openBlock as s, createBlock as R, Teleport as S, createVNode as $, Transition as U, withCtx as k, withDirectives as E, createElementVNode as r, mergeProps as I, renderSlot as M, normalizeClass as j, vShow as F, createCommentVNode as c, ref as T, createElementBlock as a, withModifiers as g, toDisplayString as p, Fragment as C, renderList as O, normalizeStyle as V, createTextVNode as A, reactive as B } from "vue";
2
+ import { useRoute as D, useRouter as z } from "vue-router";
3
+ import { P as N } from "./IconEdit-eacf3856.mjs";
4
+ import { useI18n as H } from "vue-i18n";
5
+ import { _ as J } from "./Button-d8e72ac0.mjs";
6
+ import { a as W } from "./index-0ab9d59c.mjs";
7
+ import { s as b } from "./globals-96ba60e4.mjs";
8
+ const Z = { class: "pd-small popup-wrapper" }, q = /* @__PURE__ */ r("svg", {
9
+ width: "26",
10
+ height: "26",
11
+ viewBox: "0 0 26 26",
12
+ fill: "none",
13
+ xmlns: "http://www.w3.org/2000/svg"
14
+ }, [
15
+ /* @__PURE__ */ r("rect", {
16
+ width: "24",
17
+ height: "24",
18
+ transform: "translate(1 1)"
19
+ }),
20
+ /* @__PURE__ */ r("path", {
21
+ "fill-rule": "evenodd",
22
+ "clip-rule": "evenodd",
23
+ 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",
24
+ fill: "white"
25
+ })
26
+ ], -1), G = [
27
+ q
28
+ ], K = {
29
+ __name: "Popup",
30
+ props: {
31
+ isPopupOpen: {
32
+ type: Boolean,
33
+ default: !1
34
+ },
35
+ style: String
36
+ },
37
+ emits: ["close-popup"],
38
+ setup(e, { emit: t }) {
39
+ const u = e;
40
+ function o() {
41
+ t("close-popup");
42
+ }
43
+ return L(() => u.isPopupOpen, (d) => {
44
+ d ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
45
+ }), D(), z(), H({
46
+ messages: {
47
+ en: {},
48
+ ru: {}
49
+ }
50
+ }), (d, l) => e.isPopupOpen ? (s(), R(S, {
51
+ key: 0,
52
+ to: "body"
53
+ }, [
54
+ $(U, { name: "scale" }, {
55
+ default: k(() => [
56
+ E(r("div", Z, [
57
+ r("section", I({ class: "t-center z-index-4" }, d.$attrs), [
58
+ r("button", {
59
+ onClick: l[0] || (l[0] = (i) => o()),
60
+ class: "pd-regular hover-scale-1 z-index-5 button-close-popup button"
61
+ }, G),
62
+ M(d.$slots, "default")
63
+ ], 16),
64
+ r("div", {
65
+ onClick: l[1] || (l[1] = (i) => o()),
66
+ class: j([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
67
+ }, null, 2)
68
+ ], 512), [
69
+ [F, e.isPopupOpen]
70
+ ])
71
+ ]),
72
+ _: 3
73
+ })
74
+ ])) : c("", !0);
75
+ }
76
+ }, Q = {
77
+ key: 0,
78
+ class: "pd-b-zero"
79
+ }, X = { class: "w-100 flex-v-center flex-nojustify flex" }, Y = { class: "w-100 flex-nowrap flex-v-center flex" }, ee = ["src"], te = {
80
+ key: 2,
81
+ class: "t-semi"
82
+ }, oe = { key: 1 }, re = { key: 2 }, se = { class: "d-block mn-l-auto flex-nowrap flex flex-v-center" }, ne = {
83
+ key: 0,
84
+ class: "w-4r i-thin"
85
+ }, ie = {
86
+ style: { position: "absolute", top: "0px", right: "0px" },
87
+ class: "br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"
88
+ }, ae = ["src"], le = { class: "w-m-66r t-left pd-big bg-white radius-big" }, ce = /* @__PURE__ */ r("h3", { class: "mn-small" }, "Report Inappropriate Content", -1), ue = /* @__PURE__ */ r("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. Here’s what you can report:", -1), de = /* @__PURE__ */ r("ul", { class: "p-medium mn-small" }, [
89
+ /* @__PURE__ */ r("li", null, "1. Abusive or harmful content"),
90
+ /* @__PURE__ */ r("li", null, "2. Spam or misleading information"),
91
+ /* @__PURE__ */ r("li", null, "3. Inappropriate or offensive material"),
92
+ /* @__PURE__ */ r("li", null, "4. Unauthorized sharing of personal information")
93
+ ], -1), me = /* @__PURE__ */ r("p", { class: "p-medium mn-small" }, "Our team of moderators will review your report and take appropriate action, which may include removing the content if it is found to be in violation of our policies.", -1), Le = {
94
+ __name: "CardHeader",
95
+ props: [
96
+ "date",
97
+ "dateFormatted",
98
+ "owner",
99
+ "creator",
100
+ "members",
101
+ "membersPhotos",
102
+ "type"
103
+ ],
104
+ setup(e) {
105
+ z();
106
+ const t = T(!1);
107
+ function u() {
108
+ t.value = !0;
109
+ }
110
+ function o() {
111
+ t.value = !1;
112
+ }
113
+ async function n() {
114
+ setTimeout(function() {
115
+ }, 1);
116
+ }
117
+ function d(l) {
118
+ const i = /* @__PURE__ */ new Date(), m = new Date(l), h = Math.abs(i - m), _ = Math.floor(h / 1e3), y = Math.floor(_ / 60), w = Math.floor(y / 60), v = Math.floor(w / 24), P = Math.floor(v / 7);
119
+ return P > 0 ? `${P} week${P > 1 ? "s" : ""} ago` : v > 0 ? `${v} day${v > 1 ? "s" : ""} ago` : w > 0 ? `${w} hour${w > 1 ? "s" : ""} ago` : y > 0 ? `${y} minute${y > 1 ? "s" : ""} ago` : "Just now";
120
+ }
121
+ return (l, i) => e.owner ? (s(), a("header", Q, [
122
+ r("div", X, [
123
+ r("div", Y, [
124
+ e.owner.target.profile.photo.length > 0 && e.type !== "short" ? (s(), a("img", {
125
+ key: 0,
126
+ src: (l.FILE_SERVER_URL || "") + e.owner.target.profile.photo,
127
+ class: "radius-medium mn-r-thin i-thin",
128
+ onClick: i[0] || (i[0] = g((m) => l.$router.push({
129
+ name: e.owner.type === "user" ? "User Profile" : "Organization",
130
+ params: {
131
+ _id: e.owner.target._id
132
+ }
133
+ }), ["stop"]))
134
+ }, null, 8, ee)) : c("", !0),
135
+ !e.owner.target.profile.photo && e.type !== "short" ? (s(), R(N, {
136
+ key: 1,
137
+ class: "radius-medium mn-r-thin i-thin",
138
+ onClick: i[1] || (i[1] = g((m) => l.$router.push({
139
+ name: e.owner.type === "user" ? "User Profile" : "Organization",
140
+ params: {
141
+ _id: e.owner.target._id
142
+ }
143
+ }), ["stop"]))
144
+ })) : c("", !0),
145
+ e.type !== "short" ? (s(), a("span", te, [
146
+ r("span", {
147
+ onClick: i[2] || (i[2] = g((m) => l.$router.push({
148
+ name: e.owner.type === "user" ? "User Profile" : "Organization",
149
+ params: {
150
+ _id: e.owner.target._id
151
+ }
152
+ }), ["stop"]))
153
+ }, p(e.owner.target.profile.name), 1),
154
+ !e.creator.hidden && e.owner.target.profile.name !== e.creator.target.profile.name ? (s(), a("span", {
155
+ key: 0,
156
+ onClick: i[3] || (i[3] = g((m) => l.$router.push({
157
+ name: "User Profile",
158
+ params: {
159
+ _id: e.creator.target._id
160
+ }
161
+ }), ["stop"]))
162
+ }, " · by " + p(e.creator.target.profile.name), 1)) : c("", !0),
163
+ e.date ? (s(), a("span", oe, " · " + p(d(e.date)), 1)) : c("", !0),
164
+ e.dateFormatted ? (s(), a("span", re, " · " + p(e.dateFormatted), 1)) : c("", !0)
165
+ ])) : c("", !0),
166
+ r("div", se, [
167
+ e.members ? (s(), a("div", ne, [
168
+ r("span", ie, p(e.members), 1),
169
+ (s(!0), a(C, null, O(e.membersPhotos.slice(0, 2), (m, h) => (s(), a("img", {
170
+ key: h,
171
+ src: (l.FILE_SERVER_URL || "") + m,
172
+ style: V({ position: "absolute", top: "0px", right: h * 20 + 20 + "%", zIndex: 1 - h }),
173
+ class: "br-solid br-2px br-white i-thin bg-grey radius-big"
174
+ }, null, 12, ae))), 128))
175
+ ])) : c("", !0)
176
+ ]),
177
+ e.type !== "short" ? (s(), a("div", {
178
+ key: 3,
179
+ onClick: i[4] || (i[4] = g((m) => u(), ["stop"])),
180
+ class: "t-transp t-white flex-center flex t-semi mn-l-thin i-medium radius-extra bg-black"
181
+ }, " ! ")) : c("", !0),
182
+ $(K, {
183
+ onClosePopup: o,
184
+ isPopupOpen: t.value
185
+ }, {
186
+ default: k(() => [
187
+ r("div", le, [
188
+ ce,
189
+ ue,
190
+ de,
191
+ me,
192
+ $(J, {
193
+ submit: n,
194
+ callback: o,
195
+ class: "w-100 bg-black t-white"
196
+ }, {
197
+ default: k(() => [
198
+ A(" Report ")
199
+ ]),
200
+ _: 1
201
+ })
202
+ ])
203
+ ]),
204
+ _: 1
205
+ }, 8, ["isPopupOpen"])
206
+ ])
207
+ ])
208
+ ])) : c("", !0);
209
+ }
210
+ }, x = W.create({
211
+ baseURL: process.env.API_URL,
212
+ withCredentials: !0
213
+ }), f = B({
214
+ reactions: [],
215
+ error: null
216
+ }), pe = {
217
+ async read({ user: e, type: t, target: u, role: o }) {
218
+ try {
219
+ const n = await x.get("/api/reactions", { params: { user: e, type: t, target: u, role: o } });
220
+ return f.error = null, f.reactions = n.data, Promise.resolve(n.data);
221
+ } catch (n) {
222
+ return b(n), Promise.reject(n);
223
+ }
224
+ },
225
+ async create(e) {
226
+ try {
227
+ const t = await x.post("/api/reactions/create", e);
228
+ return f.error = null, Promise.resolve(t.data);
229
+ } catch (t) {
230
+ return console.log(t), b(t), Promise.reject(t);
231
+ }
232
+ },
233
+ async update(e) {
234
+ try {
235
+ const t = await x.post("/api/reactions/update", e);
236
+ return f.error = null, Promise.resolve(t.data);
237
+ } catch (t) {
238
+ return b(t), Promise.reject(t);
239
+ }
240
+ },
241
+ async delete(e) {
242
+ try {
243
+ const t = await x.post("/api/reactions/delete", e);
244
+ return f.error = null, Promise.resolve(t.data);
245
+ } catch (t) {
246
+ return b(t), Promise.reject(t);
247
+ }
248
+ }
249
+ }, fe = {
250
+ handleReactionUpdate(e, t, u) {
251
+ let o;
252
+ if (Array.isArray(e) ? o = e.find((n) => n._id === t.target) : typeof e == "object" && e._id === t.target && (o = e), o)
253
+ if (o.hasReaction = u, u)
254
+ o.reactions.push(t), o.numberOfReactions += 1;
255
+ else {
256
+ const n = o.reactions.findIndex((d) => d._id === t._id);
257
+ n !== -1 && (o.reactions.splice(n, 1), o.numberOfReactions -= 1);
258
+ }
259
+ }
260
+ };
261
+ L(f, (e) => {
262
+ });
263
+ const Re = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
264
+ __proto__: null,
265
+ actions: pe,
266
+ mutations: fe,
267
+ state: f
268
+ }, Symbol.toStringTag, { value: "Module" })), he = { class: "flex-v-center gap-thin flex" }, ge = { class: "pd-thin radius-small t-semi bg-main" }, ye = {
269
+ key: 1,
270
+ class: "pd-thin radius-small t-semi bg-white"
271
+ }, Ce = {
272
+ __name: "Chips",
273
+ props: ["chips"],
274
+ setup(e) {
275
+ return (t, u) => (s(), a("div", he, [
276
+ e.chips.length ? (s(!0), a(C, { key: 0 }, O(e.chips, (o, n) => (s(), a("div", ge, p(o.text ? o.text : o), 1))), 256)) : (s(), a("div", ye, p(e.chips), 1))
277
+ ]));
278
+ }
279
+ };
280
+ export {
281
+ Le as _,
282
+ Ce as a,
283
+ pe as b,
284
+ K as c,
285
+ Re as r
286
+ };
@@ -0,0 +1,368 @@
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 _, 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-9cf6c0da.mjs";
4
+ import { I as q } from "./IconEdit-eacf3856.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-0ab9d59c.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
+ owner: e.event.owner,
68
+ creator: e.event.creator,
69
+ members: e.event.numberOfTickets,
70
+ membersPhotos: e.event.participantsPhotos,
71
+ type: e.type,
72
+ dateFormatted: T(s)
73
+ }, null, 8, ["class", "owner", "creator", "members", "membersPhotos", "type", "dateFormatted"]),
74
+ e.event.cover && e.type !== "short" ? (r(), i("div", K, [
75
+ f("img", {
76
+ src: (a.FILE_SERVER_URL || "") + e.event.cover,
77
+ alt: "Event image",
78
+ class: "pos-relative z-index-1 d-block mn-auto h-20r"
79
+ }, null, 8, Q),
80
+ f("img", {
81
+ src: (a.FILE_SERVER_URL || "") + e.event.cover,
82
+ alt: "Event Background",
83
+ class: "z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",
84
+ style: { transform: "scale(1.5)", filter: "blur(2rem)", "-webkit-filter": "blur(2rem)" }
85
+ }, null, 8, W)
86
+ ])) : l("", !0),
87
+ f("section", {
88
+ class: p(["pos-relative w-100", { "pd-t-zero pd-medium": e.type !== "short" }])
89
+ }, [
90
+ e.user === e.event.creator.target._id ? (r(), w(q, {
91
+ key: 0,
92
+ onClick: u[0] || (u[0] = L((n) => a.$router.push({
93
+ name: "Edit Event",
94
+ params: {
95
+ url: e.event.url
96
+ }
97
+ }), ["stop"])),
98
+ class: "z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
99
+ })) : l("", !0),
100
+ f("div", {
101
+ class: p([{ "mn-small": e.type !== "short" }, "flex-v-center flex-nowrap flex"])
102
+ }, [
103
+ f("div", X, [
104
+ e.type !== "short" ? (r(), i("span", Z, g(T(c)) + " | ", 1)) : l("", !0),
105
+ f("span", ee, g(T(d)), 1)
106
+ ]),
107
+ e.type === "short" ? (r(), i("span", te, g(T(y)), 1)) : l("", !0)
108
+ ], 2),
109
+ e.type !== "short" ? (r(), i("div", ae, [
110
+ e.type !== "short" ? (r(), i("h3", re, g(e.event.name), 1)) : l("", !0),
111
+ e.event.status === "draft" ? (r(), i("div", ne, g(e.event.status), 1)) : l("", !0)
112
+ ])) : l("", !0),
113
+ e.type !== "short" ? (r(), i("p", se, g(e.event.description), 1)) : l("", !0),
114
+ O(a.$slots, "default"),
115
+ e.type !== "short" && e.event.tags.length > 0 ? (r(), w(Y, {
116
+ key: 3,
117
+ chips: e.event.tags
118
+ }, null, 8, ["chips"])) : l("", !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__ */ 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 = [
127
+ ue
128
+ ];
129
+ function de(e, t) {
130
+ return r(), i("svg", ce, oe);
131
+ }
132
+ const me = /* @__PURE__ */ G(ie, [["render", de]]), U = J.create({ baseURL: process.env.API_URL, withCredentials: !0 }), h = 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 P(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 U.get("/api/events/read", { params: e.params });
170
+ return console.log(e.params), e.url ? b(t.data, "current") : b(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 U.post("/api/events/create", e).then(
177
+ (t) => (b(t.data, "current"), Promise.resolve(t.data)),
178
+ (t) => (S(t), Promise.reject(t))
179
+ );
180
+ }
181
+ async function ge(e) {
182
+ return U.post("/api/events/update", e).then(
183
+ (t) => (b(t.data, "current"), Promise.resolve(t.data)),
184
+ (t) => (S(t), Promise.reject(t))
185
+ );
186
+ }
187
+ async function ve(e) {
188
+ return await U.post("/api/events/delete", { _id: e }).then(
189
+ (t) => {
190
+ const s = h.all.findIndex((c) => c._id === e);
191
+ return s !== -1 && h.all.splice(s, 1), Promise.resolve(t.data);
192
+ },
193
+ (t) => (S(t), Promise.reject(t))
194
+ );
195
+ }
196
+ function b(e, t) {
197
+ h[t] = e;
198
+ }
199
+ function he() {
200
+ h.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
+ _(h, (e, t) => {
216
+ });
217
+ const Ue = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
218
+ __proto__: null,
219
+ clean: he,
220
+ create: fe,
221
+ read: P,
222
+ remove: ve,
223
+ set: b,
224
+ state: h,
225
+ update: ge
226
+ }, Symbol.toStringTag, { value: "Module" })), ye = { class: "feed" }, Ee = {
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, s = v([]), c = v(!1), d = v(!0), y = v(0), a = v(20), u = async () => {
272
+ if (c.value) {
273
+ y.value += a.value;
274
+ const n = await P({
275
+ skip: y.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
+ n.length === 0 ? c.value = !1 : c.value = !0, s.value = [...s.value, ...n];
289
+ }
290
+ };
291
+ return j(async () => {
292
+ d.value = !0, console.log(t.selectedDate);
293
+ const n = await P({
294
+ skip: y.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
+ n.length === 0 ? c.value = !1 : c.value = !0, s.value = n, d.value = !1;
308
+ }), (n, E) => (r(), i("section", ye, [
309
+ C(z, {
310
+ tag: "ul",
311
+ name: "scaleTransition",
312
+ class: "o-hidden bg-grey radius-big"
313
+ }, {
314
+ default: D(() => [
315
+ d.value ? (r(!0), i(I, { key: 0 }, F(a.value, (o) => (r(), w(me, { key: o }))), 128)) : l("", !0)
316
+ ]),
317
+ _: 1
318
+ }),
319
+ C(V, { name: "scaleTransition" }, {
320
+ default: D(() => [
321
+ !d.value && s.value.length < 1 ? (r(), w(B, {
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
+ })) : l("", !0)
327
+ ]),
328
+ _: 1
329
+ }),
330
+ C(z, {
331
+ tag: "ul",
332
+ name: "scaleTransition",
333
+ class: "container"
334
+ }, {
335
+ default: D(() => [
336
+ !d.value && s.value.length > 0 ? (r(!0), i(I, { key: 0 }, F(s.value, (o, k) => (r(), w(le, {
337
+ onClick: (x) => n.$router.push({ name: "Event", params: { url: o.url } }),
338
+ key: o._id,
339
+ event: o,
340
+ owner: e.user,
341
+ type: "normal",
342
+ class: p(["bg-grey radius-big mn-medium", {
343
+ "br-b br-solid br-black-transp-10": k !== s.value.length - 1
344
+ }])
345
+ }, null, 8, ["onClick", "event", "owner", "class"]))), 128)) : l("", !0),
346
+ c.value && s.value.length > 0 ? (r(), i("button", {
347
+ key: 1,
348
+ onClick: u,
349
+ class: "w-100 bg-main button"
350
+ }, "Load more")) : l("", !0)
351
+ ]),
352
+ _: 1
353
+ })
354
+ ]));
355
+ }
356
+ };
357
+ export {
358
+ me as S,
359
+ Ee as _,
360
+ le as a,
361
+ fe as b,
362
+ he as c,
363
+ ve as d,
364
+ Ue as e,
365
+ P as r,
366
+ h as s,
367
+ ge as u
368
+ };