@ozdao/prometheus-framework 0.0.86 → 0.0.88

Sign up to get free protection for your applications and to get access to all the features.
Files changed (101) 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-cdbafd07.mjs +1944 -0
  3. package/dist/CardOrganization-ee5c34ab.js +1 -0
  4. package/dist/CardOrganization-f70bd169.mjs +202 -0
  5. package/dist/Comments-63f154a6.js +9 -0
  6. package/dist/Comments-c5afa4d6.mjs +459 -0
  7. package/dist/Feed-51e4e232.js +1 -0
  8. package/dist/Feed-8fd41524.js +1 -0
  9. package/dist/Feed-dc8b66bf.mjs +367 -0
  10. package/dist/Feed-ecf37814.mjs +367 -0
  11. package/dist/IconEdit-736c89be.js +1 -0
  12. package/dist/IconEdit-e9fd4c6c.mjs +21 -0
  13. package/dist/Image-6c7584f5.mjs +477 -0
  14. package/dist/Image-9a870c88.js +9 -0
  15. package/dist/Popup-105ef2c3.js +1 -0
  16. package/dist/Popup-82fb2c8a.mjs +76 -0
  17. package/dist/Product-1724d88d.mjs +837 -0
  18. package/dist/Product-2f3d592f.mjs +837 -0
  19. package/dist/Product-2fbf9d99.js +7 -0
  20. package/dist/Product-a94d8b65.js +7 -0
  21. package/dist/ProductEdit-20709821.mjs +349 -0
  22. package/dist/ProductEdit-57484f1e.mjs +349 -0
  23. package/dist/ProductEdit-a81d13b9.js +1 -0
  24. package/dist/ProductEdit-ef301baa.js +1 -0
  25. package/dist/ProfileBlogposts-eca9916c.js +1 -0
  26. package/dist/ProfileBlogposts-fb014bc6.mjs +63 -0
  27. package/dist/ProfileComments-58094a50.mjs +43 -0
  28. package/dist/ProfileComments-b919f021.js +1 -0
  29. package/dist/ProfileEvents-05485e20.js +1 -0
  30. package/dist/ProfileEvents-1cfe6858.mjs +55 -0
  31. package/dist/ProfileEvents-5d206e3d.mjs +55 -0
  32. package/dist/ProfileEvents-d8e16509.js +1 -0
  33. package/dist/ProfileLikes-2f3a4488.js +1 -0
  34. package/dist/ProfileLikes-b5ac7f48.mjs +43 -0
  35. package/dist/ProfileOrganizations-0b76e38f.js +1 -0
  36. package/dist/ProfileOrganizations-32ab1e30.mjs +211 -0
  37. package/dist/Publics-3f277c17.js +1 -0
  38. package/dist/Publics-9ebffff1.mjs +122 -0
  39. package/dist/Tab-58cd105f.mjs +46 -0
  40. package/dist/Tab-6f0a4909.js +1 -0
  41. package/dist/UploadImage-441e8526.js +1 -0
  42. package/dist/UploadImage-ff8f9a0c.mjs +83 -0
  43. package/dist/auth.client.cjs +2 -2
  44. package/dist/auth.client.js +60 -40
  45. package/dist/community.client.cjs +1 -9
  46. package/dist/community.client.js +361 -750
  47. package/dist/community.server.js +16 -4
  48. package/dist/community.server.mjs +16 -4
  49. package/dist/events.client.cjs +1 -1
  50. package/dist/events.client.js +442 -321
  51. package/dist/events.server.js +96 -2
  52. package/dist/events.server.mjs +96 -2
  53. package/dist/inputs.validation-24ae76b9.js +1 -0
  54. package/dist/modules/constructor/components/elements/Bullets.vue.d.ts +15 -0
  55. package/dist/modules/constructor/components/elements/Caption.vue.d.ts +15 -0
  56. package/dist/modules/constructor/components/elements/H2.vue.d.ts +16 -0
  57. package/dist/modules/constructor/components/elements/Image.vue.d.ts +8 -0
  58. package/dist/modules/constructor/components/elements/ImageUpload.vue.d.ts +9 -0
  59. package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +12 -0
  60. package/dist/modules/constructor/components/sections/Constructor.vue.d.ts +7 -0
  61. package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -0
  62. package/dist/organizations-1b4c84ee.mjs +121 -0
  63. package/dist/organizations-af43bda4.js +1 -0
  64. package/dist/organizations.client-253c8068.mjs +3179 -0
  65. package/dist/organizations.client-686845be.mjs +3179 -0
  66. package/dist/organizations.client-99bfc474.js +3 -0
  67. package/dist/organizations.client-c60d7659.js +3 -0
  68. package/dist/organizations.client.cjs +1 -3
  69. package/dist/organizations.client.js +49 -3025
  70. package/dist/style.css +1 -1
  71. package/dist/users.client.cjs +1 -1
  72. package/dist/users.client.js +10 -10
  73. package/package.json +1 -1
  74. package/src/modules/auth/router/auth.js +28 -7
  75. package/src/modules/community/community.client.js +1 -12
  76. package/src/modules/community/components/pages/BlogPost.vue +1 -1
  77. package/src/modules/community/components/pages/CreateBlogPost.vue +8 -151
  78. package/src/modules/community/middlewares/server/verifyBlogpost.js +24 -11
  79. package/src/modules/{community → constructor}/components/elements/Textarea.vue +3 -11
  80. package/src/modules/constructor/components/sections/Constructor.vue +167 -0
  81. package/src/modules/events/components/blocks/CardEvent.vue +15 -7
  82. package/src/modules/events/components/pages/EditEvent.vue +233 -133
  83. package/src/modules/events/components/pages/Event.vue +43 -4
  84. package/src/modules/events/components/sections/Feed.vue +7 -1
  85. package/src/modules/events/controllers/events.controller.js +9 -0
  86. package/src/modules/events/controllers/tickets.controller.js +2 -1
  87. package/src/modules/events/middlewares/server/index.js +10 -0
  88. package/src/modules/events/middlewares/server/verifyEvent.js +60 -0
  89. package/src/modules/events/models/event.model.js +10 -0
  90. package/src/modules/events/routes/events.routes.js +14 -1
  91. package/src/modules/events/store/events.js +15 -19
  92. package/src/modules/organizations/components/blocks/CardOrganization.vue +1 -3
  93. package/src/modules/organizations/components/sections/Publics.vue +2 -3
  94. package/src/modules/organizations/organizations.client.js +0 -2
  95. package/src/modules/users/components/pages/ProfileEvents.vue +3 -3
  96. package/src/modules/organizations/components/blocks/CardOrganizationSocial.vue +0 -46
  97. /package/src/modules/{community → constructor}/components/elements/Bullets.vue +0 -0
  98. /package/src/modules/{community → constructor}/components/elements/Caption.vue +0 -0
  99. /package/src/modules/{community → constructor}/components/elements/H2.vue +0 -0
  100. /package/src/modules/{community → constructor}/components/elements/Image.vue +0 -0
  101. /package/src/modules/{community → constructor}/components/elements/ImageUpload.vue +0 -0
@@ -0,0 +1,43 @@
1
+ import { ref as l, watch as p, openBlock as s, createElementBlock as c, createVNode as d, createBlock as _, unref as a, createCommentVNode as f, createElementVNode as m } from "vue";
2
+ import { useRoute as b, useRouter as h } from "vue-router";
3
+ import { _ as v } from "./Tab-58cd105f.mjs";
4
+ import { _ as y } from "./Feed-a31c43c2.mjs";
5
+ import "./inputs.validation-6960f71b.mjs";
6
+ import "./globals-96ba60e4.mjs";
7
+ import "vue-i18n";
8
+ import "./EmptyState-34d85f10.mjs";
9
+ import "./auth-35ef1791.mjs";
10
+ import "./CardHeader-ce5a1a75.mjs";
11
+ import "./PlaceholderUserpic-995da0fc.mjs";
12
+ const k = { class: "pd-thin" }, g = /* @__PURE__ */ m("header", { class: "mn-medium flex-v-center flex-nowrap flex" }, [
13
+ /* @__PURE__ */ m("h2", { class: "mn-r-medium" }, "Likes")
14
+ ], -1), F = {
15
+ __name: "ProfileLikes",
16
+ setup(q) {
17
+ const e = b(), n = h();
18
+ let u = e.query.tab ? e.query.tab : "posts";
19
+ const t = l(u);
20
+ return e.query.tab = t.value, p(t, (r) => {
21
+ n.push({ query: { ...e.query, tab: r } });
22
+ }), (r, o) => (s(), c("div", k, [
23
+ g,
24
+ d(v, {
25
+ selected: t.value,
26
+ "onUpdate:selected": o[0] || (o[0] = (i) => t.value = i),
27
+ tabs: [
28
+ { name: "My posts", value: "posts" },
29
+ { name: "Following", value: "hubs" }
30
+ ],
31
+ class: "mn-r-medium o-hidden h5 radius-big bg-grey"
32
+ }, null, 8, ["selected"]),
33
+ t.value === "posts" ? (s(), _(y, {
34
+ key: 0,
35
+ user: a(e).params._id,
36
+ owner: a(e).params._id
37
+ }, null, 8, ["user", "owner"])) : f("", !0)
38
+ ]));
39
+ }
40
+ };
41
+ export {
42
+ F as default
43
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),m=require("vue-router"),p=require("./Tab-6f0a4909.js"),y=require("./EmptyState-7658d7d6.js"),h=require("./CardOrganization-ee5c34ab.js"),d=require("./auth-5aa8e90c.js"),g=require("./organizations-af43bda4.js");require("./inputs.validation-24ae76b9.js");require("./globals-928eb13c.js");require("vue-i18n");require("./ButtonFollow-2ce169ca.js");const k={},v={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},_=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),w=[_];function B(u,t){return e.openBlock(),e.createElementBlock("svg",v,w)}const x=d._export_sfc(k,[["render",B]]),C={class:"feed"},b={__name:"Feed",props:{category:{type:String,default:null},selectedDate:{type:String,default:null},organization:{type:String,default:null},owner:{type:String,default:null},user:{type:[String,Number],default:null},member:{type:[String,Number],default:null},subscriber:{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(u){const t=u,a=e.ref([]),o=e.ref(!1),r=e.ref(!0),l=e.ref(0),n=e.ref(20),c=async()=>{if(o.value){l.value+=n.value;const i=await g.actions.read({skip:l.value,limit:n.value,category:t.category,sortOrder:t.sortOrder,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,user:t.user,date:t.selectedDate,owner:t.owner,organization:t.organization,period:t.period,status:t.status});i.length===0?o.value=!1:o.value=!0,a.value=[...a.value,...i]}};return e.onMounted(async()=>{r.value=!0,console.log(t.selectedDate);const i=await g.actions.read({skip:l.value,limit:n.value,category:t.category,member:t.member,subscriber:t.subscriber,onlyuser:t.onlyuser,sortOrder:t.sortOrder,user:t.user,owner:t.owner,date:t.selectedDate,organization:t.organization,period:t.period,status:t.status});i.length===0?o.value=!1:o.value=!0,a.value=i,r.value=!1}),(i,V)=>(e.openBlock(),e.createElementBlock("section",C,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[r.value?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value,s=>(e.openBlock(),e.createBlock(x,{key:s}))),128)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!r.value&&a.value.length<1?(e.openBlock(),e.createBlock(y._sfc_main,{key:0,title:"No Organizations Found",description:"Currently, there are no organizations 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(()=>[!r.value&&a.value.length>0?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(a.value,(s,f)=>(e.openBlock(),e.createBlock(h._sfc_main,{onClick:O=>i.$router.push({name:"Organization",params:{_id:s._id}}),key:s._id,organization:s,user:u.user,type:"normal",class:e.normalizeClass(["w-100 radius-big mn-medium",{"br-b br-solid br-black-transp-10":f!==a.value.length-1}])},null,8,["onClick","organization","user","class"]))),128)):e.createCommentVNode("",!0),o.value&&a.value.length>0?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:c,class:"w-100 bg-main button"},"Load more")):e.createCommentVNode("",!0)]),_:1})]))}},N={class:"pd-thin"},z={class:"mn-medium flex-v-center flex-nowrap flex"},q=e.createElementVNode("h2",{class:"mn-r-medium"},"Groups",-1),S={__name:"ProfileOrganizations",setup(u){const t=m.useRoute(),a=m.useRouter();let o=t.query.tab?t.query.tab:"member";const r=e.ref(o);return t.query.tab=r.value,e.watch(r,l=>{a.push({query:{...t.query,tab:l}})}),(l,n)=>(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("header",z,[q,d.state.user._id===e.unref(t).params._id?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:n[0]||(n[0]=c=>l.$router.push({name:"Create Organization"})),class:"radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"}," + ")):e.createCommentVNode("",!0)]),e.createVNode(p._sfc_main,{selected:r.value,"onUpdate:selected":n[1]||(n[1]=c=>r.value=c),tabs:[{name:"Member",value:"member"},{name:"Follower",value:"follower"}],class:"mn-medium mn-r-medium o-hidden h5 radius-big bg-grey"},null,8,["selected"]),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="member"?(e.openBlock(),e.createBlock(b,{key:0,user:d.state.user._id,owner:e.unref(t).params._id},null,8,["user","owner"])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[r.value==="follower"?(e.openBlock(),e.createBlock(b,{key:0,user:d.state.user._id,subscriber:e.unref(t).params._id},null,8,["user","subscriber"])):e.createCommentVNode("",!0)]),_:1})]))}};exports.default=S;
@@ -0,0 +1,211 @@
1
+ import { openBlock as r, createElementBlock as o, createStaticVNode as $, ref as c, onMounted as C, createVNode as d, TransitionGroup as v, withCtx as g, Fragment as k, renderList as w, createBlock as f, createCommentVNode as u, Transition as h, normalizeClass as N, watch as q, createElementVNode as O, unref as y } from "vue";
2
+ import { useRoute as M, useRouter as D } from "vue-router";
3
+ import { _ as F } from "./Tab-58cd105f.mjs";
4
+ import { _ as L } from "./EmptyState-34d85f10.mjs";
5
+ import { _ as V } from "./CardOrganization-f70bd169.mjs";
6
+ import { _ as B, s as _ } from "./auth-35ef1791.mjs";
7
+ import { a as x } from "./organizations-1b4c84ee.mjs";
8
+ import "./inputs.validation-6960f71b.mjs";
9
+ import "./globals-96ba60e4.mjs";
10
+ import "vue-i18n";
11
+ import "./ButtonFollow-728aab73.mjs";
12
+ const E = {}, G = {
13
+ width: "100%",
14
+ height: "20rem",
15
+ xmlns: "http://www.w3.org/2000/svg"
16
+ }, P = /* @__PURE__ */ $('<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), R = [
17
+ P
18
+ ];
19
+ function T(b, e) {
20
+ return r(), o("svg", G, R);
21
+ }
22
+ const U = /* @__PURE__ */ B(E, [["render", T]]), j = { class: "feed" }, z = {
23
+ __name: "Feed",
24
+ props: {
25
+ category: {
26
+ type: String,
27
+ default: null
28
+ },
29
+ selectedDate: {
30
+ type: String,
31
+ default: null
32
+ },
33
+ organization: {
34
+ type: String,
35
+ default: null
36
+ },
37
+ owner: {
38
+ type: String,
39
+ default: null
40
+ },
41
+ user: {
42
+ type: [String, Number],
43
+ default: null
44
+ },
45
+ member: {
46
+ type: [String, Number],
47
+ default: null
48
+ },
49
+ subscriber: {
50
+ type: [String, Number],
51
+ default: null
52
+ },
53
+ sortOrder: {
54
+ type: String,
55
+ default: "desc"
56
+ },
57
+ participant: {
58
+ type: String,
59
+ default: null
60
+ },
61
+ period: {
62
+ type: String,
63
+ default: null
64
+ },
65
+ status: {
66
+ type: String,
67
+ default: null
68
+ }
69
+ },
70
+ setup(b) {
71
+ const e = b, a = c([]), n = c(!1), t = c(!0), i = c(0), s = c(20), p = async () => {
72
+ if (n.value) {
73
+ i.value += s.value;
74
+ const l = await x.read({
75
+ skip: i.value,
76
+ limit: s.value,
77
+ category: e.category,
78
+ sortOrder: e.sortOrder,
79
+ member: e.member,
80
+ subscriber: e.subscriber,
81
+ onlyuser: e.onlyuser,
82
+ user: e.user,
83
+ date: e.selectedDate,
84
+ owner: e.owner,
85
+ organization: e.organization,
86
+ period: e.period,
87
+ status: e.status
88
+ });
89
+ l.length === 0 ? n.value = !1 : n.value = !0, a.value = [...a.value, ...l];
90
+ }
91
+ };
92
+ return C(async () => {
93
+ t.value = !0, console.log(e.selectedDate);
94
+ const l = await x.read({
95
+ skip: i.value,
96
+ limit: s.value,
97
+ category: e.category,
98
+ member: e.member,
99
+ subscriber: e.subscriber,
100
+ onlyuser: e.onlyuser,
101
+ sortOrder: e.sortOrder,
102
+ user: e.user,
103
+ owner: e.owner,
104
+ date: e.selectedDate,
105
+ organization: e.organization,
106
+ period: e.period,
107
+ status: e.status
108
+ });
109
+ l.length === 0 ? n.value = !1 : n.value = !0, a.value = l, t.value = !1;
110
+ }), (l, J) => (r(), o("section", j, [
111
+ d(v, {
112
+ tag: "ul",
113
+ name: "fade",
114
+ class: "o-hidden bg-grey radius-big"
115
+ }, {
116
+ default: g(() => [
117
+ t.value ? (r(!0), o(k, { key: 0 }, w(s.value, (m) => (r(), f(U, { key: m }))), 128)) : u("", !0)
118
+ ]),
119
+ _: 1
120
+ }),
121
+ d(h, { name: "fade" }, {
122
+ default: g(() => [
123
+ !t.value && a.value.length < 1 ? (r(), f(L, {
124
+ key: 0,
125
+ title: "No Organizations Found",
126
+ description: "Currently, there are no organizations available. Please check back later.",
127
+ class: "pd-medium mn-thin bg-grey radius-big"
128
+ })) : u("", !0)
129
+ ]),
130
+ _: 1
131
+ }),
132
+ d(v, {
133
+ tag: "ul",
134
+ name: "fade",
135
+ class: "container"
136
+ }, {
137
+ default: g(() => [
138
+ !t.value && a.value.length > 0 ? (r(!0), o(k, { key: 0 }, w(a.value, (m, S) => (r(), f(V, {
139
+ onClick: (K) => l.$router.push({ name: "Organization", params: { _id: m._id } }),
140
+ key: m._id,
141
+ organization: m,
142
+ user: b.user,
143
+ type: "normal",
144
+ class: N(["w-100 radius-big mn-medium", {
145
+ "br-b br-solid br-black-transp-10": S !== a.value.length - 1
146
+ }])
147
+ }, null, 8, ["onClick", "organization", "user", "class"]))), 128)) : u("", !0),
148
+ n.value && a.value.length > 0 ? (r(), o("button", {
149
+ key: 1,
150
+ onClick: p,
151
+ class: "w-100 bg-main button"
152
+ }, "Load more")) : u("", !0)
153
+ ]),
154
+ _: 1
155
+ })
156
+ ]));
157
+ }
158
+ }, A = { class: "pd-thin" }, H = { class: "mn-medium flex-v-center flex-nowrap flex" }, I = /* @__PURE__ */ O("h2", { class: "mn-r-medium" }, "Groups", -1), ie = {
159
+ __name: "ProfileOrganizations",
160
+ setup(b) {
161
+ const e = M(), a = D();
162
+ let n = e.query.tab ? e.query.tab : "member";
163
+ const t = c(n);
164
+ return e.query.tab = t.value, q(t, (i) => {
165
+ a.push({ query: { ...e.query, tab: i } });
166
+ }), (i, s) => (r(), o("div", A, [
167
+ O("header", H, [
168
+ I,
169
+ _.user._id === y(e).params._id ? (r(), o("button", {
170
+ key: 0,
171
+ onClick: s[0] || (s[0] = (p) => i.$router.push({
172
+ name: "Create Organization"
173
+ })),
174
+ class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
175
+ }, " + ")) : u("", !0)
176
+ ]),
177
+ d(F, {
178
+ selected: t.value,
179
+ "onUpdate:selected": s[1] || (s[1] = (p) => t.value = p),
180
+ tabs: [
181
+ { name: "Member", value: "member" },
182
+ { name: "Follower", value: "follower" }
183
+ ],
184
+ class: "mn-medium mn-r-medium o-hidden h5 radius-big bg-grey"
185
+ }, null, 8, ["selected"]),
186
+ d(h, { name: "slide-fade" }, {
187
+ default: g(() => [
188
+ t.value === "member" ? (r(), f(z, {
189
+ key: 0,
190
+ user: _.user._id,
191
+ owner: y(e).params._id
192
+ }, null, 8, ["user", "owner"])) : u("", !0)
193
+ ]),
194
+ _: 1
195
+ }),
196
+ d(h, { name: "slide-fade" }, {
197
+ default: g(() => [
198
+ t.value === "follower" ? (r(), f(z, {
199
+ key: 0,
200
+ user: _.user._id,
201
+ subscriber: y(e).params._id
202
+ }, null, 8, ["user", "subscriber"])) : u("", !0)
203
+ ]),
204
+ _: 1
205
+ })
206
+ ]));
207
+ }
208
+ };
209
+ export {
210
+ ie as default
211
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue");require("./Breadcrumbs.vue_vue_type_style_index_0_lang-15e71ec4.js");const u=require("./auth-5aa8e90c.js"),p=require("./CardOrganization-ee5c34ab.js"),f=require("./EmptyState-7658d7d6.js"),k=require("./organizations-af43bda4.js"),_=require("./ButtonFollow-2ce169ca.js"),h={key:0,class:"t-transp mn-r-small"},y=["onClick"],B=["onClick"],v={key:0,class:"mn-t-thin invalid-feedback"},g={__name:"Select",props:{label:String,select:[String,Object],placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(a,{emit:t}){const n=a,l=e.ref(n.select),s=e.ref(!1);e.watch(()=>n.select,o=>{l.value=o});const c=e.computed(()=>n.select?n.options.filter(o=>o!==n.select):n.options),i=()=>{s.value=!s.value,t(s.value?"focus":"blur")},m=o=>{l.value=o,i(),t("update:select",l.value)};return(o,C)=>{var d;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{class:e.normalizeClass([o.$attrs.class,"flex-nowrap flex"])},[a.label?(e.openBlock(),e.createElementBlock("div",h,[e.createElementVNode("span",null,e.toDisplayString(a.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",{onClick:e.withModifiers(i,["stop"]),class:"w-100"},[e.createElementVNode("span",null,e.toDisplayString(((d=l.value)==null?void 0:d.name)||l.value||a.placeholder),1)],8,y),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([o.$attrs.class,"pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),r=>(e.openBlock(),e.createElementBlock("li",null,[r?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:N=>m(r),class:"w-100"},e.toDisplayString(r.name||r),9,B)):e.createCommentVNode("",!0)]))),256))],2)):e.createCommentVNode("",!0)]),_:1})],2),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[a.validation?(e.openBlock(),e.createElementBlock("div",v," * "+e.toDisplayString(a.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},b=u._export_sfc(g,[["__scopeId","data-v-a78dbba1"]]);const w={class:"w-100 o-scroll"},E={key:1,class:"w-max gap-thin flex-nowrap flex"},x={__name:"Publics",setup(a){let t=e.ref(null);e.onMounted(async()=>{t.value=await k.actions.read({user:u.state.user._id,sort:"numberOfMemberships",limit:10,types:["public"]})});const n=({membership:l,isMember:s,targetId:c})=>{_.mutations.handleMembershipUpdate(t.value,l,s,c)};return(l,s)=>(e.openBlock(),e.createElementBlock("div",w,[!e.unref(t)||e.unref(t).length<1?(e.openBlock(),e.createBlock(f._sfc_main,{key:0,title:"Unfortunately, we couldn't find any recommendations for you",description:"Explore and find a community or organization that suits your interests.",class:"radius-big bg-grey pd-medium"})):(e.openBlock(),e.createElementBlock("div",E,[e.unref(t)?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(e.unref(t),(c,i)=>(e.openBlock(),e.createBlock(p._sfc_main,{key:c._id,organization:c,user:u.state.user,onUpdateMembership:n,class:"flex-child-1 flex-child w-100"},null,8,["organization","user"]))),128)):e.createCommentVNode("",!0)]))]))}};exports.Select=b;exports._sfc_main=x;
@@ -0,0 +1,122 @@
1
+ import { ref as f, watch as C, computed as S, openBlock as e, createElementBlock as t, Fragment as h, createElementVNode as m, normalizeClass as b, toDisplayString as p, createCommentVNode as c, withModifiers as z, createVNode as y, Transition as g, withCtx as k, renderList as M, unref as u, onMounted as B, createBlock as w } from "vue";
2
+ import "./Breadcrumbs.vue_vue_type_style_index_0_lang-cdbafd07.mjs";
3
+ import { _ as O, s as x } from "./auth-35ef1791.mjs";
4
+ import { _ as U } from "./CardOrganization-f70bd169.mjs";
5
+ import { _ as E } from "./EmptyState-34d85f10.mjs";
6
+ import { a as N } from "./organizations-1b4c84ee.mjs";
7
+ import { m as P } from "./ButtonFollow-728aab73.mjs";
8
+ const V = {
9
+ key: 0,
10
+ class: "t-transp mn-r-small"
11
+ }, L = ["onClick"], j = ["onClick"], A = {
12
+ key: 0,
13
+ class: "mn-t-thin invalid-feedback"
14
+ }, D = {
15
+ __name: "Select",
16
+ props: {
17
+ label: String,
18
+ select: [String, Object],
19
+ placeholder: { type: String, default: "Please select an item" },
20
+ options: { type: Array, default: () => [] },
21
+ validation: Boolean
22
+ },
23
+ emits: ["update:select", "focus", "blur"],
24
+ setup(o, { emit: s }) {
25
+ const a = o, l = f(a.select), i = f(!1);
26
+ C(() => a.select, (n) => {
27
+ l.value = n;
28
+ });
29
+ const r = S(() => a.select ? a.options.filter((n) => n !== a.select) : a.options), _ = () => {
30
+ i.value = !i.value, s(i.value ? "focus" : "blur");
31
+ }, $ = (n) => {
32
+ l.value = n, _(), s("update:select", l.value);
33
+ };
34
+ return (n, T) => {
35
+ var v;
36
+ return e(), t(h, null, [
37
+ m("div", {
38
+ class: b([n.$attrs.class, "flex-nowrap flex"])
39
+ }, [
40
+ o.label ? (e(), t("div", V, [
41
+ m("span", null, p(o.label), 1)
42
+ ])) : c("", !0),
43
+ m("li", {
44
+ onClick: z(_, ["stop"]),
45
+ class: "w-100"
46
+ }, [
47
+ m("span", null, p(((v = l.value) == null ? void 0 : v.name) || l.value || o.placeholder), 1)
48
+ ], 8, L),
49
+ y(g, {
50
+ mode: "out-in",
51
+ name: "fade"
52
+ }, {
53
+ default: k(() => [
54
+ i.value ? (e(), t("ul", {
55
+ key: 0,
56
+ class: b([n.$attrs.class, "pos-absolute pos-l-0 z-index-5 w-100 mn-t-big"])
57
+ }, [
58
+ (e(!0), t(h, null, M(u(r), (d) => (e(), t("li", null, [
59
+ d ? (e(), t("span", {
60
+ key: 0,
61
+ onClick: (q) => $(d),
62
+ class: "w-100"
63
+ }, p(d.name || d), 9, j)) : c("", !0)
64
+ ]))), 256))
65
+ ], 2)) : c("", !0)
66
+ ]),
67
+ _: 1
68
+ })
69
+ ], 2),
70
+ y(g, {
71
+ mode: "out-in",
72
+ name: "fade"
73
+ }, {
74
+ default: k(() => [
75
+ o.validation ? (e(), t("div", A, " * " + p(o.validation.message), 1)) : c("", !0)
76
+ ]),
77
+ _: 1
78
+ })
79
+ ], 64);
80
+ };
81
+ }
82
+ }, X = /* @__PURE__ */ O(D, [["__scopeId", "data-v-a78dbba1"]]);
83
+ const F = { class: "w-100 o-scroll" }, I = {
84
+ key: 1,
85
+ class: "w-max gap-thin flex-nowrap flex"
86
+ }, Y = {
87
+ __name: "Publics",
88
+ setup(o) {
89
+ let s = f(null);
90
+ B(async () => {
91
+ s.value = await N.read({
92
+ user: x.user._id,
93
+ sort: "numberOfMemberships",
94
+ limit: 10,
95
+ types: ["public"]
96
+ });
97
+ });
98
+ const a = ({ membership: l, isMember: i, targetId: r }) => {
99
+ P.handleMembershipUpdate(s.value, l, i, r);
100
+ };
101
+ return (l, i) => (e(), t("div", F, [
102
+ !u(s) || u(s).length < 1 ? (e(), w(E, {
103
+ key: 0,
104
+ title: "Unfortunately, we couldn't find any recommendations for you",
105
+ description: "Explore and find a community or organization that suits your interests.",
106
+ class: "radius-big bg-grey pd-medium"
107
+ })) : (e(), t("div", I, [
108
+ u(s) ? (e(!0), t(h, { key: 0 }, M(u(s), (r, _) => (e(), w(U, {
109
+ key: r._id,
110
+ organization: r,
111
+ user: x.user,
112
+ onUpdateMembership: a,
113
+ class: "flex-child-1 flex-child w-100"
114
+ }, null, 8, ["organization", "user"]))), 128)) : c("", !0)
115
+ ]))
116
+ ]));
117
+ }
118
+ };
119
+ export {
120
+ X as S,
121
+ Y as _
122
+ };
@@ -0,0 +1,46 @@
1
+ import { ref as p, computed as v, openBlock as c, createElementBlock as s, createElementVNode as r, Fragment as h, renderList as _, normalizeClass as g, toDisplayString as k, normalizeStyle as x, unref as y } from "vue";
2
+ import "./inputs.validation-6960f71b.mjs";
3
+ const S = { class: "" }, T = { class: "flex-nowrap flex-v-center flex" }, w = ["onClick"], W = {
4
+ __name: "Tab",
5
+ props: {
6
+ tabs: Array,
7
+ selected: String,
8
+ callback: Function
9
+ },
10
+ emits: ["update:selected"],
11
+ setup(o, { emit: d }) {
12
+ const t = o, a = p(0);
13
+ if (t.selected) {
14
+ const e = t.tabs.findIndex((l) => l.value === t.selected);
15
+ e !== -1 && (a.value = e);
16
+ }
17
+ function u(e, l) {
18
+ a.value = e, d("update:selected", l.value), t.callback && t.callback();
19
+ }
20
+ function f(e) {
21
+ return `${100 / t.tabs.length * e}%`;
22
+ }
23
+ function b() {
24
+ return `${100 / t.tabs.length}%`;
25
+ }
26
+ const m = v(() => ({ left: f(a.value), width: b() }));
27
+ return (e, l) => (c(), s("div", S, [
28
+ r("div", T, [
29
+ (c(!0), s(h, null, _(o.tabs, (i, n) => (c(), s("div", {
30
+ key: n,
31
+ onClick: (z) => u(n, i),
32
+ class: g([{ "t-transp": n !== a.value }, "z-index-1 t-center pd-small w-100"])
33
+ }, [
34
+ r("label", null, k(i.name), 1)
35
+ ], 10, w))), 128)),
36
+ r("div", {
37
+ style: x(y(m)),
38
+ class: "radius-extra bg-main t-white tab-selector"
39
+ }, null, 4)
40
+ ])
41
+ ]));
42
+ }
43
+ };
44
+ export {
45
+ W as _
46
+ };
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue");require("./inputs.validation-24ae76b9.js");const b={class:""},m={class:"flex-nowrap flex-v-center flex"},p=["onClick"],v={__name:"Tab",props:{tabs:Array,selected:String,callback:Function},emits:["update:selected"],setup(s,{emit:o}){const l=s,n=e.ref(0);if(l.selected){const t=l.tabs.findIndex(c=>c.value===l.selected);t!==-1&&(n.value=t)}function i(t,c){n.value=t,o("update:selected",c.value),l.callback&&l.callback()}function u(t){return`${100/l.tabs.length*t}%`}function d(){return`${100/l.tabs.length}%`}const f=e.computed(()=>({left:u(n.value),width:d()}));return(t,c)=>(e.openBlock(),e.createElementBlock("div",b,[e.createElementVNode("div",m,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.tabs,(r,a)=>(e.openBlock(),e.createElementBlock("div",{key:a,onClick:k=>i(a,r),class:e.normalizeClass([{"t-transp":a!==n.value},"z-index-1 t-center pd-small w-100"])},[e.createElementVNode("label",null,e.toDisplayString(r.name),1)],10,p))),128)),e.createElementVNode("div",{style:e.normalizeStyle(e.unref(f)),class:"radius-extra bg-main t-white tab-selector"},null,4)])]))}};exports._sfc_main=v;
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),h=require("./auth-5aa8e90c.js"),C=["src"],m={key:1,class:"flex-v-center flex-h-center flex w-100 h-100 bg-second"},v=e.createElementVNode("svg",{class:"i-medium",width:"104",height:"104",viewBox:"0 0 104 104",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{fill:"white",d:"M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z"})],-1),g=[v],w={__name:"UploadImage",props:["uploadPath","photo"],emits:["update:photo"],setup(n,{emit:p}){const a=n,o=e.ref(null),i=e.ref(null);e.watch(a,({photo:t})=>{t&&(o.value=t)});function f(){i.value.click()}async function r(t){let l=t.target.files[0],s=new FormData;s.append("file",l);try{let d=await h.axios.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(a.uploadPath)}`,s,{headers:{"Content-Type":"multipart/form-data"}});o.value=d.data.filepath,p("update:photo",o.value)}catch(c){console.error(c)}}function u(t){t.preventDefault(),r({target:{files:t.dataTransfer.files}})}return(t,l)=>(e.openBlock(),e.createElementBlock("div",{onClick:f,onDrop:u,onDragover:l[0]||(l[0]=e.withModifiers(()=>{},["prevent"])),class:"image-upload-area flex-v-center flex-h-center flex"},[o.value||n.photo?(e.openBlock(),e.createElementBlock("img",{key:0,src:o.value||n.photo,alt:"Uploaded image",class:"w-100 h-100 object-fit-fill"},null,8,C)):(e.openBlock(),e.createElementBlock("div",m,g)),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:i,onChange:r,style:{display:"none"}},null,544)],32))}};exports._sfc_main=w;
@@ -0,0 +1,83 @@
1
+ import { ref as d, watch as v, openBlock as l, createElementBlock as n, withModifiers as g, createElementVNode as i } from "vue";
2
+ import { a as w } from "./auth-35ef1791.mjs";
3
+ const x = ["src"], _ = {
4
+ key: 1,
5
+ class: "flex-v-center flex-h-center flex w-100 h-100 bg-second"
6
+ }, y = /* @__PURE__ */ i("svg", {
7
+ class: "i-medium",
8
+ width: "104",
9
+ height: "104",
10
+ viewBox: "0 0 104 104",
11
+ fill: "none",
12
+ xmlns: "http://www.w3.org/2000/svg"
13
+ }, [
14
+ /* @__PURE__ */ i("path", {
15
+ fill: "white",
16
+ d: "M21.2784 37.2973C18.8466 34.6628 18.8466 30.6098 21.2784 27.9753L47.2179 2.03584C48.6364 0.81993 50.2577 0.211974 51.8789 0.211974C53.5001 0.211974 55.1213 0.81993 56.5399 2.03584L82.4793 27.9753C84.9111 30.6098 84.9111 34.6628 82.4793 37.2973C79.8448 39.7291 75.7918 39.7291 73.1573 37.2973L58.3637 22.301V71.5454C58.3637 75.1932 55.5266 78.0303 51.8789 78.0303C48.2311 78.0303 45.394 75.1932 45.394 71.5454V22.301L30.6004 37.2973C27.966 39.7291 23.9129 39.7291 21.2784 37.2973ZM97.2729 71.5454C100.921 71.5454 103.758 74.3825 103.758 78.0303V97.4849C103.758 101.133 100.921 103.97 97.2729 103.97H6.48486C2.83713 103.97 0 101.133 0 97.4849V78.0303C0 74.3825 2.83713 71.5454 6.48486 71.5454H38.9092C38.9092 78.6382 44.7861 84.5151 51.8789 84.5151C58.9717 84.5151 64.8486 78.6382 64.8486 71.5454H97.2729ZM87.5456 92.6212C90.1801 92.6212 92.4092 90.392 92.4092 87.7576C92.4092 85.1231 90.1801 82.8939 87.5456 82.8939C84.9111 82.8939 82.682 85.1231 82.682 87.7576C82.682 90.392 84.9111 92.6212 87.5456 92.6212Z"
17
+ })
18
+ ], -1), k = [
19
+ y
20
+ ], U = {
21
+ __name: "UploadImage",
22
+ props: [
23
+ "uploadPath",
24
+ // only necessary prop
25
+ "photo"
26
+ // new prop for holding the image url
27
+ ],
28
+ emits: ["update:photo"],
29
+ setup(a, { emit: u }) {
30
+ const r = a, t = d(null), s = d(null);
31
+ v(r, ({ photo: e }) => {
32
+ e && (t.value = e);
33
+ });
34
+ function h() {
35
+ s.value.click();
36
+ }
37
+ async function c(e) {
38
+ let o = e.target.files[0], p = new FormData();
39
+ p.append("file", o);
40
+ try {
41
+ let m = await w.create({ baseURL: process.env.API_URL, withCredentials: !0 }).post(`/api/upload/file?folderName=${encodeURIComponent(r.uploadPath)}`, p, {
42
+ headers: {
43
+ "Content-Type": "multipart/form-data"
44
+ }
45
+ });
46
+ t.value = m.data.filepath, u("update:photo", t.value);
47
+ } catch (f) {
48
+ console.error(f);
49
+ }
50
+ }
51
+ function C(e) {
52
+ e.preventDefault(), c({
53
+ target: {
54
+ files: e.dataTransfer.files
55
+ }
56
+ });
57
+ }
58
+ return (e, o) => (l(), n("div", {
59
+ onClick: h,
60
+ onDrop: C,
61
+ onDragover: o[0] || (o[0] = g(() => {
62
+ }, ["prevent"])),
63
+ class: "image-upload-area flex-v-center flex-h-center flex"
64
+ }, [
65
+ t.value || a.photo ? (l(), n("img", {
66
+ key: 0,
67
+ src: t.value || a.photo,
68
+ alt: "Uploaded image",
69
+ class: "w-100 h-100 object-fit-fill"
70
+ }, null, 8, x)) : (l(), n("div", _, k)),
71
+ i("input", {
72
+ type: "file",
73
+ ref_key: "fileInput",
74
+ ref: s,
75
+ onChange: c,
76
+ style: { display: "none" }
77
+ }, null, 544)
78
+ ], 32));
79
+ }
80
+ };
81
+ export {
82
+ U as _
83
+ };