@ozdao/prometheus-framework 0.0.85 → 0.0.87

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-15e71ec4.js +1 -0
  2. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-628f013e.mjs +138 -0
  3. package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-cdbafd07.mjs +1944 -0
  4. package/dist/ButtonFollow-728aab73.mjs +130 -0
  5. package/dist/CardHeader-ce5a1a75.mjs +96 -0
  6. package/dist/CardOrganization-58b54995.js +1 -0
  7. package/dist/CardOrganization-91e79698.mjs +320 -0
  8. package/dist/CardOrganization-ee5c34ab.js +1 -0
  9. package/dist/CardOrganization-f70bd169.mjs +202 -0
  10. package/dist/Comments-63f154a6.js +9 -0
  11. package/dist/Comments-c092550f.mjs +76 -0
  12. package/dist/Comments-c5afa4d6.mjs +459 -0
  13. package/dist/EditProductImages-61ff4321.mjs +236 -0
  14. package/dist/Feed-8fd41524.js +1 -0
  15. package/dist/Feed-926cf4f3.mjs +355 -0
  16. package/dist/Feed-a31c43c2.mjs +423 -0
  17. package/dist/Feed-ecf37814.mjs +367 -0
  18. package/dist/IconEdit-736c89be.js +1 -0
  19. package/dist/IconEdit-e9fd4c6c.mjs +21 -0
  20. package/dist/PlaceholderUserpic-995da0fc.mjs +28 -0
  21. package/dist/Popup-0c791801.mjs +76 -0
  22. package/dist/Popup-105ef2c3.js +1 -0
  23. package/dist/Popup-82fb2c8a.mjs +76 -0
  24. package/dist/Product-2f3d592f.mjs +837 -0
  25. package/dist/Product-2fbf9d99.js +7 -0
  26. package/dist/Product-6c37ef35.js +7 -0
  27. package/dist/Product-7087b358.mjs +837 -0
  28. package/dist/ProductEdit-20709821.mjs +349 -0
  29. package/dist/ProductEdit-a81d13b9.js +1 -0
  30. package/dist/ProductEdit-c5067942.mjs +113 -0
  31. package/dist/ProfileBlogposts-79d5c858.mjs +63 -0
  32. package/dist/ProfileBlogposts-eca9916c.js +1 -0
  33. package/dist/ProfileBlogposts-fb014bc6.mjs +63 -0
  34. package/dist/ProfileComments-48f3d4bc.mjs +43 -0
  35. package/dist/ProfileComments-58094a50.mjs +43 -0
  36. package/dist/ProfileComments-b919f021.js +1 -0
  37. package/dist/ProfileEvents-05485e20.js +1 -0
  38. package/dist/ProfileEvents-20695376.mjs +55 -0
  39. package/dist/ProfileEvents-5d206e3d.mjs +55 -0
  40. package/dist/ProfileLikes-2f3a4488.js +1 -0
  41. package/dist/ProfileLikes-503712ec.mjs +43 -0
  42. package/dist/ProfileLikes-b5ac7f48.mjs +43 -0
  43. package/dist/ProfileOrganizations-0b76e38f.js +1 -0
  44. package/dist/ProfileOrganizations-32ab1e30.mjs +211 -0
  45. package/dist/ProfileOrganizations-3f305f4e.mjs +210 -0
  46. package/dist/ProfileOrganizations-50fce34e.js +1 -0
  47. package/dist/Publics-3f277c17.js +1 -0
  48. package/dist/Publics-49dbeafc.js +1 -0
  49. package/dist/Publics-9ebffff1.mjs +122 -0
  50. package/dist/Publics-b0fad2b0.mjs +1926 -0
  51. package/dist/Tab-58cd105f.mjs +46 -0
  52. package/dist/Tab-6f0a4909.js +1 -0
  53. package/dist/UploadImage-441e8526.js +1 -0
  54. package/dist/UploadImage-d1dbc280.mjs +99 -0
  55. package/dist/UploadImage-ff8f9a0c.mjs +83 -0
  56. package/dist/auth-35ef1791.mjs +1502 -0
  57. package/dist/auth.client.cjs +2 -2
  58. package/dist/auth.client.js +61 -41
  59. package/dist/auth.validation-29113f37.mjs +20 -0
  60. package/dist/categories-d669f3af.mjs +225 -0
  61. package/dist/community.client.cjs +1 -9
  62. package/dist/community.client.js +369 -741
  63. package/dist/community.server.js +16 -4
  64. package/dist/community.server.mjs +16 -4
  65. package/dist/events.client.cjs +1 -1
  66. package/dist/events.client.js +433 -331
  67. package/dist/events.server.js +19 -2
  68. package/dist/events.server.mjs +19 -2
  69. package/dist/inputs.validation-24ae76b9.js +1 -0
  70. package/dist/modules/constructor/components/elements/Bullets.vue.d.ts +15 -0
  71. package/dist/modules/constructor/components/elements/Caption.vue.d.ts +15 -0
  72. package/dist/modules/constructor/components/elements/H2.vue.d.ts +16 -0
  73. package/dist/modules/constructor/components/elements/Image.vue.d.ts +8 -0
  74. package/dist/modules/constructor/components/elements/ImageUpload.vue.d.ts +9 -0
  75. package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +12 -0
  76. package/dist/modules/constructor/components/sections/Constructor.vue.d.ts +7 -0
  77. package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -0
  78. package/dist/modules/icons/entities/IconCommunity.vue.d.ts +2 -0
  79. package/dist/organizations-1b4c84ee.mjs +121 -0
  80. package/dist/organizations-af43bda4.js +1 -0
  81. package/dist/organizations.client-253c8068.mjs +3179 -0
  82. package/dist/organizations.client-c60d7659.js +3 -0
  83. package/dist/organizations.client.cjs +1 -3
  84. package/dist/organizations.client.js +50 -3026
  85. package/dist/organizations.server.js +1 -1
  86. package/dist/organizations.server.mjs +1 -1
  87. package/dist/style.css +1 -1
  88. package/dist/users.client.cjs +1 -1
  89. package/dist/users.client.js +245 -208
  90. package/package.json +1 -1
  91. package/src/modules/auth/router/auth.js +28 -7
  92. package/src/modules/community/community.client.js +1 -12
  93. package/src/modules/community/components/pages/BlogPost.vue +1 -1
  94. package/src/modules/community/components/pages/CreateBlogPost.vue +8 -151
  95. package/src/modules/community/middlewares/server/verifyBlogpost.js +24 -11
  96. package/src/modules/{community → constructor}/components/elements/Textarea.vue +3 -11
  97. package/src/modules/constructor/components/sections/Constructor.vue +167 -0
  98. package/src/modules/events/components/blocks/CardEvent.vue +14 -6
  99. package/src/modules/events/components/pages/EditEvent.vue +228 -133
  100. package/src/modules/events/components/sections/Feed.vue +7 -1
  101. package/src/modules/events/controllers/events.controller.js +9 -0
  102. package/src/modules/events/controllers/tickets.controller.js +2 -1
  103. package/src/modules/events/models/event.model.js +10 -0
  104. package/src/modules/events/store/events.js +15 -19
  105. package/src/modules/icons/entities/IconCommunity.vue +8 -0
  106. package/src/modules/organizations/components/blocks/CardOrganization.vue +3 -5
  107. package/src/modules/organizations/components/sections/Publics.vue +3 -3
  108. package/src/modules/organizations/controllers/organizations.controller.js +1 -1
  109. package/src/modules/organizations/organizations.client.js +0 -2
  110. package/src/modules/users/components/pages/Profile.vue +15 -4
  111. package/src/modules/users/components/pages/ProfileEvents.vue +3 -3
  112. package/src/modules/organizations/components/blocks/CardOrganizationSocial.vue +0 -46
  113. /package/src/modules/{community → constructor}/components/elements/Bullets.vue +0 -0
  114. /package/src/modules/{community → constructor}/components/elements/Caption.vue +0 -0
  115. /package/src/modules/{community → constructor}/components/elements/H2.vue +0 -0
  116. /package/src/modules/{community → constructor}/components/elements/Image.vue +0 -0
  117. /package/src/modules/{community → constructor}/components/elements/ImageUpload.vue +0 -0
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),N=require("./EmptyState-7658d7d6.js"),T=require("./CardHeader-925a972b.js"),b=require("./auth-5aa8e90c.js"),D=require("vue-router"),v=require("./globals-928eb13c.js"),V={class:"flex-v-center flex-nowrap flex"},$={key:1,class:"pd-thin radius-small t-semi bg-white"},U={__name:"Chips",props:["chips"],setup(t){return(r,s)=>(e.openBlock(),e.createElementBlock("div",V,[t.chips.length?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.chips,(l,c)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["pd-thin radius-small t-semi bg-main",{"mn-r-thin":c!==t.chips.length-1}])},e.toDisplayString(l.text?l.text:l),3))),256)):(e.openBlock(),e.createElementBlock("div",$,e.toDisplayString(t.chips),1))]))}},_={key:0,class:"o-hidden bg-grey mn-small w-100"},z=["src"],P=["src"],M={class:"w-max mn-r-thin pd-thin radius-small t-semi bg-main"},F={key:0,class:"t-semi"},O={class:"t-semi"},I={key:0,class:"t-semi uppercase"},L={key:0,class:"cursor-pointer mn-thin flex-nowrap flex w-100"},q={key:0,class:""},j={key:1,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},R={key:1,class:"mn-small p-big"},C={__name:"CardEvent",props:["event","user","short","type"],setup(t){const r=t;e.ref(new Date),D.useRouter(),e.computed(()=>r.event.content.find(a=>a.type.name==="ImageUpload")),e.computed(()=>r.event.content.find(a=>a.type.name==="Textarea"));const s=e.computed(()=>{const a=new Date,i=Date.UTC(a.getUTCFullYear(),a.getUTCMonth(),a.getUTCDate(),a.getUTCHours(),a.getUTCMinutes(),a.getUTCSeconds()),n=new Date(r.event.date.start),o=Date.UTC(n.getUTCFullYear(),n.getUTCMonth(),n.getUTCDate(),n.getUTCHours(),n.getUTCMinutes(),n.getUTCSeconds())-i;if(o<0)return"Finished";if(o===0)return"Starting Now";{const f=Math.floor(o/1e3),g=Math.floor(f/60),k=Math.floor(g/60),w=Math.floor(k/24);return w>0?`${w} days until event`:k>0?`${k} hours until event`:g>0?`${g} minutes until event`:`${f} seconds until event`}}),l=e.computed(()=>{const a=new Date(r.event.date.start),i={day:"2-digit",month:"2-digit"};return a.toLocaleDateString(void 0,i)}),c=e.computed(()=>{const a=new Date(r.event.date.start),i=new Date(r.event.date.end),n=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(a),p=new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",hourCycle:"h23"}).format(i);return`${n}-${p}`}),d=e.computed(()=>{const a=r.event.name;return a.length>26?`${a.substring(0,22)}…`:a});return(a,i)=>(e.openBlock(),e.createElementBlock("article",{class:e.normalizeClass({"flex-nowrap flex-v-center flex":t.type==="short"})},[e.createVNode(T._sfc_main,{class:e.normalizeClass({"mn-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),owner:t.event.owner,creator:t.event.creator,members:t.event.numberOfTickets,membersPhotos:t.event.participantsPhotos,type:t.type,dateFormatted:e.unref(s)},null,8,["class","owner","creator","members","membersPhotos","type","dateFormatted"]),t.event.cover&&t.type!=="short"?(e.openBlock(),e.createElementBlock("div",_,[e.createElementVNode("img",{src:t.event.cover,alt:"Event image",class:"z-index-1 d-block mn-auto h-20r"},null,8,z),e.createElementVNode("img",{src:t.event.cover,alt:"Event image",class:"z-index-0 pos-absolute w-100 h-100 pos-t-0 pos-r-0",style:{transform:"scale(1.5)",filter:"blur(2rem)","-webkit-filter":"blur(2rem)"}},null,8,P)])):e.createCommentVNode("",!0),e.createElementVNode("section",{class:e.normalizeClass(["w-100",{"pd-t-zero pd-medium":t.type!=="short"}])},[e.createElementVNode("div",{class:e.normalizeClass([{"mn-small":t.type!=="short"},"flex-v-center flex-nowrap flex"])},[e.createElementVNode("div",M,[t.type!=="short"?(e.openBlock(),e.createElementBlock("span",F,e.toDisplayString(e.unref(l))+" | ",1)):e.createCommentVNode("",!0),e.createElementVNode("span",O,e.toDisplayString(e.unref(c)),1)]),t.type==="short"?(e.openBlock(),e.createElementBlock("span",I,e.toDisplayString(e.unref(d)),1)):e.createCommentVNode("",!0)],2),t.type!=="short"?(e.openBlock(),e.createElementBlock("div",L,[t.type!=="short"?(e.openBlock(),e.createElementBlock("h3",q,e.toDisplayString(t.event.name),1)):e.createCommentVNode("",!0),t.event.status==="draft"?(e.openBlock(),e.createElementBlock("div",j,e.toDisplayString(t.event.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),t.type!=="short"?(e.openBlock(),e.createElementBlock("p",R,e.toDisplayString(t.event.description),1)):e.createCommentVNode("",!0),e.renderSlot(a.$slots,"default"),t.type!=="short"?(e.openBlock(),e.createBlock(U,{key:2,chips:t.event.tags},null,8,["chips"])):e.createCommentVNode("",!0)],2)],2))}},H={},G={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},Y=e.createStaticVNode('<rect x="0" y="0" rx="5" ry="5" width="100%" height="100%" fill="rgb(var(--grey))"></rect><rect x="15" y="15" rx="4" ry="4" width="40%" height="20" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="45" rx="5" ry="5" width="70%" height="50" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="110" rx="3" ry="3" width="90%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="15" y="130" rx="3" ry="3" width="70%" height="6" fill="rgba(var(--black),0.05)"></rect><rect x="-25%" y="0" width="25%" height="100%" fill="#fff" mask="url(#myMask)" opacity="0.3"><animate attributeName="x" from="-25%" to="100%" dur="2s" repeatCount="indefinite"></animate></rect>',6),A=[Y];function J(t,r){return e.openBlock(),e.createElementBlock("svg",G,A)}const x=b._export_sfc(H,[["render",J]]),y=b.axios.create({baseURL:process.env.API_URL,withCredentials:!0}),u=e.reactive({all:[],filter:{tags:[],period:"",date:null},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",cover:"",url:"",status:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}});async function h(t={}){t.params=t.params||{},t.params.skip=t.skip||0,t.params.limit=t.limit||9,t.params.tags=t.tags||[],t.status&&(t.params={status:t.status}),t.url&&(t.params={url:t.url}),t.period&&(t.params.period=t.period),t.category&&(t.params.category=t.category),t.organization&&(t.params.organization=t.organization),t.date&&(t.params.date=t.date),t.participant&&(t.params.participant=t.participant),t.owner&&(t.params.owner=t.owner),t.creator&&(t.params.creator=t.creator),t.user&&(t.params.user=t.user),t.sortOrder&&(t.params.sortOrder=t.sortOrder),t.sortParam&&(t.params.sortParam=t.sortParam),t.params.skip=t.skip||0,t.params.limit=t.limit||10;try{console.log("Request params:"+t.params);const r=await y.get("/api/events/read",{params:t.params});return console.log(t.params),t.url?m(r.data,"current"):m(r.data,"all"),Promise.resolve(r.data)}catch(r){return v.setError(r),Promise.reject(r)}}async function B(t){return y.post("/api/events/create",t).then(r=>(m(r.data,"current"),Promise.resolve(r.data)),r=>(v.setError(r),Promise.reject(r)))}async function E(t){return y.post("/api/events/update",t).then(r=>(m(r.data,"current"),Promise.resolve(r.data)),r=>(v.setError(r),Promise.reject(r)))}async function K(t){return await y.delete(`/api/events/delete/${t}`).then(r=>{const s=u.all.findIndex(l=>l._id===t);return s!==-1&&u.all.splice(s,1),Promise.resolve(r.data)},r=>(v.setError(r),Promise.reject(r)))}function m(t,r){u[r]=t}function S(){u.current={_id:"",cover:"",url:"",status:"",name:"",tags:[],date:{start:null,false:null},views:0,content:[]}}e.watch(u,(t,r)=>{});const Q=Object.freeze(Object.defineProperty({__proto__:null,clean:S,create:B,read:h,remove:K,set:m,state:u,update:E},Symbol.toStringTag,{value:"Module"})),W={class:"feed"},X={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},creator:{type:String,default:null},user:{type:[String,Number],default:null},sortOrder:{type:String,default:"desc"},participant:{type:String,default:null},period:{type:String,default:null},status:{type:String,default:null}},setup(t){const r=t,s=e.ref([]),l=e.ref(!1),c=e.ref(!0),d=e.ref(0),a=e.ref(20),i=async()=>{if(l.value){d.value+=a.value;const n=await h({skip:d.value,limit:a.value,category:r.category,sortOrder:r.sortOrder,participant:r.participant,creator:r.creator,user:r.user,date:r.selectedDate,owner:r.owner,organization:r.organization,period:r.period,status:r.status});n.length===0?l.value=!1:l.value=!0,s.value=[...s.value,...n]}};return e.onMounted(async()=>{c.value=!0,console.log(r.selectedDate);const n=await h({skip:d.value,limit:a.value,category:r.category,participant:r.participant,sortOrder:r.sortOrder,user:r.user,owner:r.owner,creator:r.creator,date:r.selectedDate,organization:r.organization,period:r.period,status:r.status});n.length===0?l.value=!1:l.value=!0,s.value=n,c.value=!1}),(n,p)=>(e.openBlock(),e.createElementBlock("section",W,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[c.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,o=>(e.openBlock(),e.createBlock(x,{key:o}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!c.value&&s.value.length<1?(e.openBlock(),e.createBlock(N._sfc_main,{key:0,title:"No Events Found",description:"Currently, there are no events available. Please check back later.",class:"pd-medium mn-thin bg-grey radius-big"})):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"container"},{default:e.withCtx(()=>[!c.value&&s.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(s.value,(o,f)=>(e.openBlock(),e.createBlock(C,{onClick:g=>n.$router.push({name:"Event",params:{url:o.url}}),key:o._id,event:o,owner:t.user,type:"normal",class:e.normalizeClass(["bg-grey radius-big mn-medium",{"br-b br-solid br-black-transp-10":f!==s.value.length-1}])},null,8,["onClick","event","owner","class"]))),128)):e.createCommentVNode("",!0),l.value&&s.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:i,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}};exports.SkeletonEvent=x;exports._sfc_main=X;exports._sfc_main$1=C;exports.clean=S;exports.create=B;exports.events=Q;exports.read=h;exports.state=u;exports.update=E;
@@ -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
+ };