@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.
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-15e71ec4.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-628f013e.mjs +138 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-cdbafd07.mjs +1944 -0
- package/dist/ButtonFollow-728aab73.mjs +130 -0
- package/dist/CardHeader-ce5a1a75.mjs +96 -0
- package/dist/CardOrganization-58b54995.js +1 -0
- package/dist/CardOrganization-91e79698.mjs +320 -0
- package/dist/CardOrganization-ee5c34ab.js +1 -0
- package/dist/CardOrganization-f70bd169.mjs +202 -0
- package/dist/Comments-63f154a6.js +9 -0
- package/dist/Comments-c092550f.mjs +76 -0
- package/dist/Comments-c5afa4d6.mjs +459 -0
- package/dist/EditProductImages-61ff4321.mjs +236 -0
- package/dist/Feed-8fd41524.js +1 -0
- package/dist/Feed-926cf4f3.mjs +355 -0
- package/dist/Feed-a31c43c2.mjs +423 -0
- package/dist/Feed-ecf37814.mjs +367 -0
- package/dist/IconEdit-736c89be.js +1 -0
- package/dist/IconEdit-e9fd4c6c.mjs +21 -0
- package/dist/PlaceholderUserpic-995da0fc.mjs +28 -0
- package/dist/Popup-0c791801.mjs +76 -0
- package/dist/Popup-105ef2c3.js +1 -0
- package/dist/Popup-82fb2c8a.mjs +76 -0
- package/dist/Product-2f3d592f.mjs +837 -0
- package/dist/Product-2fbf9d99.js +7 -0
- package/dist/Product-6c37ef35.js +7 -0
- package/dist/Product-7087b358.mjs +837 -0
- package/dist/ProductEdit-20709821.mjs +349 -0
- package/dist/ProductEdit-a81d13b9.js +1 -0
- package/dist/ProductEdit-c5067942.mjs +113 -0
- package/dist/ProfileBlogposts-79d5c858.mjs +63 -0
- package/dist/ProfileBlogposts-eca9916c.js +1 -0
- package/dist/ProfileBlogposts-fb014bc6.mjs +63 -0
- package/dist/ProfileComments-48f3d4bc.mjs +43 -0
- package/dist/ProfileComments-58094a50.mjs +43 -0
- package/dist/ProfileComments-b919f021.js +1 -0
- package/dist/ProfileEvents-05485e20.js +1 -0
- package/dist/ProfileEvents-20695376.mjs +55 -0
- package/dist/ProfileEvents-5d206e3d.mjs +55 -0
- package/dist/ProfileLikes-2f3a4488.js +1 -0
- package/dist/ProfileLikes-503712ec.mjs +43 -0
- package/dist/ProfileLikes-b5ac7f48.mjs +43 -0
- package/dist/ProfileOrganizations-0b76e38f.js +1 -0
- package/dist/ProfileOrganizations-32ab1e30.mjs +211 -0
- package/dist/ProfileOrganizations-3f305f4e.mjs +210 -0
- package/dist/ProfileOrganizations-50fce34e.js +1 -0
- package/dist/Publics-3f277c17.js +1 -0
- package/dist/Publics-49dbeafc.js +1 -0
- package/dist/Publics-9ebffff1.mjs +122 -0
- package/dist/Publics-b0fad2b0.mjs +1926 -0
- package/dist/Tab-58cd105f.mjs +46 -0
- package/dist/Tab-6f0a4909.js +1 -0
- package/dist/UploadImage-441e8526.js +1 -0
- package/dist/UploadImage-d1dbc280.mjs +99 -0
- package/dist/UploadImage-ff8f9a0c.mjs +83 -0
- package/dist/auth-35ef1791.mjs +1502 -0
- package/dist/auth.client.cjs +2 -2
- package/dist/auth.client.js +61 -41
- package/dist/auth.validation-29113f37.mjs +20 -0
- package/dist/categories-d669f3af.mjs +225 -0
- package/dist/community.client.cjs +1 -9
- package/dist/community.client.js +369 -741
- package/dist/community.server.js +16 -4
- package/dist/community.server.mjs +16 -4
- package/dist/events.client.cjs +1 -1
- package/dist/events.client.js +433 -331
- package/dist/events.server.js +19 -2
- package/dist/events.server.mjs +19 -2
- package/dist/inputs.validation-24ae76b9.js +1 -0
- package/dist/modules/constructor/components/elements/Bullets.vue.d.ts +15 -0
- package/dist/modules/constructor/components/elements/Caption.vue.d.ts +15 -0
- package/dist/modules/constructor/components/elements/H2.vue.d.ts +16 -0
- package/dist/modules/constructor/components/elements/Image.vue.d.ts +8 -0
- package/dist/modules/constructor/components/elements/ImageUpload.vue.d.ts +9 -0
- package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +12 -0
- package/dist/modules/constructor/components/sections/Constructor.vue.d.ts +7 -0
- package/dist/modules/events/components/sections/Feed.vue.d.ts +1 -0
- package/dist/modules/icons/entities/IconCommunity.vue.d.ts +2 -0
- package/dist/organizations-1b4c84ee.mjs +121 -0
- package/dist/organizations-af43bda4.js +1 -0
- package/dist/organizations.client-253c8068.mjs +3179 -0
- package/dist/organizations.client-c60d7659.js +3 -0
- package/dist/organizations.client.cjs +1 -3
- package/dist/organizations.client.js +50 -3026
- package/dist/organizations.server.js +1 -1
- package/dist/organizations.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +245 -208
- package/package.json +1 -1
- package/src/modules/auth/router/auth.js +28 -7
- package/src/modules/community/community.client.js +1 -12
- package/src/modules/community/components/pages/BlogPost.vue +1 -1
- package/src/modules/community/components/pages/CreateBlogPost.vue +8 -151
- package/src/modules/community/middlewares/server/verifyBlogpost.js +24 -11
- package/src/modules/{community → constructor}/components/elements/Textarea.vue +3 -11
- package/src/modules/constructor/components/sections/Constructor.vue +167 -0
- package/src/modules/events/components/blocks/CardEvent.vue +14 -6
- package/src/modules/events/components/pages/EditEvent.vue +228 -133
- package/src/modules/events/components/sections/Feed.vue +7 -1
- package/src/modules/events/controllers/events.controller.js +9 -0
- package/src/modules/events/controllers/tickets.controller.js +2 -1
- package/src/modules/events/models/event.model.js +10 -0
- package/src/modules/events/store/events.js +15 -19
- package/src/modules/icons/entities/IconCommunity.vue +8 -0
- package/src/modules/organizations/components/blocks/CardOrganization.vue +3 -5
- package/src/modules/organizations/components/sections/Publics.vue +3 -3
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/organizations/organizations.client.js +0 -2
- package/src/modules/users/components/pages/Profile.vue +15 -4
- package/src/modules/users/components/pages/ProfileEvents.vue +3 -3
- package/src/modules/organizations/components/blocks/CardOrganizationSocial.vue +0 -46
- /package/src/modules/{community → constructor}/components/elements/Bullets.vue +0 -0
- /package/src/modules/{community → constructor}/components/elements/Caption.vue +0 -0
- /package/src/modules/{community → constructor}/components/elements/H2.vue +0 -0
- /package/src/modules/{community → constructor}/components/elements/Image.vue +0 -0
- /package/src/modules/{community → constructor}/components/elements/ImageUpload.vue +0 -0
@@ -0,0 +1,210 @@
|
|
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-054b61f7.mjs";
|
4
|
+
import { _ as L } from "./EmptyState-34d85f10.mjs";
|
5
|
+
import { a as x, _ as V } from "./CardOrganization-91e79698.mjs";
|
6
|
+
import { _ as B, s as _ } from "./auth-35ef1791.mjs";
|
7
|
+
import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
8
|
+
import "./globals-96ba60e4.mjs";
|
9
|
+
import "vue-i18n";
|
10
|
+
import "./ButtonFollow-728aab73.mjs";
|
11
|
+
const E = {}, G = {
|
12
|
+
width: "100%",
|
13
|
+
height: "20rem",
|
14
|
+
xmlns: "http://www.w3.org/2000/svg"
|
15
|
+
}, 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 = [
|
16
|
+
P
|
17
|
+
];
|
18
|
+
function T(b, e) {
|
19
|
+
return r(), o("svg", G, R);
|
20
|
+
}
|
21
|
+
const U = /* @__PURE__ */ B(E, [["render", T]]), j = { class: "feed" }, z = {
|
22
|
+
__name: "Feed",
|
23
|
+
props: {
|
24
|
+
category: {
|
25
|
+
type: String,
|
26
|
+
default: null
|
27
|
+
},
|
28
|
+
selectedDate: {
|
29
|
+
type: String,
|
30
|
+
default: null
|
31
|
+
},
|
32
|
+
organization: {
|
33
|
+
type: String,
|
34
|
+
default: null
|
35
|
+
},
|
36
|
+
owner: {
|
37
|
+
type: String,
|
38
|
+
default: null
|
39
|
+
},
|
40
|
+
user: {
|
41
|
+
type: [String, Number],
|
42
|
+
default: null
|
43
|
+
},
|
44
|
+
member: {
|
45
|
+
type: [String, Number],
|
46
|
+
default: null
|
47
|
+
},
|
48
|
+
subscriber: {
|
49
|
+
type: [String, Number],
|
50
|
+
default: null
|
51
|
+
},
|
52
|
+
sortOrder: {
|
53
|
+
type: String,
|
54
|
+
default: "desc"
|
55
|
+
},
|
56
|
+
participant: {
|
57
|
+
type: String,
|
58
|
+
default: null
|
59
|
+
},
|
60
|
+
period: {
|
61
|
+
type: String,
|
62
|
+
default: null
|
63
|
+
},
|
64
|
+
status: {
|
65
|
+
type: String,
|
66
|
+
default: null
|
67
|
+
}
|
68
|
+
},
|
69
|
+
setup(b) {
|
70
|
+
const e = b, a = c([]), n = c(!1), t = c(!0), i = c(0), s = c(20), p = async () => {
|
71
|
+
if (n.value) {
|
72
|
+
i.value += s.value;
|
73
|
+
const l = await x.read({
|
74
|
+
skip: i.value,
|
75
|
+
limit: s.value,
|
76
|
+
category: e.category,
|
77
|
+
sortOrder: e.sortOrder,
|
78
|
+
member: e.member,
|
79
|
+
subscriber: e.subscriber,
|
80
|
+
onlyuser: e.onlyuser,
|
81
|
+
user: e.user,
|
82
|
+
date: e.selectedDate,
|
83
|
+
owner: e.owner,
|
84
|
+
organization: e.organization,
|
85
|
+
period: e.period,
|
86
|
+
status: e.status
|
87
|
+
});
|
88
|
+
l.length === 0 ? n.value = !1 : n.value = !0, a.value = [...a.value, ...l];
|
89
|
+
}
|
90
|
+
};
|
91
|
+
return C(async () => {
|
92
|
+
t.value = !0, console.log(e.selectedDate);
|
93
|
+
const l = await x.read({
|
94
|
+
skip: i.value,
|
95
|
+
limit: s.value,
|
96
|
+
category: e.category,
|
97
|
+
member: e.member,
|
98
|
+
subscriber: e.subscriber,
|
99
|
+
onlyuser: e.onlyuser,
|
100
|
+
sortOrder: e.sortOrder,
|
101
|
+
user: e.user,
|
102
|
+
owner: e.owner,
|
103
|
+
date: e.selectedDate,
|
104
|
+
organization: e.organization,
|
105
|
+
period: e.period,
|
106
|
+
status: e.status
|
107
|
+
});
|
108
|
+
l.length === 0 ? n.value = !1 : n.value = !0, a.value = l, t.value = !1;
|
109
|
+
}), (l, J) => (r(), o("section", j, [
|
110
|
+
d(v, {
|
111
|
+
tag: "ul",
|
112
|
+
name: "fade",
|
113
|
+
class: "o-hidden bg-grey radius-big"
|
114
|
+
}, {
|
115
|
+
default: g(() => [
|
116
|
+
t.value ? (r(!0), o(k, { key: 0 }, w(s.value, (m) => (r(), f(U, { key: m }))), 128)) : u("", !0)
|
117
|
+
]),
|
118
|
+
_: 1
|
119
|
+
}),
|
120
|
+
d(h, { name: "fade" }, {
|
121
|
+
default: g(() => [
|
122
|
+
!t.value && a.value.length < 1 ? (r(), f(L, {
|
123
|
+
key: 0,
|
124
|
+
title: "No Organizations Found",
|
125
|
+
description: "Currently, there are no organizations available. Please check back later.",
|
126
|
+
class: "pd-medium mn-thin bg-grey radius-big"
|
127
|
+
})) : u("", !0)
|
128
|
+
]),
|
129
|
+
_: 1
|
130
|
+
}),
|
131
|
+
d(v, {
|
132
|
+
tag: "ul",
|
133
|
+
name: "fade",
|
134
|
+
class: "container"
|
135
|
+
}, {
|
136
|
+
default: g(() => [
|
137
|
+
!t.value && a.value.length > 0 ? (r(!0), o(k, { key: 0 }, w(a.value, (m, S) => (r(), f(V, {
|
138
|
+
onClick: (K) => l.$router.push({ name: "Organization", params: { _id: m._id } }),
|
139
|
+
key: m._id,
|
140
|
+
organization: m,
|
141
|
+
user: b.user,
|
142
|
+
type: "normal",
|
143
|
+
class: N(["w-100 radius-big mn-medium", {
|
144
|
+
"br-b br-solid br-black-transp-10": S !== a.value.length - 1
|
145
|
+
}])
|
146
|
+
}, null, 8, ["onClick", "organization", "user", "class"]))), 128)) : u("", !0),
|
147
|
+
n.value && a.value.length > 0 ? (r(), o("button", {
|
148
|
+
key: 1,
|
149
|
+
onClick: p,
|
150
|
+
class: "w-100 bg-main button"
|
151
|
+
}, "Load more")) : u("", !0)
|
152
|
+
]),
|
153
|
+
_: 1
|
154
|
+
})
|
155
|
+
]));
|
156
|
+
}
|
157
|
+
}, A = { class: "pd-thin" }, H = { class: "mn-medium flex-v-center flex-nowrap flex" }, I = /* @__PURE__ */ O("h2", { class: "mn-r-medium" }, "Groups", -1), ne = {
|
158
|
+
__name: "ProfileOrganizations",
|
159
|
+
setup(b) {
|
160
|
+
const e = M(), a = D();
|
161
|
+
let n = e.query.tab ? e.query.tab : "member";
|
162
|
+
const t = c(n);
|
163
|
+
return e.query.tab = t.value, q(t, (i) => {
|
164
|
+
a.push({ query: { ...e.query, tab: i } });
|
165
|
+
}), (i, s) => (r(), o("div", A, [
|
166
|
+
O("header", H, [
|
167
|
+
I,
|
168
|
+
_.user._id === y(e).params._id ? (r(), o("button", {
|
169
|
+
key: 0,
|
170
|
+
onClick: s[0] || (s[0] = (p) => i.$router.push({
|
171
|
+
name: "Create Organization"
|
172
|
+
})),
|
173
|
+
class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
|
174
|
+
}, " + ")) : u("", !0)
|
175
|
+
]),
|
176
|
+
d(F, {
|
177
|
+
selected: t.value,
|
178
|
+
"onUpdate:selected": s[1] || (s[1] = (p) => t.value = p),
|
179
|
+
tabs: [
|
180
|
+
{ name: "Member", value: "member" },
|
181
|
+
{ name: "Follower", value: "follower" }
|
182
|
+
],
|
183
|
+
class: "mn-medium mn-r-medium o-hidden h5 radius-big bg-grey"
|
184
|
+
}, null, 8, ["selected"]),
|
185
|
+
d(h, { name: "slide-fade" }, {
|
186
|
+
default: g(() => [
|
187
|
+
t.value === "member" ? (r(), f(z, {
|
188
|
+
key: 0,
|
189
|
+
user: _.user._id,
|
190
|
+
owner: y(e).params._id
|
191
|
+
}, null, 8, ["user", "owner"])) : u("", !0)
|
192
|
+
]),
|
193
|
+
_: 1
|
194
|
+
}),
|
195
|
+
d(h, { name: "slide-fade" }, {
|
196
|
+
default: g(() => [
|
197
|
+
t.value === "follower" ? (r(), f(z, {
|
198
|
+
key: 0,
|
199
|
+
user: _.user._id,
|
200
|
+
subscriber: y(e).params._id
|
201
|
+
}, null, 8, ["user", "subscriber"])) : u("", !0)
|
202
|
+
]),
|
203
|
+
_: 1
|
204
|
+
})
|
205
|
+
]));
|
206
|
+
}
|
207
|
+
};
|
208
|
+
export {
|
209
|
+
ne as default
|
210
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),g=require("vue-router"),p=require("./Tab-b0a7ac11.js"),y=require("./EmptyState-7658d7d6.js"),m=require("./CardOrganization-58b54995.js"),d=require("./auth-5aa8e90c.js");require("./Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./globals-928eb13c.js");require("vue-i18n");require("./ButtonFollow-2ce169ca.js");const h={},k={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},v=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),_=[v];function w(u,t){return e.openBlock(),e.createElementBlock("svg",k,_)}const B=d._export_sfc(h,[["render",w]]),x={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 m.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 m.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",x,[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(B,{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(m._sfc_main,{onClick:q=>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})]))}},C={class:"pd-thin"},N={class:"mn-medium flex-v-center flex-nowrap flex"},z=e.createElementVNode("h2",{class:"mn-r-medium"},"Groups",-1),S={__name:"ProfileOrganizations",setup(u){const t=g.useRoute(),a=g.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",C,[e.createElementVNode("header",N,[z,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 @@
|
|
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 @@
|
|
1
|
+
"use strict";const t=require("vue"),m=require("./auth-5aa8e90c.js"),v=require("./CardOrganization-58b54995.js"),V=require("./EmptyState-7658d7d6.js"),B=require("./ButtonFollow-2ce169ca.js");var O=function e(s,i){if(s===i)return!0;if(s&&i&&typeof s=="object"&&typeof i=="object"){if(s.constructor!==i.constructor)return!1;var n,r,a;if(Array.isArray(s)){if(n=s.length,n!=i.length)return!1;for(r=n;r--!==0;)if(!e(s[r],i[r]))return!1;return!0}if(s.constructor===RegExp)return s.source===i.source&&s.flags===i.flags;if(s.valueOf!==Object.prototype.valueOf)return s.valueOf()===i.valueOf();if(s.toString!==Object.prototype.toString)return s.toString()===i.toString();if(a=Object.keys(s),n=a.length,n!==Object.keys(i).length)return!1;for(r=n;r--!==0;)if(!Object.prototype.hasOwnProperty.call(i,a[r]))return!1;for(r=n;r--!==0;){var l=a[r];if(!e(s[l],i[l]))return!1}return!0}return s!==s&&i!==i};const C=m.getDefaultExportFromCjs(O),D=(e,s)=>s.filter(i=>{const{text:n}=e;if(typeof i.rule=="string")return!new RegExp(i.rule).test(n);if(i.rule instanceof RegExp)return!i.rule.test(n);if({}.toString.call(i.rule)==="[object Function]")return i.rule(e)}).map(i=>i.classes),c=e=>JSON.parse(JSON.stringify(e)),L=(e,s)=>{let i=0;for(;i<e.length;){if(s(e[i],i,e))return i;i++}return-1},T=(e,s,i=[],n)=>{e.text===void 0&&(e={text:e});const r=D(e,i),a=L(s,d=>d===e),l=c(s),o=a!==-1?l.splice(a,1)[0]:c(e);return(n?n(l,o):l.map(d=>d.text).indexOf(o.text)!==-1)&&r.push("ti-duplicate"),r.length===0?r.push("ti-valid"):r.push("ti-invalid"),r},f=(e,...s)=>{e.text===void 0&&(e={text:e});const i=c(e);return i.tiClasses=T(e,...s),i},M=(e,...s)=>e.map(i=>f(i,e,...s));const N={name:"TagInput",props:{scope:{type:Object}}},A=["maxlength"];function F(e,s,i,n,r,a){return i.scope.edit?t.withDirectives((t.openBlock(),t.createElementBlock("input",{key:0,"onUpdate:modelValue":s[0]||(s[0]=l=>i.scope.tag.text=l),maxlength:i.scope.maxlength,type:"text",class:"ti-tag-input",size:"1",onInput:s[1]||(s[1]=l=>i.scope.validateTag(i.scope.index,l)),onBlur:s[2]||(s[2]=l=>i.scope.performCancelEdit(i.scope.index)),onKeydown:s[3]||(s[3]=l=>i.scope.performSaveEdit(i.scope.index,l))},null,40,A)),[[t.vModelText,i.scope.tag.text]]):t.createCommentVNode("",!0)}const I=m._export_sfc(N,[["render",F],["__scopeId","data-v-a1f1c345"]]),w=e=>!e.some(s=>{const i=!s.text;i&&console.warn('Missing property "text"',s);let n=!1;return s.classes&&(n=typeof s.classes!="string"),n&&console.warn('Property "classes" must be type of string',s),i||n}),S=e=>!e.some(s=>{if(typeof s=="number"){const i=isFinite(s)&&Math.floor(s)===s;return i||console.warn("Only numerics are allowed for this prop. Found:",s),!i}else if(typeof s=="string"){const i=/\W|[a-z]|!\d/i.test(s);return i||console.warn("Only alpha strings are allowed for this prop. Found:",s),!i}else return console.warn("Only numeric and string values are allowed. Found:",s),!1}),K={modelValue:{type:String,default:"",required:!0},tags:{type:Array,default:()=>[],validator:w},autocompleteItems:{type:Array,default:()=>[],validator:w},allowEditTags:{type:Boolean,default:!1},autocompleteFilterDuplicates:{default:!0,type:Boolean},addOnlyFromAutocomplete:{type:Boolean,default:!1},autocompleteMinLength:{type:Number,default:1},autocompleteAlwaysOpen:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},placeholder:{type:String,default:"Add Tag"},addOnKey:{type:Array,default:()=>[13],validator:S},saveOnKey:{type:Array,default:()=>[13],validator:S},maxTags:{type:Number},maxlength:{type:Number},validation:{type:Array,default:()=>[],validator(e){return!e.some(s=>{const i=!s.rule;i&&console.warn('Property "rule" is missing',s);const n=s.rule&&(typeof s.rule=="string"||s.rule instanceof RegExp||{}.toString.call(s.rule)==="[object Function]");n||console.warn("A rule must be type of string, RegExp or function. Found:",JSON.stringify(s.rule));const r=!s.classes;r&&console.warn('Property "classes" is missing',s);const a=s.type&&typeof s.type!="string";return a&&console.warn('Property "type" must be type of string. Found:',s),!n||i||r||a})}},separators:{type:Array,default:()=>[";"],validator(e){return!e.some(s=>{const i=typeof s!="string";return i&&console.warn("Separators must be type of string. Found:",s),i})}},avoidAddingDuplicates:{type:Boolean,default:!0},addOnBlur:{type:Boolean,default:!0},isDuplicate:{type:Function,default:null},addFromPaste:{type:Boolean,default:!0},deleteOnBackspace:{default:!0,type:Boolean},onBeforeAddingTag:Function,onBeforeDeletingTag:Function,onBeforeEditingTag:Function,onBeforeSavingTag:Function},P={name:"VueTagsInput",components:{TagInput:I},props:K,emits:["adding-duplicate","before-adding-tag","before-deleting-tag","before-editing-tag","before-saving-tag","max-tags-reached","saving-duplicate","tags-changed","tag-clicked","update:modelValue","update:tags"],inheritAttrs:!1,data(){return{tagCenter:[],newTag:null,tagsCopy:[],tagsEditStatus:null,deletionMark:null,deletionMarkTime:null,selectedItem:null,focused:null}},computed:{autocompleteOpen(){return this.autocompleteAlwaysOpen?!0:this.newTag!==null&&this.newTag.length>=this.autocompleteMinLength&&this.filteredAutocompleteItems.length>0&&this.focused},filteredAutocompleteItems(){const e=this.autocompleteItems.map(s=>f(s,this.tags,this.validation,this.isDuplicate));return this.autocompleteFilterDuplicates?e.filter(this.duplicateFilter):e}},methods:{createClasses:T,getSelectedIndex(e){const s=this.filteredAutocompleteItems,i=this.selectedItem,n=s.length-1;if(s.length!==0)return i===null?0:e==="before"&&i===0?n:e==="after"&&i===n?0:e==="after"?i+1:i-1},selectDefaultItem(){this.addOnlyFromAutocomplete&&this.filteredAutocompleteItems.length>0?this.selectedItem=0:this.selectedItem=null},selectItem(e,s){e.preventDefault(),this.selectedItem=this.getSelectedIndex(s)},isSelected(e){return this.selectedItem===e},isMarked(e){return this.deletionMark===e},setTagCenter(e){e&&this.tagCenter.push(e)},invokeDelete(){if(!this.deleteOnBackspace||this.newTag.length>0)return;const e=this.tagsCopy.length-1;this.deletionMark===null?(this.deletionMarkTime=setTimeout(()=>this.deletionMark=null,1e3),this.deletionMark=e):this.performDeleteTag(e)},addTagsFromPaste(){this.addFromPaste&&setTimeout(()=>this.performAddTags(this.newTag),10)},performEditTag(e){this.allowEditTags&&(this.onBeforeAddingTag||this.editTag(e),this.$emit("before-editing-tag",{index:e,tag:this.tagsCopy[e],editTag:()=>this.editTag(e)}))},editTag(e){this.allowEditTags&&(this.toggleEditMode(e),this.focus(e))},toggleEditMode(e){!this.allowEditTags||this.disabled||(this.tagsEditStatus[e]=!this.tagsEditStatus[e])},createChangedTag(e,s){const i=this.tagsCopy[e];i.text=s?s.target.value:this.tagsCopy[e].text,this.tagsCopy[e]=f(i,this.tagsCopy,this.validation,this.isDuplicate)},focus(e){this.$nextTick(()=>{const s=this.tagCenter[e].querySelector("input.ti-tag-input");s&&s.focus()})},quote(e){return e.replace(/([()[{*+.$^\\|?])/g,"\\$1")},cancelEdit(e){this.tags[e]&&(this.tagsCopy[e]=c(f(this.tags[e],this.tags,this.validation,this.isDuplicate)),this.tagsEditStatus[e]=!1)},hasForbiddingAddRule(e){return e.some(s=>{const i=this.validation.find(n=>s===n.classes);return i?i.disableAdd:!1})},createTagTexts(e){const s=new RegExp(this.separators.map(i=>this.quote(i)).join("|"));return e.split(s).map(i=>({text:i}))},performDeleteTag(e){this.onBeforeDeletingTag||this.deleteTag(e),this.$emit("before-deleting-tag",{index:e,tag:this.tagsCopy[e],deleteTag:()=>this.deleteTag(e)})},deleteTag(e){this.disabled||(this.deletionMark=null,clearTimeout(this.deletionMarkTime),this.tagsCopy.splice(e,1),this.$emit("update:tags",this.tagsCopy),this.$emit("tags-changed",this.tagsCopy))},noTriggerKey(e,s){const i=this[s].indexOf(e.keyCode)!==-1||this[s].indexOf(e.key)!==-1;return i&&e.preventDefault(),!i},performAddTags(e,s,i){if(this.disabled||s&&this.noTriggerKey(s,"addOnKey"))return;let n=[];typeof e=="object"&&(n=[e]),typeof e=="string"&&(n=this.createTagTexts(e)),n=n.filter(r=>r.text.trim().length>0),n.forEach(r=>{r=f(r,this.tags,this.validation,this.isDuplicate),this.onBeforeAddingTag||this.addTag(r,i),this.$emit("before-adding-tag",{tag:r,addTag:()=>this.addTag(r,i)})})},duplicateFilter(e){return this.isDuplicate?!this.isDuplicate(this.tagsCopy,e):!this.tagsCopy.find(s=>s.text===e.text)},addTag(e,s="new-tag-input"){const i=this.filteredAutocompleteItems.map(n=>n.text);this.addOnlyFromAutocomplete&&i.indexOf(e.text)===-1||this.$nextTick(()=>{if(this.maxTags&&this.maxTags<=this.tagsCopy.length)return this.$emit("max-tags-reached",e);if(this.avoidAddingDuplicates&&!this.duplicateFilter(e))return this.$emit("adding-duplicate",e);this.hasForbiddingAddRule(e.tiClasses)||(this.newTag="",this.tagsCopy.push(e),this.$emit("update:tags",this.tagsCopy),s==="autocomplete"&&this.$refs.newTagInput.focus(),this.$emit("tags-changed",this.tagsCopy))})},performSaveTag(e,s){const i=this.tagsCopy[e];this.disabled||s&&this.noTriggerKey(s,"addOnKey")||i.text.trim().length!==0&&(this["on-before-saving-tag"]||this.saveTag(e,i),this.$emit("before-saving-tag",{index:e,tag:i,saveTag:()=>this.saveTag(e,i)}))},saveTag(e,s){if(this.avoidAddingDuplicates){const i=c(this.tagsCopy),n=i.splice(e,1)[0];if(this.isDuplicate?this.isDuplicate(i,n):i.map(a=>a.text).indexOf(n.text)!==-1)return this.$emit("saving-duplicate",s)}this.hasForbiddingAddRule(s.tiClasses)||(this.tagsCopy[e]=s,this.toggleEditMode(e),this.$emit("update:tags",this.tagsCopy),this.$emit("tags-changed",this.tagsCopy))},tagsEqual(){return!this.tagsCopy.some((e,s)=>!C(e,this.tags[s]))},updateNewTag(e){const s=e.target.value;this.newTag=s,this.$emit("update:modelValue",s)},initTags(){this.tagsCopy=M(this.tags,this.validation,this.isDuplicate),this.tagsEditStatus=c(this.tags).map(()=>!1),this.tagsEqual()||this.$emit("update:tags",this.tagsCopy)},blurredOnClick(e){this.$el.contains(e.target)||this.$el.contains(document.activeElement)||this.performBlur(e)},performBlur(){this.addOnBlur&&this.focused&&this.performAddTags(this.newTag),this.focused=!1}},watch:{modelValue(e){this.addOnlyFromAutocomplete||(this.selectedItem=null),this.newTag=e},tags:{handler(){this.initTags()},deep:!0},autocompleteOpen:"selectDefaultItem"},created(){this.newTag=this.modelValue,this.initTags()},mounted(){this.selectDefaultItem(),document.addEventListener("click",this.blurredOnClick)},beforeUpdate(){this.tagCenter=[]},unmounted(){document.removeEventListener("click",this.blurredOnClick)}};const z={class:"ti-input"},R={key:0,class:"ti-tags"},H=["onClick"],G={class:"ti-content"},j={key:0,class:"ti-tag-left"},q=["onClick"],U={key:1,class:"ti-tag-right"},J={class:"ti-actions"},W=["onClick"],Y=["onClick"],Q={class:"ti-new-tag-input-wrapper"},X=["placeholder","value","maxlength","disabled"],Z=["onMouseover"],_=["onClick"];function x(e,s,i,n,r,a){const l=t.resolveComponent("tag-input");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(["vue-tags-input",[{"ti-disabled":e.disabled},{"ti-focus":e.focused},e.$attrs.class]]),style:t.normalizeStyle(e.$attrs.style)},[t.createElementVNode("div",z,[e.tagsCopy?(t.openBlock(),t.createElementBlock("ul",R,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.tagsCopy,(o,u)=>(t.openBlock(),t.createElementBlock("li",{key:u,style:t.normalizeStyle(o.style),class:t.normalizeClass([[{"ti-editing":e.tagsEditStatus[u]},o.tiClasses,o.classes,{"ti-deletion-mark":e.isMarked(u)}],"ti-tag"]),tabindex:"0",onClick:d=>e.$emit("tag-clicked",{tag:o,index:u})},[t.createElementVNode("div",G,[e.$slots["tag-left"]?(t.openBlock(),t.createElementBlock("div",j,[t.renderSlot(e.$slots,"tag-left",{tag:o,index:u,edit:e.tagsEditStatus[u],performSaveEdit:e.performSaveTag,performDelete:e.performDeleteTag,performCancelEdit:e.cancelEdit,performOpenEdit:e.performEditTag,deletionMark:e.isMarked(u)},void 0,!0)])):t.createCommentVNode("",!0),t.createElementVNode("div",{ref_for:!0,ref:e.setTagCenter,class:"ti-tag-center"},[e.$slots["tag-center"]?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass({"ti-hidden":e.tagsEditStatus[u]}),onClick:d=>e.performEditTag(u)},t.toDisplayString(o.text),11,q)),e.$slots["tag-center"]?t.createCommentVNode("",!0):(t.openBlock(),t.createBlock(l,{key:1,scope:{edit:e.tagsEditStatus[u],maxlength:e.maxlength,tag:o,index:u,validateTag:e.createChangedTag,performCancelEdit:e.cancelEdit,performSaveEdit:e.performSaveTag}},null,8,["scope"])),t.renderSlot(e.$slots,"tag-center",{tag:o,index:u,maxlength:e.maxlength,edit:e.tagsEditStatus[u],performSaveEdit:e.performSaveTag,performDelete:e.performDeleteTag,performCancelEdit:e.cancelEdit,validateTag:e.createChangedTag,performOpenEdit:e.performEditTag,deletionMark:e.isMarked(u)},void 0,!0)],512),e.$slots["tag-right"]?(t.openBlock(),t.createElementBlock("div",U,[t.renderSlot(e.$slots,"tag-right",{tag:o,index:u,edit:e.tagsEditStatus[u],performSaveEdit:e.performSaveTag,performDelete:e.performDeleteTag,performCancelEdit:e.cancelEdit,performOpenEdit:e.performEditTag,deletionMark:e.isMarked(u)},void 0,!0)])):t.createCommentVNode("",!0)]),t.createElementVNode("div",J,[e.$slots["tag-actions"]?t.createCommentVNode("",!0):t.withDirectives((t.openBlock(),t.createElementBlock("i",{key:0,class:"ti-icon-undo",onClick:d=>e.cancelEdit(u)},null,8,W)),[[t.vShow,e.tagsEditStatus[u]]]),e.$slots["tag-actions"]?t.createCommentVNode("",!0):t.withDirectives((t.openBlock(),t.createElementBlock("i",{key:1,class:"ti-icon-close",onClick:d=>e.performDeleteTag(u)},null,8,Y)),[[t.vShow,!e.tagsEditStatus[u]]]),e.$slots["tag-actions"]?t.renderSlot(e.$slots,"tag-actions",{key:2,tag:o,index:u,edit:e.tagsEditStatus[u],performSaveEdit:e.performSaveTag,performDelete:e.performDeleteTag,performCancelEdit:e.cancelEdit,performOpenEdit:e.performEditTag,deletionMark:e.isMarked(u)},void 0,!0):t.createCommentVNode("",!0)])],14,H))),128)),t.createElementVNode("li",Q,[t.createElementVNode("input",t.mergeProps({ref:"newTagInput"},e.$attrs,{class:[[e.createClasses(e.newTag,e.tags,e.validation,e.isDuplicate)],"ti-new-tag-input"],placeholder:e.placeholder,value:e.newTag,maxlength:e.maxlength,disabled:e.disabled,type:"text",size:"1",onKeydown:[s[0]||(s[0]=o=>e.performAddTags(e.filteredAutocompleteItems[e.selectedItem]||e.newTag,o)),s[2]||(s[2]=t.withKeys((...o)=>e.invokeDelete&&e.invokeDelete(...o),["delete"])),s[3]||(s[3]=t.withKeys((...o)=>e.performBlur&&e.performBlur(...o),["tab"])),s[4]||(s[4]=t.withKeys(o=>e.selectItem(o,"before"),["up"])),s[5]||(s[5]=t.withKeys(o=>e.selectItem(o,"after"),["down"]))],onPaste:s[1]||(s[1]=(...o)=>e.addTagsFromPaste&&e.addTagsFromPaste(...o)),onInput:s[6]||(s[6]=(...o)=>e.updateNewTag&&e.updateNewTag(...o)),onFocus:s[7]||(s[7]=o=>e.focused=!0),onClick:s[8]||(s[8]=o=>e.addOnlyFromAutocomplete?!1:e.selectedItem=null)}),null,16,X)])])):t.createCommentVNode("",!0)]),t.renderSlot(e.$slots,"between-elements",{},void 0,!0),e.autocompleteOpen?(t.openBlock(),t.createElementBlock("div",{key:0,class:t.normalizeClass(["ti-autocomplete",e.$attrs.class]),onMouseout:s[9]||(s[9]=o=>e.selectedItem=null)},[t.renderSlot(e.$slots,"autocomplete-header",{},void 0,!0),t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.filteredAutocompleteItems,(o,u)=>(t.openBlock(),t.createElementBlock("li",{key:u,style:t.normalizeStyle(o.style),class:t.normalizeClass([[o.tiClasses,o.classes,{"ti-selected-item":e.isSelected(u)}],"ti-item"]),onMouseover:d=>e.disabled?!1:e.selectedItem=u},[e.$slots["autocomplete-item"]?t.renderSlot(e.$slots,"autocomplete-item",{key:1,item:o,index:u,performAdd:d=>e.performAddTags(d,void 0,"autocomplete"),selected:e.isSelected(u)},void 0,!0):(t.openBlock(),t.createElementBlock("div",{key:0,onClick:d=>e.performAddTags(o,void 0,"autocomplete")},t.toDisplayString(o.text),9,_))],46,Z))),128))]),t.renderSlot(e.$slots,"autocomplete-footer",{},void 0,!0)],34)):t.createCommentVNode("",!0)],6)}const ee=m._export_sfc(P,[["render",x],["__scopeId","data-v-d14eec25"]]);const te=t.createElementVNode("h5",{class:"mn-thin"},"Tags (maximum 20):",-1),se={class:"mn-medium"},ie=t.createElementVNode("p",{class:"p-small mn-thin"},"Suggested:",-1),le=["onClick"],ne={key:1},re={__name:"BlockTags",props:["tags"],emits:["tags-changed"],setup(e,{emit:s}){const i=e,n=t.ref(""),r=t.ref([]),a=t.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);i.tags&&(r.value=i.tags.map(h=>({text:h})));const l=t.computed(()=>a.value.filter(h=>h.text.toLowerCase().includes(n.value.toLowerCase()))),o=t.computed(()=>a.value.filter(h=>!r.value.some(p=>p.text===h.text)));function u(h){r.value.push(h),s("tags-changed",r.value.map(p=>p.text))}function d(h){r.value=h,s("tags-changed",r.value.map(p=>p.text))}return(h,p)=>(t.openBlock(),t.createElementBlock("div",null,[te,t.createVNode(ee,{modelValue:n.value,"onUpdate:modelValue":p[0]||(p[0]=g=>n.value=g),tags:r.value,"autocomplete-items":t.unref(l),"add-on-key":[13,":",";",","],"save-on-key":[13,":",";",","],separators:[";",","],"max-tags":20,maxlength:20,placeholder:"Please add tags","add-from-paste":!0,"allow-edit-tags":!0,onTagsChanged:d,class:"mn-thin bg-grey radius-medium pd-small"},null,8,["modelValue","tags","autocomplete-items"]),t.createElementVNode("p",se,[ie,t.unref(o).length>0?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(o),(g,$)=>(t.openBlock(),t.createElementBlock("span",{onClick:Fe=>u(g),class:t.normalizeClass(["cursor-pointer ti-tag-toDefactor",{"mn-r-micro":$!==t.unref(o).length-1}])},t.toDisplayString(g.text),11,le))),256)):(t.openBlock(),t.createElementBlock("span",ne,"You added all suggested tags"))])]))}};function y(e){return e===0?!1:Array.isArray(e)&&e.length===0?!0:!e}function oe(e){return(...s)=>!e(...s)}function ae(e,s){return e===void 0&&(e="undefined"),e===null&&(e="null"),e===!1&&(e="false"),e.toString().toLowerCase().indexOf(s.trim())!==-1}function E(e,s,i,n){return s?e.filter(r=>ae(n(r,i),s)).sort((r,a)=>n(r,i).length-n(a,i).length):e}function ue(e){return e.filter(s=>!s.$isLabel)}function b(e,s){return i=>i.reduce((n,r)=>r[e]&&r[e].length?(n.push({$groupLabel:r[s],$isLabel:!0}),n.concat(r[e])):n,[])}function de(e,s,i,n,r){return a=>a.map(l=>{if(!l[i])return console.warn("Options passed to vue-multiselect do not contain groups, despite the config."),[];const o=E(l[i],e,s,r);return o.length?{[n]:l[n],[i]:o}:[]})}const k=(...e)=>s=>e.reduce((i,n)=>n(i),s),he={data(){return{search:"",isOpen:!1,preferredOpenDirection:"below",optimizedHeight:this.maxHeight}},props:{internalSearch:{type:Boolean,default:!0},options:{type:Array,required:!0},multiple:{type:Boolean,default:!1},trackBy:{type:String},label:{type:String},searchable:{type:Boolean,default:!0},clearOnSelect:{type:Boolean,default:!0},hideSelected:{type:Boolean,default:!1},placeholder:{type:String,default:"Select option"},allowEmpty:{type:Boolean,default:!0},resetAfter:{type:Boolean,default:!1},closeOnSelect:{type:Boolean,default:!0},customLabel:{type:Function,default(e,s){return y(e)?"":s?e[s]:e}},taggable:{type:Boolean,default:!1},tagPlaceholder:{type:String,default:"Press enter to create a tag"},tagPosition:{type:String,default:"top"},max:{type:[Number,Boolean],default:!1},id:{default:null},optionsLimit:{type:Number,default:1e3},groupValues:{type:String},groupLabel:{type:String},groupSelect:{type:Boolean,default:!1},blockKeys:{type:Array,default(){return[]}},preserveSearch:{type:Boolean,default:!1},preselectFirst:{type:Boolean,default:!1},preventAutofocus:{type:Boolean,default:!1}},mounted(){!this.multiple&&this.max&&console.warn("[Vue-Multiselect warn]: Max prop should not be used when prop Multiple equals false."),this.preselectFirst&&!this.internalValue.length&&this.options.length&&this.select(this.filteredOptions[0])},computed:{internalValue(){return this.modelValue||this.modelValue===0?Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]:[]},filteredOptions(){const e=this.search||"",s=e.toLowerCase().trim();let i=this.options.concat();return this.internalSearch?i=this.groupValues?this.filterAndFlat(i,s,this.label):E(i,s,this.label,this.customLabel):i=this.groupValues?b(this.groupValues,this.groupLabel)(i):i,i=this.hideSelected?i.filter(oe(this.isSelected)):i,this.taggable&&s.length&&!this.isExistingOption(s)&&(this.tagPosition==="bottom"?i.push({isTag:!0,label:e}):i.unshift({isTag:!0,label:e})),i.slice(0,this.optionsLimit)},valueKeys(){return this.trackBy?this.internalValue.map(e=>e[this.trackBy]):this.internalValue},optionKeys(){return(this.groupValues?this.flatAndStrip(this.options):this.options).map(s=>this.customLabel(s,this.label).toString().toLowerCase())},currentOptionLabel(){return this.multiple?this.searchable?"":this.placeholder:this.internalValue.length?this.getOptionLabel(this.internalValue[0]):this.searchable?"":this.placeholder}},watch:{internalValue:{handler(){this.resetAfter&&this.internalValue.length&&(this.search="",this.$emit("update:modelValue",this.multiple?[]:null))},deep:!0},search(){this.$emit("search-change",this.search)}},emits:["open","search-change","close","select","update:modelValue","remove","tag"],methods:{getValue(){return this.multiple?this.internalValue:this.internalValue.length===0?null:this.internalValue[0]},filterAndFlat(e,s,i){return k(de(s,i,this.groupValues,this.groupLabel,this.customLabel),b(this.groupValues,this.groupLabel))(e)},flatAndStrip(e){return k(b(this.groupValues,this.groupLabel),ue)(e)},updateSearch(e){this.search=e},isExistingOption(e){return this.options?this.optionKeys.indexOf(e)>-1:!1},isSelected(e){const s=this.trackBy?e[this.trackBy]:e;return this.valueKeys.indexOf(s)>-1},isOptionDisabled(e){return!!e.$isDisabled},getOptionLabel(e){if(y(e))return"";if(e.isTag)return e.label;if(e.$isLabel)return e.$groupLabel;const s=this.customLabel(e,this.label);return y(s)?"":s},select(e,s){if(e.$isLabel&&this.groupSelect){this.selectGroup(e);return}if(!(this.blockKeys.indexOf(s)!==-1||this.disabled||e.$isDisabled||e.$isLabel)&&!(this.max&&this.multiple&&this.internalValue.length===this.max)&&!(s==="Tab"&&!this.pointerDirty)){if(e.isTag)this.$emit("tag",e.label,this.id),this.search="",this.closeOnSelect&&!this.multiple&&this.deactivate();else{if(this.isSelected(e)){s!=="Tab"&&this.removeElement(e);return}this.multiple?this.$emit("update:modelValue",this.internalValue.concat([e])):this.$emit("update:modelValue",e),this.$emit("select",e,this.id),this.clearOnSelect&&(this.search="")}this.closeOnSelect&&this.deactivate()}},selectGroup(e){const s=this.options.find(i=>i[this.groupLabel]===e.$groupLabel);if(s){if(this.wholeGroupSelected(s)){this.$emit("remove",s[this.groupValues],this.id);const i=this.internalValue.filter(n=>s[this.groupValues].indexOf(n)===-1);this.$emit("update:modelValue",i)}else{let i=s[this.groupValues].filter(n=>!(this.isOptionDisabled(n)||this.isSelected(n)));this.max&&i.splice(this.max-this.internalValue.length),this.$emit("select",i,this.id),this.$emit("update:modelValue",this.internalValue.concat(i))}this.closeOnSelect&&this.deactivate()}},wholeGroupSelected(e){return e[this.groupValues].every(s=>this.isSelected(s)||this.isOptionDisabled(s))},wholeGroupDisabled(e){return e[this.groupValues].every(this.isOptionDisabled)},removeElement(e,s=!0){if(this.disabled||e.$isDisabled)return;if(!this.allowEmpty&&this.internalValue.length<=1){this.deactivate();return}const i=typeof e=="object"?this.valueKeys.indexOf(e[this.trackBy]):this.valueKeys.indexOf(e);if(this.multiple){const n=this.internalValue.slice(0,i).concat(this.internalValue.slice(i+1));this.$emit("update:modelValue",n)}else this.$emit("update:modelValue",null);this.$emit("remove",e,this.id),this.closeOnSelect&&s&&this.deactivate()},removeLastElement(){this.blockKeys.indexOf("Delete")===-1&&this.search.length===0&&Array.isArray(this.internalValue)&&this.internalValue.length&&this.removeElement(this.internalValue[this.internalValue.length-1],!1)},activate(){this.isOpen||this.disabled||(this.adjustPosition(),this.groupValues&&this.pointer===0&&this.filteredOptions.length&&(this.pointer=1),this.isOpen=!0,this.searchable?(this.preserveSearch||(this.search=""),this.preventAutofocus||this.$nextTick(()=>this.$refs.search&&this.$refs.search.focus())):this.preventAutofocus||typeof this.$el<"u"&&this.$el.focus(),this.$emit("open",this.id))},deactivate(){this.isOpen&&(this.isOpen=!1,this.searchable?typeof this.$refs.search<"u"&&this.$refs.search.blur():typeof this.$el<"u"&&this.$el.blur(),this.preserveSearch||(this.search=""),this.$emit("close",this.getValue(),this.id))},toggle(){this.isOpen?this.deactivate():this.activate()},adjustPosition(){if(typeof window>"u")return;const e=this.$el.getBoundingClientRect().top,s=window.innerHeight-this.$el.getBoundingClientRect().bottom;s>this.maxHeight||s>e||this.openDirection==="below"||this.openDirection==="bottom"?(this.preferredOpenDirection="below",this.optimizedHeight=Math.min(s-40,this.maxHeight)):(this.preferredOpenDirection="above",this.optimizedHeight=Math.min(e-40,this.maxHeight))}}},pe={data(){return{pointer:0,pointerDirty:!1}},props:{showPointer:{type:Boolean,default:!0},optionHeight:{type:Number,default:40}},computed:{pointerPosition(){return this.pointer*this.optionHeight},visibleElements(){return this.optimizedHeight/this.optionHeight}},watch:{filteredOptions(){this.pointerAdjust()},isOpen(){this.pointerDirty=!1},pointer(){this.$refs.search&&this.$refs.search.setAttribute("aria-activedescendant",this.id+"-"+this.pointer.toString())}},methods:{optionHighlight(e,s){return{"multiselect__option--highlight":e===this.pointer&&this.showPointer,"multiselect__option--selected":this.isSelected(s)}},groupHighlight(e,s){if(!this.groupSelect)return["multiselect__option--disabled",{"multiselect__option--group":s.$isLabel}];const i=this.options.find(n=>n[this.groupLabel]===s.$groupLabel);return i&&!this.wholeGroupDisabled(i)?["multiselect__option--group",{"multiselect__option--highlight":e===this.pointer&&this.showPointer},{"multiselect__option--group-selected":this.wholeGroupSelected(i)}]:"multiselect__option--disabled"},addPointerElement({key:e}="Enter"){this.filteredOptions.length>0&&this.select(this.filteredOptions[this.pointer],e),this.pointerReset()},pointerForward(){this.pointer<this.filteredOptions.length-1&&(this.pointer++,this.$refs.list.scrollTop<=this.pointerPosition-(this.visibleElements-1)*this.optionHeight&&(this.$refs.list.scrollTop=this.pointerPosition-(this.visibleElements-1)*this.optionHeight),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()),this.pointerDirty=!0},pointerBackward(){this.pointer>0?(this.pointer--,this.$refs.list.scrollTop>=this.pointerPosition&&(this.$refs.list.scrollTop=this.pointerPosition),this.filteredOptions[this.pointer]&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerBackward()):this.filteredOptions[this.pointer]&&this.filteredOptions[0].$isLabel&&!this.groupSelect&&this.pointerForward(),this.pointerDirty=!0},pointerReset(){this.closeOnSelect&&(this.pointer=0,this.$refs.list&&(this.$refs.list.scrollTop=0))},pointerAdjust(){this.pointer>=this.filteredOptions.length-1&&(this.pointer=this.filteredOptions.length?this.filteredOptions.length-1:0),this.filteredOptions.length>0&&this.filteredOptions[this.pointer].$isLabel&&!this.groupSelect&&this.pointerForward()},pointerSet(e){this.pointer=e,this.pointerDirty=!0}}};const ce={name:"vue-multiselect",mixins:[he,pe],compatConfig:{MODE:3,ATTR_ENUMERATED_COERCION:!1},props:{name:{type:String,default:""},modelValue:{type:null,default(){return[]}},selectLabel:{type:String,default:"Press enter to select"},selectGroupLabel:{type:String,default:"Press enter to select group"},selectedLabel:{type:String,default:"Selected"},deselectLabel:{type:String,default:"Press enter to remove"},deselectGroupLabel:{type:String,default:"Press enter to deselect group"},showLabels:{type:Boolean,default:!0},limit:{type:Number,default:99999},maxHeight:{type:Number,default:300},limitText:{type:Function,default:e=>`and ${e} more`},loading:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},openDirection:{type:String,default:""},showNoOptions:{type:Boolean,default:!0},showNoResults:{type:Boolean,default:!0},tabindex:{type:Number,default:0}},computed:{hasOptionGroup(){return this.groupValues&&this.groupLabel&&this.groupSelect},isSingleLabelVisible(){return(this.singleValue||this.singleValue===0)&&(!this.isOpen||!this.searchable)&&!this.visibleValues.length},isPlaceholderVisible(){return!this.internalValue.length&&(!this.searchable||!this.isOpen)},visibleValues(){return this.multiple?this.internalValue.slice(0,this.limit):[]},singleValue(){return this.internalValue[0]},deselectLabelText(){return this.showLabels?this.deselectLabel:""},deselectGroupLabelText(){return this.showLabels?this.deselectGroupLabel:""},selectLabelText(){return this.showLabels?this.selectLabel:""},selectGroupLabelText(){return this.showLabels?this.selectGroupLabel:""},selectedLabelText(){return this.showLabels?this.selectedLabel:""},inputStyle(){return this.searchable||this.multiple&&this.modelValue&&this.modelValue.length?this.isOpen?{width:"100%"}:{width:"0",position:"absolute",padding:"0"}:""},contentStyle(){return this.options.length?{display:"inline-block"}:{display:"block"}},isAbove(){return this.openDirection==="above"||this.openDirection==="top"?!0:this.openDirection==="below"||this.openDirection==="bottom"?!1:this.preferredOpenDirection==="above"},showSearchInput(){return this.searchable&&(this.hasSingleSelectedSlot&&(this.visibleSingleValue||this.visibleSingleValue===0)?this.isOpen:!0)}}},me=["tabindex","aria-owns"],fe={ref:"tags",class:"multiselect__tags"},ge={class:"multiselect__tags-wrap"},ye=["textContent"],be=["onKeypress","onMousedown"],ve=["textContent"],we={class:"multiselect__spinner"},Se=["name","id","placeholder","value","disabled","tabindex","aria-controls"],ke=["id"],Te={key:0},Ee={class:"multiselect__option"},$e=["id","role"],Ve=["onClick","onMouseenter","data-select","data-selected","data-deselect"],Be=["data-select","data-deselect","onMouseenter","onMousedown"],Oe={class:"multiselect__option"},Ce={class:"multiselect__option"};function De(e,s,i,n,r,a){return t.openBlock(),t.createElementBlock("div",{tabindex:e.searchable?-1:i.tabindex,class:t.normalizeClass([{"multiselect--active":e.isOpen,"multiselect--disabled":i.disabled,"multiselect--above":a.isAbove,"multiselect--has-options-group":a.hasOptionGroup},"multiselect"]),onFocus:s[13]||(s[13]=l=>e.activate()),onBlur:s[14]||(s[14]=l=>e.searchable?!1:e.deactivate()),onKeydown:[s[15]||(s[15]=t.withKeys(t.withModifiers(l=>e.pointerForward(),["self","prevent"]),["down"])),s[16]||(s[16]=t.withKeys(t.withModifiers(l=>e.pointerBackward(),["self","prevent"]),["up"]))],onKeypress:s[17]||(s[17]=t.withKeys(t.withModifiers(l=>e.addPointerElement(l),["stop","self"]),["enter","tab"])),onKeyup:s[18]||(s[18]=t.withKeys(l=>e.deactivate(),["esc"])),role:"combobox","aria-owns":"listbox-"+e.id},[t.renderSlot(e.$slots,"caret",{toggle:e.toggle},()=>[t.createElementVNode("div",{onMousedown:s[0]||(s[0]=t.withModifiers(l=>e.toggle(),["prevent","stop"])),class:"multiselect__select"},null,32)]),t.renderSlot(e.$slots,"clear",{search:e.search}),t.createElementVNode("div",fe,[t.renderSlot(e.$slots,"selection",{search:e.search,remove:e.removeElement,values:a.visibleValues,isOpen:e.isOpen},()=>[t.withDirectives(t.createElementVNode("div",ge,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(a.visibleValues,(l,o)=>t.renderSlot(e.$slots,"tag",{option:l,search:e.search,remove:e.removeElement},()=>[(t.openBlock(),t.createElementBlock("span",{class:"multiselect__tag",key:o},[t.createElementVNode("span",{textContent:t.toDisplayString(e.getOptionLabel(l))},null,8,ye),t.createElementVNode("i",{tabindex:"1",onKeypress:t.withKeys(t.withModifiers(u=>e.removeElement(l),["prevent"]),["enter"]),onMousedown:t.withModifiers(u=>e.removeElement(l),["prevent"]),class:"multiselect__tag-icon"},null,40,be)]))])),256))],512),[[t.vShow,a.visibleValues.length>0]]),e.internalValue&&e.internalValue.length>i.limit?t.renderSlot(e.$slots,"limit",{key:0},()=>[t.createElementVNode("strong",{class:"multiselect__strong",textContent:t.toDisplayString(i.limitText(e.internalValue.length-i.limit))},null,8,ve)]):t.createCommentVNode("",!0)]),t.createVNode(t.Transition,{name:"multiselect__loading"},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"loading",{},()=>[t.withDirectives(t.createElementVNode("div",we,null,512),[[t.vShow,i.loading]])])]),_:3}),e.searchable?(t.openBlock(),t.createElementBlock("input",{key:0,ref:"search",name:i.name,id:e.id,type:"text",autocomplete:"off",spellcheck:"false",placeholder:e.placeholder,style:t.normalizeStyle(a.inputStyle),value:e.search,disabled:i.disabled,tabindex:i.tabindex,onInput:s[1]||(s[1]=l=>e.updateSearch(l.target.value)),onFocus:s[2]||(s[2]=t.withModifiers(l=>e.activate(),["prevent"])),onBlur:s[3]||(s[3]=t.withModifiers(l=>e.deactivate(),["prevent"])),onKeyup:s[4]||(s[4]=t.withKeys(l=>e.deactivate(),["esc"])),onKeydown:[s[5]||(s[5]=t.withKeys(t.withModifiers(l=>e.pointerForward(),["prevent"]),["down"])),s[6]||(s[6]=t.withKeys(t.withModifiers(l=>e.pointerBackward(),["prevent"]),["up"])),s[8]||(s[8]=t.withKeys(t.withModifiers(l=>e.removeLastElement(),["stop"]),["delete"]))],onKeypress:s[7]||(s[7]=t.withKeys(t.withModifiers(l=>e.addPointerElement(l),["prevent","stop","self"]),["enter"])),class:"multiselect__input","aria-controls":"listbox-"+e.id},null,44,Se)):t.createCommentVNode("",!0),a.isSingleLabelVisible?(t.openBlock(),t.createElementBlock("span",{key:1,class:"multiselect__single",onMousedown:s[9]||(s[9]=t.withModifiers((...l)=>e.toggle&&e.toggle(...l),["prevent"]))},[t.renderSlot(e.$slots,"singleLabel",{option:a.singleValue},()=>[t.createTextVNode(t.toDisplayString(e.currentOptionLabel),1)])],32)):t.createCommentVNode("",!0),a.isPlaceholderVisible?(t.openBlock(),t.createElementBlock("span",{key:2,class:"multiselect__placeholder",onMousedown:s[10]||(s[10]=t.withModifiers((...l)=>e.toggle&&e.toggle(...l),["prevent"]))},[t.renderSlot(e.$slots,"placeholder",{},()=>[t.createTextVNode(t.toDisplayString(e.placeholder),1)])],32)):t.createCommentVNode("",!0)],512),t.createVNode(t.Transition,{name:"multiselect"},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{class:t.normalizeClass(["multiselect__content-wrapper",e.$attrs.class]),onFocus:s[11]||(s[11]=(...l)=>e.activate&&e.activate(...l)),tabindex:"-1",onMousedown:s[12]||(s[12]=t.withModifiers(()=>{},["prevent"])),style:t.normalizeStyle({maxHeight:e.optimizedHeight+"px"}),ref:"list"},[t.createElementVNode("ul",{class:"multiselect__content",style:t.normalizeStyle(a.contentStyle),role:"listbox",id:"listbox-"+e.id},[t.renderSlot(e.$slots,"beforeList"),e.multiple&&e.max===e.internalValue.length?(t.openBlock(),t.createElementBlock("li",Te,[t.createElementVNode("span",Ee,[t.renderSlot(e.$slots,"maxElements",{},()=>[t.createTextVNode("Maximum of "+t.toDisplayString(e.max)+" options selected. First remove a selected option to select another.",1)])])])):t.createCommentVNode("",!0),!e.max||e.internalValue.length<e.max?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.filteredOptions,(l,o)=>(t.openBlock(),t.createElementBlock("li",{class:"multiselect__element",key:o,id:e.id+"-"+o,role:l&&(l.$isLabel||l.$isDisabled)?null:"option"},[l&&(l.$isLabel||l.$isDisabled)?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock("span",{key:0,class:t.normalizeClass([e.optionHighlight(o,l),"multiselect__option"]),onClick:t.withModifiers(u=>e.select(l),["stop"]),onMouseenter:t.withModifiers(u=>e.pointerSet(o),["self"]),"data-select":l&&l.isTag?e.tagPlaceholder:a.selectLabelText,"data-selected":a.selectedLabelText,"data-deselect":a.deselectLabelText},[t.renderSlot(e.$slots,"option",{option:l,search:e.search,index:o},()=>[t.createElementVNode("span",null,t.toDisplayString(e.getOptionLabel(l)),1)])],42,Ve)),l&&(l.$isLabel||l.$isDisabled)?(t.openBlock(),t.createElementBlock("span",{key:1,"data-select":e.groupSelect&&a.selectGroupLabelText,"data-deselect":e.groupSelect&&a.deselectGroupLabelText,class:t.normalizeClass([e.groupHighlight(o,l),"multiselect__option"]),onMouseenter:t.withModifiers(u=>e.groupSelect&&e.pointerSet(o),["self"]),onMousedown:t.withModifiers(u=>e.selectGroup(l),["prevent"])},[t.renderSlot(e.$slots,"option",{option:l,search:e.search,index:o},()=>[t.createElementVNode("span",null,t.toDisplayString(e.getOptionLabel(l)),1)])],42,Be)):t.createCommentVNode("",!0)],8,$e))),128)):t.createCommentVNode("",!0),t.withDirectives(t.createElementVNode("li",null,[t.createElementVNode("span",Oe,[t.renderSlot(e.$slots,"noResult",{search:e.search},()=>[t.createTextVNode("No elements found. Consider changing the search query.")])])],512),[[t.vShow,i.showNoResults&&e.filteredOptions.length===0&&e.search&&!i.loading]]),t.withDirectives(t.createElementVNode("li",null,[t.createElementVNode("span",Ce,[t.renderSlot(e.$slots,"noOptions",{},()=>[t.createTextVNode("List is empty.")])])],512),[[t.vShow,i.showNoOptions&&(e.options.length===0||a.hasOptionGroup===!0&&e.filteredOptions.length===0)&&!e.search&&!i.loading]]),t.renderSlot(e.$slots,"afterList")],12,ke)],38),[[t.vShow,e.isOpen]])]),_:3})],42,me)}const Le=m._export_sfc(ce,[["render",De]]);const Me={class:"w-100 o-scroll"},Ne={key:1,class:"w-max flex-nowrap flex"},Ae={__name:"Publics",setup(e){let s=t.ref(null);t.onMounted(async()=>{s.value=await v.actions.read({user:m.state.user._id,sort:"numberOfMemberships",limit:10,types:["public"]})});const i=({membership:n,isMember:r,targetId:a})=>{B.mutations.handleMembershipUpdate(s.value,n,r,a)};return(n,r)=>(t.openBlock(),t.createElementBlock("div",Me,[!t.unref(s)||t.unref(s).length<1?(t.openBlock(),t.createBlock(V._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"})):(t.openBlock(),t.createElementBlock("div",Ne,[t.unref(s)?(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:0},t.renderList(t.unref(s),(a,l)=>(t.openBlock(),t.createBlock(v._sfc_main,{key:a._id,organization:a,user:m.state.user,onUpdateMembership:i,class:t.normalizeClass(["flex-child-shrink-0 flex-child",{"mn-r-small":l!==t.unref(s).length-1}])},null,8,["organization","user","class"]))),128)):t.createCommentVNode("",!0)]))]))}};exports.SelectMulti=Le;exports._sfc_main=re;exports._sfc_main$1=Ae;
|
@@ -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
|
+
};
|