@ozdao/prometheus-framework 0.0.85 → 0.0.86
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-628f013e.mjs +138 -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/Comments-c092550f.mjs +76 -0
- package/dist/EditProductImages-61ff4321.mjs +236 -0
- package/dist/Feed-926cf4f3.mjs +355 -0
- package/dist/Feed-a31c43c2.mjs +423 -0
- package/dist/PlaceholderUserpic-995da0fc.mjs +28 -0
- package/dist/Popup-0c791801.mjs +76 -0
- package/dist/Product-6c37ef35.js +7 -0
- package/dist/Product-7087b358.mjs +837 -0
- package/dist/ProductEdit-c5067942.mjs +113 -0
- package/dist/ProfileBlogposts-79d5c858.mjs +63 -0
- package/dist/ProfileComments-48f3d4bc.mjs +43 -0
- package/dist/ProfileEvents-20695376.mjs +55 -0
- package/dist/ProfileLikes-503712ec.mjs +43 -0
- package/dist/ProfileOrganizations-3f305f4e.mjs +210 -0
- package/dist/ProfileOrganizations-50fce34e.js +1 -0
- package/dist/Publics-49dbeafc.js +1 -0
- package/dist/Publics-b0fad2b0.mjs +1926 -0
- package/dist/UploadImage-d1dbc280.mjs +99 -0
- package/dist/auth-35ef1791.mjs +1502 -0
- package/dist/auth.client.js +3 -3
- package/dist/auth.validation-29113f37.mjs +20 -0
- package/dist/categories-d669f3af.mjs +225 -0
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +11 -11
- package/dist/events.client.js +9 -9
- package/dist/modules/icons/entities/IconCommunity.vue.d.ts +2 -0
- package/dist/organizations.client.cjs +2 -2
- package/dist/organizations.client.js +17 -17
- 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 +244 -207
- package/package.json +1 -1
- package/src/modules/icons/entities/IconCommunity.vue +8 -0
- package/src/modules/organizations/components/blocks/CardOrganization.vue +2 -2
- package/src/modules/organizations/components/sections/Publics.vue +1 -0
- package/src/modules/organizations/controllers/organizations.controller.js +1 -1
- package/src/modules/users/components/pages/Profile.vue +15 -4
@@ -0,0 +1,113 @@
|
|
1
|
+
import { withAsyncContext as u, openBlock as s, createElementBlock as c, createElementVNode as t, createVNode as o, unref as x, withCtx as y, createTextVNode as z, Fragment as k, renderList as w, createBlock as N } from "vue";
|
2
|
+
import { useRoute as P, useRouter as C } from "vue-router";
|
3
|
+
import { a as I, b as d, _ as $, s as e, c as E } from "./categories-d669f3af.mjs";
|
4
|
+
import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
5
|
+
import { b as L } from "./auth-35ef1791.mjs";
|
6
|
+
import { C as A } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-628f013e.mjs";
|
7
|
+
import "vue-i18n";
|
8
|
+
import { _ as B, a as m, b as V } from "./EditProductImages-61ff4321.mjs";
|
9
|
+
import "./globals-96ba60e4.mjs";
|
10
|
+
import "./vuex.esm-bundler-57d8b6ba.mjs";
|
11
|
+
import "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
|
12
|
+
const D = { class: "for-transition w-100" }, M = { class: "pd-b-zero pd-t-zero pd-thin" }, R = { class: "pd-thin" }, S = { class: "flex-nowrap flex bg-grey pd-medium radius-big" }, T = {
|
13
|
+
key: 0,
|
14
|
+
class: "mn-r-auto"
|
15
|
+
}, F = {
|
16
|
+
key: 1,
|
17
|
+
class: "mn-r-auto"
|
18
|
+
}, j = { class: "flex-nowrap flex pd-thin" }, q = { class: "pd-b-zero pd-t-zero pd-thin cols-2 gap-thin" }, G = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, H = /* @__PURE__ */ t("h3", { class: "mn-semi" }, "Profile", -1), J = { class: "mn-semi" }, K = /* @__PURE__ */ t("h5", null, "Categories", -1), O = { class: "" }, Q = { class: "mn-thin bg-grey pd-medium o-hidden radius-big" }, U = /* @__PURE__ */ t("h3", { class: "mn-semi" }, "Images", -1), le = {
|
19
|
+
__name: "ProductEdit",
|
20
|
+
async setup(W) {
|
21
|
+
let i, r;
|
22
|
+
const a = P(), _ = C();
|
23
|
+
[i, r] = u(() => I.fetchCategories()), await i, r(), a.params.product && ([i, r] = u(() => d.read({ _id: a.params.product })), await i, r());
|
24
|
+
function p() {
|
25
|
+
e.current.information.push({ name: "", value: "" });
|
26
|
+
}
|
27
|
+
function f(n) {
|
28
|
+
e.current.information.splice(n, 1);
|
29
|
+
}
|
30
|
+
function h() {
|
31
|
+
e.current.localization.push({ locale: "", text: "" });
|
32
|
+
}
|
33
|
+
function b(n) {
|
34
|
+
e.current.localization.splice(n, 1);
|
35
|
+
}
|
36
|
+
function g() {
|
37
|
+
a.params.product ? d.update(a.params.product, e.current) : d.create(a.params._id, e.current);
|
38
|
+
}
|
39
|
+
function v() {
|
40
|
+
_.push({ name: "ProductEdit", params: { _id: a.params._id, product: e.current._id } });
|
41
|
+
}
|
42
|
+
return (n, X) => (s(), c("div", D, [
|
43
|
+
t("div", M, [
|
44
|
+
o($, { class: "pd-medium bg-grey radius-big" })
|
45
|
+
]),
|
46
|
+
t("div", R, [
|
47
|
+
t("header", S, [
|
48
|
+
x(a).params.product ? (s(), c("h1", T, "Edit Product")) : (s(), c("h1", F, "Create Product")),
|
49
|
+
t("section", j, [
|
50
|
+
o(L, {
|
51
|
+
submit: g,
|
52
|
+
callback: v
|
53
|
+
}, {
|
54
|
+
default: y(() => [
|
55
|
+
z("Save Product")
|
56
|
+
]),
|
57
|
+
_: 1
|
58
|
+
})
|
59
|
+
])
|
60
|
+
])
|
61
|
+
]),
|
62
|
+
t("div", q, [
|
63
|
+
t("div", G, [
|
64
|
+
H,
|
65
|
+
o(B, {
|
66
|
+
product: e.current
|
67
|
+
}, null, 8, ["product"]),
|
68
|
+
t("div", J, [
|
69
|
+
K,
|
70
|
+
(s(!0), c(k, null, w(E.all, (l, Y) => (s(), N(A, {
|
71
|
+
label: l.name,
|
72
|
+
name: "categories",
|
73
|
+
value: l.url,
|
74
|
+
class: "w-100 mn-t-small bg-white radius-small pd-small",
|
75
|
+
radio: e.current.category
|
76
|
+
}, null, 8, ["label", "value", "radio"]))), 256))
|
77
|
+
]),
|
78
|
+
o(m, {
|
79
|
+
items: e.current.information,
|
80
|
+
title: "Parameters",
|
81
|
+
emptyMessage: "No parameters",
|
82
|
+
addButtonLabel: "Add parameter",
|
83
|
+
keyName: "name",
|
84
|
+
valueName: "value",
|
85
|
+
onAddInfo: p,
|
86
|
+
onDeleteInfo: f
|
87
|
+
}, null, 8, ["items"]),
|
88
|
+
o(m, {
|
89
|
+
items: e.current.localization,
|
90
|
+
title: "Localization",
|
91
|
+
emptyMessage: "No localizations",
|
92
|
+
addButtonLabel: "Add localization",
|
93
|
+
keyName: "locale",
|
94
|
+
valueName: "text",
|
95
|
+
onAddInfo: h,
|
96
|
+
onDeleteInfo: b
|
97
|
+
}, null, 8, ["items"])
|
98
|
+
]),
|
99
|
+
t("div", O, [
|
100
|
+
t("div", Q, [
|
101
|
+
U,
|
102
|
+
o(V, {
|
103
|
+
product: e.current
|
104
|
+
}, null, 8, ["product"])
|
105
|
+
])
|
106
|
+
])
|
107
|
+
])
|
108
|
+
]));
|
109
|
+
}
|
110
|
+
};
|
111
|
+
export {
|
112
|
+
le as default
|
113
|
+
};
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import { ref as f, watch as g, openBlock as t, createElementBlock as d, createElementVNode as p, unref as u, createCommentVNode as s, createBlock as l } from "vue";
|
2
|
+
import { useRoute as v, useRouter as y } from "vue-router";
|
3
|
+
import { _ as b } from "./Tab-054b61f7.mjs";
|
4
|
+
import { _ as n } from "./Feed-a31c43c2.mjs";
|
5
|
+
import { s as o } from "./auth-35ef1791.mjs";
|
6
|
+
import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
7
|
+
import "./EmptyState-34d85f10.mjs";
|
8
|
+
import "./CardHeader-ce5a1a75.mjs";
|
9
|
+
import "./PlaceholderUserpic-995da0fc.mjs";
|
10
|
+
import "./globals-96ba60e4.mjs";
|
11
|
+
import "vue-i18n";
|
12
|
+
const h = { class: "pd-thin" }, k = { class: "mn-medium flex-v-center flex-nowrap flex" }, w = /* @__PURE__ */ p("h2", { class: "mn-r-medium" }, "Posts", -1), F = {
|
13
|
+
__name: "ProfileBlogposts",
|
14
|
+
setup(q) {
|
15
|
+
const e = v(), c = y();
|
16
|
+
let _ = e.query.tab ? e.query.tab : "posts";
|
17
|
+
const r = f(_);
|
18
|
+
return e.query.tab = r.value, g(r, (i) => {
|
19
|
+
c.push({ query: { ...e.query, tab: i } });
|
20
|
+
}), (i, a) => (t(), d("div", h, [
|
21
|
+
p("header", k, [
|
22
|
+
w,
|
23
|
+
o.user._id === u(e).params._id ? (t(), d("button", {
|
24
|
+
key: 0,
|
25
|
+
onClick: a[0] || (a[0] = (m) => i.$router.push({
|
26
|
+
name: "Create BlogPost"
|
27
|
+
})),
|
28
|
+
class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
|
29
|
+
}, " + ")) : s("", !0)
|
30
|
+
]),
|
31
|
+
o.user._id === u(e).params._id ? (t(), l(b, {
|
32
|
+
key: 0,
|
33
|
+
selected: r.value,
|
34
|
+
"onUpdate:selected": a[1] || (a[1] = (m) => r.value = m),
|
35
|
+
tabs: [
|
36
|
+
{ name: "My posts", value: "posts" },
|
37
|
+
{ name: "Drafts", value: "drafts" },
|
38
|
+
{ name: "Following", value: "following" }
|
39
|
+
],
|
40
|
+
class: "mn-small o-hidden h5 radius-big bg-grey"
|
41
|
+
}, null, 8, ["selected"])) : s("", !0),
|
42
|
+
r.value === "posts" ? (t(), l(n, {
|
43
|
+
key: 1,
|
44
|
+
user: o.user._id,
|
45
|
+
creator: u(e).params._id
|
46
|
+
}, null, 8, ["user", "creator"])) : s("", !0),
|
47
|
+
r.value === "drafts" ? (t(), l(n, {
|
48
|
+
key: 2,
|
49
|
+
user: o.user._id,
|
50
|
+
creator: u(e).params._id,
|
51
|
+
status: "draft"
|
52
|
+
}, null, 8, ["user", "creator"])) : s("", !0),
|
53
|
+
r.value === "following" ? (t(), l(n, {
|
54
|
+
key: 3,
|
55
|
+
user: o.user._id,
|
56
|
+
category: "following"
|
57
|
+
}, null, 8, ["user"])) : s("", !0)
|
58
|
+
]));
|
59
|
+
}
|
60
|
+
};
|
61
|
+
export {
|
62
|
+
F as default
|
63
|
+
};
|
@@ -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-054b61f7.mjs";
|
4
|
+
import { _ as y } from "./Feed-a31c43c2.mjs";
|
5
|
+
import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
6
|
+
import "./EmptyState-34d85f10.mjs";
|
7
|
+
import "./auth-35ef1791.mjs";
|
8
|
+
import "./globals-96ba60e4.mjs";
|
9
|
+
import "vue-i18n";
|
10
|
+
import "./CardHeader-ce5a1a75.mjs";
|
11
|
+
import "./PlaceholderUserpic-995da0fc.mjs";
|
12
|
+
const g = { class: "pd-thin" }, q = /* @__PURE__ */ m("header", { class: "mn-medium flex-v-center flex-nowrap flex" }, [
|
13
|
+
/* @__PURE__ */ m("h2", { class: "mn-r-medium" }, "Comments")
|
14
|
+
], -1), M = {
|
15
|
+
__name: "ProfileComments",
|
16
|
+
setup(w) {
|
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", g, [
|
23
|
+
q,
|
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
|
+
M as default
|
43
|
+
};
|
@@ -0,0 +1,55 @@
|
|
1
|
+
import { ref as f, watch as v, openBlock as a, createElementBlock as l, createElementVNode as d, unref as s, createCommentVNode as o, createVNode as b, createBlock as p } from "vue";
|
2
|
+
import { useRoute as h, useRouter as w } from "vue-router";
|
3
|
+
import { _ as y } from "./Tab-054b61f7.mjs";
|
4
|
+
import { _ as c } from "./Feed-926cf4f3.mjs";
|
5
|
+
import { s as n } from "./auth-35ef1791.mjs";
|
6
|
+
import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
7
|
+
import "./EmptyState-34d85f10.mjs";
|
8
|
+
import "./CardHeader-ce5a1a75.mjs";
|
9
|
+
import "./PlaceholderUserpic-995da0fc.mjs";
|
10
|
+
import "./globals-96ba60e4.mjs";
|
11
|
+
import "vue-i18n";
|
12
|
+
const g = { class: "pd-thin" }, k = { class: "mn-medium flex-v-center flex-nowrap flex" }, q = /* @__PURE__ */ d("h2", { class: "mn-r-medium" }, " Events ", -1), j = {
|
13
|
+
__name: "ProfileEvents",
|
14
|
+
setup(x) {
|
15
|
+
const e = h(), i = w();
|
16
|
+
let _ = e.query.tab ? e.query.tab : "owner";
|
17
|
+
const r = f(_);
|
18
|
+
return e.query.tab = r.value, v(r, (u) => {
|
19
|
+
i.push({ query: { ...e.query, tab: u } });
|
20
|
+
}), (u, t) => (a(), l("div", g, [
|
21
|
+
d("header", k, [
|
22
|
+
q,
|
23
|
+
n.user._id === s(e).params._id ? (a(), l("button", {
|
24
|
+
key: 0,
|
25
|
+
onClick: t[0] || (t[0] = (m) => s(i).push({ name: "Create BlogPost" })),
|
26
|
+
class: "radius-100p i-big hover-scale-1 cursor-pointer t-white bg-second"
|
27
|
+
}, " + ")) : o("", !0)
|
28
|
+
]),
|
29
|
+
b(y, {
|
30
|
+
selected: r.value,
|
31
|
+
"onUpdate:selected": t[1] || (t[1] = (m) => r.value = m),
|
32
|
+
tabs: [
|
33
|
+
{ name: "Owner", value: "owner" },
|
34
|
+
{ name: "Participant", value: "participant" }
|
35
|
+
],
|
36
|
+
class: "mn-small o-hidden h5 radius-big bg-grey"
|
37
|
+
}, null, 8, ["selected"]),
|
38
|
+
r.value === "owner" ? (a(), p(c, {
|
39
|
+
key: 0,
|
40
|
+
user: n.user._id,
|
41
|
+
owner: s(e).params._id,
|
42
|
+
sortOrder: "asc"
|
43
|
+
}, null, 8, ["user", "owner"])) : o("", !0),
|
44
|
+
r.value === "participant" ? (a(), p(c, {
|
45
|
+
key: 1,
|
46
|
+
user: n.user._id,
|
47
|
+
participant: s(e).params._id,
|
48
|
+
sortOrder: "desc"
|
49
|
+
}, null, 8, ["user", "participant"])) : o("", !0)
|
50
|
+
]));
|
51
|
+
}
|
52
|
+
};
|
53
|
+
export {
|
54
|
+
j as default
|
55
|
+
};
|
@@ -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-054b61f7.mjs";
|
4
|
+
import { _ as y } from "./Feed-a31c43c2.mjs";
|
5
|
+
import "./Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
6
|
+
import "./EmptyState-34d85f10.mjs";
|
7
|
+
import "./auth-35ef1791.mjs";
|
8
|
+
import "./globals-96ba60e4.mjs";
|
9
|
+
import "vue-i18n";
|
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,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 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;
|