@ozdao/prometheus-framework 0.1.62 → 0.1.66
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/BackofficeGallery-30022293.js +1 -0
- package/dist/BackofficeGallery-f64daa0d.mjs +264 -0
- package/dist/BackofficeReports-cb4b180d.mjs +44 -0
- package/dist/BackofficeReports-d021871f.js +1 -0
- package/dist/BlockTags-8cddaef7.js +1 -0
- package/dist/BlockTags-ee310572.mjs +853 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Button-7643c9aa.js +1 -0
- package/dist/Button-9e1a9284.mjs +226 -0
- package/dist/Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/ButtonToggleMembership-7ee4dc8e.mjs +90 -0
- package/dist/ButtonToggleMembership-b9352cec.js +1 -0
- package/dist/CardBlogpost-3c92fbc9.mjs +246 -0
- package/dist/CardBlogpost-c7364b1e.js +1 -0
- package/dist/CardOrganization-647cb571.js +1 -0
- package/dist/CardOrganization-facb77f7.mjs +234 -0
- package/dist/CardProduct-92affca1.js +1 -0
- package/dist/CardProduct-fca53299.mjs +193 -0
- package/dist/Checkbox-5dbe7b23.mjs +62 -0
- package/dist/Checkbox-76f09248.js +1 -0
- package/dist/Chips-0fdb31c9.js +1 -0
- package/dist/Chips-f1a0d085.mjs +214 -0
- package/dist/Community-534d473c.mjs +132 -0
- package/dist/Community-e9aff969.js +1 -0
- package/dist/Dashboard-91d73bc5.js +1 -0
- package/dist/Dashboard-ea9035bc.mjs +152 -0
- package/dist/Dropdown-31115457.js +1 -0
- package/dist/Dropdown-cab3605b.mjs +146 -0
- package/dist/EULA-aba6a807.js +1 -0
- package/dist/EULA-e05236af.mjs +4210 -0
- package/dist/EditOrder-94bbebff.mjs +221 -0
- package/dist/EditOrder-c070d474.js +1 -0
- package/dist/EmptyState-d65bab5b.js +1 -0
- package/dist/EmptyState-e404b05d.mjs +36 -0
- package/dist/Events-46ae8fc6.mjs +123 -0
- package/dist/Events-813c8c7b.js +1 -0
- package/dist/Feed-2d443ad2.mjs +146 -0
- package/dist/Feed-3a4e7a9c.js +1 -0
- package/dist/Feed-8b554fc1.js +1 -0
- package/dist/Feed-98b47c6f.js +1 -0
- package/dist/Feed-a21d6007.mjs +124 -0
- package/dist/Feed-b39138c8.js +1 -0
- package/dist/Feed-c41ef736.mjs +361 -0
- package/dist/Feed-d114330c.mjs +112 -0
- package/dist/Field-e2a43424.js +1 -0
- package/dist/Field-e5ad88d3.mjs +75 -0
- package/dist/Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-0ea8fbf8.js +1 -0
- package/dist/Field.vue_vue_type_style_index_0_scoped_f4a29b0d_lang-4ed993c7.mjs +1 -0
- package/dist/Gallery-46b5f939.js +1 -0
- package/dist/Gallery-762a9c2d.mjs +241 -0
- package/dist/IconChevronRight-a55f838e.js +1 -0
- package/dist/IconChevronRight-fae9d012.mjs +28 -0
- package/dist/IconCommunity-468dc457.mjs +65 -0
- package/dist/IconCommunity-b339e806.js +1 -0
- package/dist/IconCross-5bf93179.js +1 -0
- package/dist/IconCross-84cb1292.mjs +28 -0
- package/dist/IconEdit-9edfd74d.mjs +21 -0
- package/dist/IconEdit-c0469b45.js +1 -0
- package/dist/Image-4dcfddb8.js +9 -0
- package/dist/Image-e0da17ac.mjs +571 -0
- package/dist/LabelGooglePlay-24feb437.mjs +31 -0
- package/dist/LabelGooglePlay-f80e5ff0.js +1 -0
- package/dist/LeftoverAdd-5a8988d9.js +1 -0
- package/dist/LeftoverAdd-c4f37f47.mjs +227 -0
- package/dist/Leftovers-470a1689.js +1 -0
- package/dist/Leftovers-69c7dcd9.mjs +136 -0
- package/dist/Loader-21f016da.js +1 -0
- package/dist/Loader-cd422786.mjs +41 -0
- package/dist/Loader.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Loader.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Members-04273cd4.mjs +114 -0
- package/dist/Members-0685a15f.js +1 -0
- package/dist/Menu-b5d6a0c7.js +1 -0
- package/dist/Menu-dd7645c1.mjs +13 -0
- package/dist/MenuItem-56ae7f94.js +1 -0
- package/dist/MenuItem-6296d02f.mjs +63 -0
- package/dist/Orders-b64e8cb9.js +1 -0
- package/dist/Orders-ff30db05.mjs +75 -0
- package/dist/Organizations-46aab2c8.mjs +73 -0
- package/dist/Organizations-a8627bc5.js +1 -0
- package/dist/Payments-53e5fecf.js +1 -0
- package/dist/Payments-82e545e1.mjs +87 -0
- package/dist/PlaceholderUserpic-14c6ea7e.mjs +28 -0
- package/dist/PlaceholderUserpic-47f6f319.js +1 -0
- package/dist/Popup-0915427c.mjs +74 -0
- package/dist/Popup-795f5c88.js +1 -0
- package/dist/Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Product-7e001b81.js +7 -0
- package/dist/Product-f3f42158.mjs +653 -0
- package/dist/ProductEdit-959b3cd3.mjs +295 -0
- package/dist/ProductEdit-bae5e898.js +1 -0
- package/dist/ProductsBackoffice-0716123f.js +1 -0
- package/dist/ProductsBackoffice-a36ecbc6.mjs +85 -0
- package/dist/ProfileBlogposts-c790d1b2.js +1 -0
- package/dist/ProfileBlogposts-f43cf32e.mjs +79 -0
- package/dist/ProfileEvents-12f80fff.mjs +70 -0
- package/dist/ProfileEvents-585570a3.js +1 -0
- package/dist/ProfileOrganizations-bbc2cf40.mjs +73 -0
- package/dist/ProfileOrganizations-d7103514.js +1 -0
- package/dist/Publics-094f3c2c.mjs +45 -0
- package/dist/Publics-1032c0f4.js +1 -0
- package/dist/Select-11ddabf5.mjs +79 -0
- package/dist/Select-3ca5ab39.js +1 -0
- package/dist/SelectMulti-58704d69.mjs +1038 -0
- package/dist/SelectMulti-c25765cf.js +1 -0
- package/dist/SkeletonBlogpost-95db0fa9.js +1 -0
- package/dist/SkeletonBlogpost-e0621af7.mjs +16 -0
- package/dist/SkeletonEvent-8690422d.mjs +16 -0
- package/dist/SkeletonEvent-eb284de8.js +1 -0
- package/dist/SkeletonEventShort-6c9e3940.js +1 -0
- package/dist/SkeletonEventShort-f030e56f.mjs +16 -0
- package/dist/SkeletonOrganization-5c09cfc5.js +1 -0
- package/dist/SkeletonOrganization-8690422d.mjs +16 -0
- package/dist/Socials-31c06635.mjs +74 -0
- package/dist/Socials-cceaeaf2.js +1 -0
- package/dist/Tab-054b61f7.mjs +46 -0
- package/dist/Tab-2c1e4224.js +1 -0
- package/dist/Tab.vue_vue_type_style_index_0_lang-0ea8fbf8.js +1 -0
- package/dist/Tab.vue_vue_type_style_index_0_lang-4ed993c7.mjs +1 -0
- package/dist/Upload-06d93178.js +1 -0
- package/dist/Upload-23212d9d.mjs +74 -0
- package/dist/UploadImage-0f488170.js +1 -0
- package/dist/UploadImage-3c627d89.mjs +83 -0
- package/dist/UploadImageMultiple-cb6c7188.mjs +58 -0
- package/dist/UploadImageMultiple-eddaac87.js +1 -0
- package/dist/Wallet-2043b611.mjs +24682 -0
- package/dist/Wallet-8fa7386a.js +55 -0
- package/dist/_plugin-vue_export-helper-dad06003.mjs +9 -0
- package/dist/_plugin-vue_export-helper-f246444f.js +1 -0
- package/dist/auth-56dc2ba7.mjs +607 -0
- package/dist/auth-f018f5b3.js +7 -0
- package/dist/auth.client.cjs +7 -0
- package/dist/auth.client.js +3874 -0
- package/dist/auth.validation-c31a60e7.mjs +24 -0
- package/dist/auth.validation-d049b341.js +1 -0
- package/dist/backoffice.client.cjs +1 -0
- package/dist/backoffice.client.js +265 -0
- package/dist/carousel.es-44c501bc.mjs +383 -0
- package/dist/carousel.es-cdfb392c.js +5 -0
- package/dist/categories-5b08da53.mjs +121 -0
- package/dist/categories-7ccd6be9.js +1 -0
- package/dist/click-outside-0b0727d1.js +2 -0
- package/dist/click-outside-6101836c.mjs +19 -0
- package/dist/community.client.cjs +1 -0
- package/dist/community.client.js +692 -0
- package/dist/dribbble-8e8e169b.js +1 -0
- package/dist/dribbble-ae37c2ac.mjs +127 -0
- package/dist/events.client.cjs +2 -0
- package/dist/events.client.js +8885 -0
- package/dist/files.client.cjs +1 -0
- package/dist/files.client.js +1 -0
- package/dist/gallery-d4297191.mjs +54 -0
- package/dist/gallery-f92912df.js +1 -0
- package/dist/gallery.client.cjs +1 -0
- package/dist/gallery.client.js +18 -0
- package/dist/globals-928eb13c.js +1 -0
- package/dist/globals-96ba60e4.mjs +91 -0
- package/dist/globals.client.cjs +1 -0
- package/dist/globals.client.js +12 -0
- package/dist/icons.client.cjs +1 -0
- package/dist/icons.client.js +84 -0
- package/dist/index-a661083c.mjs +934 -0
- package/dist/index-b41aac19.js +2 -0
- package/dist/inputs.validation-d7cef32b.js +1 -0
- package/dist/inputs.validation-db65277a.mjs +83 -0
- package/dist/landing.client.cjs +1 -0
- package/dist/landing.client.js +111 -0
- package/dist/leftovers-5d1ff88b.mjs +67 -0
- package/dist/leftovers-b60180cf.js +1 -0
- package/dist/legal.client.cjs +1 -0
- package/dist/legal.client.js +8512 -0
- package/dist/memberships-12210953.mjs +68 -0
- package/dist/memberships-393765d8.js +1 -0
- package/dist/middlewares.client.cjs +1 -0
- package/dist/middlewares.client.js +1 -0
- package/dist/orders-13c10d49.mjs +85 -0
- package/dist/orders-37f041aa.js +1 -0
- package/dist/organizations-587d5a4d.mjs +122 -0
- package/dist/organizations-b4d902a2.js +1 -0
- package/dist/organizations.client-35b74e44.mjs +2997 -0
- package/dist/organizations.client-f982f55a.js +3 -0
- package/dist/organizations.client.cjs +1 -0
- package/dist/organizations.client.js +86 -0
- package/dist/products-3c43eb18.js +1 -0
- package/dist/products-943fb95e.mjs +107 -0
- package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue.js +2 -78
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +78 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +65 -67
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -61
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +61 -2
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/reports-270f69df.js +1 -0
- package/dist/reports-79cd9459.mjs +91 -0
- package/dist/reports.client.cjs +1 -0
- package/dist/reports.client.js +8 -0
- package/dist/states.validation-3b70f83a.js +1 -0
- package/dist/states.validation-944e334c.mjs +13 -0
- package/dist/style.css +1 -1
- package/dist/users.client.cjs +1 -0
- package/dist/users.client.js +632 -0
- package/dist/vue-draggable-next.esm-bundler-21a209c6.js +10 -0
- package/dist/vue-draggable-next.esm-bundler-ff6e3f52.mjs +1557 -0
- package/dist/vuex.esm-bundler-57d8b6ba.mjs +750 -0
- package/dist/vuex.esm-bundler-685cf29f.js +5 -0
- package/package.json +1 -1
- package/src/modules/auth/components/pages/SignIn.vue +2 -2
@@ -0,0 +1,214 @@
|
|
1
|
+
import { openBlock as o, createElementBlock as i, createElementVNode as d, withModifiers as g, createCommentVNode as a, createBlock as x, toDisplayString as u, Fragment as v, renderList as $, normalizeStyle as P, withCtx as k, reactive as R, watch as E } from "vue";
|
2
|
+
import { useRouter as U } from "vue-router";
|
3
|
+
import { P as z } from "./PlaceholderUserpic-14c6ea7e.mjs";
|
4
|
+
import { D as C, _ as j } from "./Dropdown-cab3605b.mjs";
|
5
|
+
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
6
|
+
import "./auth-56dc2ba7.mjs";
|
7
|
+
import "./memberships-12210953.mjs";
|
8
|
+
import { a as M } from "./index-a661083c.mjs";
|
9
|
+
import { s as b } from "./globals-96ba60e4.mjs";
|
10
|
+
const L = {
|
11
|
+
key: 0,
|
12
|
+
class: "pd-b-zero"
|
13
|
+
}, O = { class: "w-100 flex-v-center flex-nojustify flex" }, S = { class: "w-100 flex-nowrap flex-v-center flex" }, D = ["src"], F = {
|
14
|
+
key: 2,
|
15
|
+
class: "t-semi"
|
16
|
+
}, I = { key: 1 }, A = { key: 2 }, T = { class: "d-block mn-l-auto flex-nowrap flex flex-v-center" }, V = {
|
17
|
+
key: 0,
|
18
|
+
class: "w-4r i-thin"
|
19
|
+
}, B = {
|
20
|
+
style: {
|
21
|
+
position: "absolute",
|
22
|
+
top: "0px",
|
23
|
+
right: "0px"
|
24
|
+
},
|
25
|
+
class: "br-solid br-2px br-white z-index-1 radius-big i-thin bg-second flex flex-center t-white p-small t-semi"
|
26
|
+
}, N = ["src"], H = { class: "bg-black pd-thin radius-small" }, J = /* @__PURE__ */ d("button", { class: "w-100 bg-black br-solid br-1px br-white-transp-20 t-white button-small button" }, " Report ", -1), ne = {
|
27
|
+
__name: "CardHeader",
|
28
|
+
props: [
|
29
|
+
"user",
|
30
|
+
"entity",
|
31
|
+
"entityType",
|
32
|
+
"date",
|
33
|
+
"dateFormatted",
|
34
|
+
"owner",
|
35
|
+
"creator",
|
36
|
+
"members",
|
37
|
+
"membersPhotos",
|
38
|
+
"type"
|
39
|
+
],
|
40
|
+
setup(e) {
|
41
|
+
U();
|
42
|
+
function r(n) {
|
43
|
+
const t = /* @__PURE__ */ new Date(), s = new Date(n), h = Math.abs(t - s), c = Math.floor(h / 1e3), l = Math.floor(c / 60), f = Math.floor(l / 60), y = Math.floor(f / 24), p = Math.floor(y / 7);
|
44
|
+
return p > 0 ? `${p} week${p > 1 ? "s" : ""} ago` : y > 0 ? `${y} day${y > 1 ? "s" : ""} ago` : f > 0 ? `${f} hour${f > 1 ? "s" : ""} ago` : l > 0 ? `${l} minute${l > 1 ? "s" : ""} ago` : "Just now";
|
45
|
+
}
|
46
|
+
return (n, t) => {
|
47
|
+
var s, h;
|
48
|
+
return e.owner ? (o(), i("header", L, [
|
49
|
+
d("div", O, [
|
50
|
+
d("div", S, [
|
51
|
+
e.owner.target.profile.photo.length > 0 && e.type !== "short" ? (o(), i("img", {
|
52
|
+
key: 0,
|
53
|
+
src: (n.FILE_SERVER_URL || "") + e.owner.target.profile.photo,
|
54
|
+
class: "radius-medium mn-r-thin i-thin",
|
55
|
+
onClick: t[0] || (t[0] = g((c) => n.$router.push({
|
56
|
+
name: e.owner.type === "user" ? "User Profile" : "Organization",
|
57
|
+
params: {
|
58
|
+
_id: e.owner.target._id
|
59
|
+
}
|
60
|
+
}), ["stop"]))
|
61
|
+
}, null, 8, D)) : a("", !0),
|
62
|
+
!e.owner.target.profile.photo && e.type !== "short" ? (o(), x(z, {
|
63
|
+
key: 1,
|
64
|
+
class: "radius-medium mn-r-thin i-thin",
|
65
|
+
onClick: t[1] || (t[1] = g((c) => n.$router.push({
|
66
|
+
name: e.owner.type === "user" ? "User Profile" : "Organization",
|
67
|
+
params: {
|
68
|
+
_id: e.owner.target._id
|
69
|
+
}
|
70
|
+
}), ["stop"]))
|
71
|
+
})) : a("", !0),
|
72
|
+
e.type !== "short" ? (o(), i("span", F, [
|
73
|
+
d("span", {
|
74
|
+
onClick: t[2] || (t[2] = g((c) => n.$router.push({
|
75
|
+
name: e.owner.type === "user" ? "User Profile" : "Organization",
|
76
|
+
params: {
|
77
|
+
_id: e.owner.target._id
|
78
|
+
}
|
79
|
+
}), ["stop"]))
|
80
|
+
}, u(e.owner.target.profile.name), 1),
|
81
|
+
!e.creator.hidden && e.owner.target.profile.name !== ((s = e.creator.target.profile) == null ? void 0 : s.name) ? (o(), i("span", {
|
82
|
+
key: 0,
|
83
|
+
onClick: t[3] || (t[3] = g((c) => n.$router.push({
|
84
|
+
name: "User Profile",
|
85
|
+
params: {
|
86
|
+
_id: e.creator.target._id
|
87
|
+
}
|
88
|
+
}), ["stop"]))
|
89
|
+
}, " · by " + u((h = e.creator.target.profile) == null ? void 0 : h.name), 1)) : a("", !0),
|
90
|
+
e.date ? (o(), i("span", I, " · " + u(r(e.date)), 1)) : a("", !0),
|
91
|
+
e.dateFormatted ? (o(), i("span", A, " · " + u(e.dateFormatted), 1)) : a("", !0)
|
92
|
+
])) : a("", !0),
|
93
|
+
d("div", T, [
|
94
|
+
e.members ? (o(), i("div", V, [
|
95
|
+
d("span", B, u(e.members), 1),
|
96
|
+
(o(!0), i(v, null, $(e.membersPhotos.slice(0, 2), (c, l) => (o(), i("img", {
|
97
|
+
key: l,
|
98
|
+
src: (n.FILE_SERVER_URL || "") + c,
|
99
|
+
style: P({
|
100
|
+
position: "absolute",
|
101
|
+
top: "0px",
|
102
|
+
right: l * 20 + 20 + "%",
|
103
|
+
zIndex: 1 - l
|
104
|
+
}),
|
105
|
+
class: "br-solid br-2px br-white i-thin bg-grey radius-big"
|
106
|
+
}, null, 12, N))), 128))
|
107
|
+
])) : a("", !0)
|
108
|
+
]),
|
109
|
+
e.type !== "short" && e.user && e.user != e.creator.target._id ? (o(), x(C, {
|
110
|
+
key: 3,
|
111
|
+
label: "...",
|
112
|
+
align: "right",
|
113
|
+
class: "cursor-pointer z-index-2 pd-thin radius-extra"
|
114
|
+
}, {
|
115
|
+
default: k(() => [
|
116
|
+
d("section", H, [
|
117
|
+
e.user !== e.creator.target._id ? (o(), x(j, {
|
118
|
+
key: 0,
|
119
|
+
user: e.user,
|
120
|
+
type: e.entityType,
|
121
|
+
target: e.entity._id,
|
122
|
+
text: "Report",
|
123
|
+
class: "w-100"
|
124
|
+
}, {
|
125
|
+
default: k(() => [
|
126
|
+
J
|
127
|
+
]),
|
128
|
+
_: 1
|
129
|
+
}, 8, ["user", "type", "target"])) : a("", !0)
|
130
|
+
])
|
131
|
+
]),
|
132
|
+
_: 1
|
133
|
+
}, 8, ["label"])) : a("", !0)
|
134
|
+
])
|
135
|
+
])
|
136
|
+
])) : a("", !0);
|
137
|
+
};
|
138
|
+
}
|
139
|
+
}, w = M.create({
|
140
|
+
baseURL: process.env.API_URL,
|
141
|
+
withCredentials: !0
|
142
|
+
}), m = R({
|
143
|
+
reactions: [],
|
144
|
+
error: null
|
145
|
+
}), q = {
|
146
|
+
async read({ user: e, type: r, target: n, role: t }) {
|
147
|
+
try {
|
148
|
+
const s = await w.get("/api/reactions", { params: { user: e, type: r, target: n, role: t } });
|
149
|
+
return m.error = null, m.reactions = s.data, Promise.resolve(s.data);
|
150
|
+
} catch (s) {
|
151
|
+
return b(s), Promise.reject(s);
|
152
|
+
}
|
153
|
+
},
|
154
|
+
async create(e) {
|
155
|
+
try {
|
156
|
+
const r = await w.post("/api/reactions/create", e);
|
157
|
+
return m.error = null, Promise.resolve(r.data);
|
158
|
+
} catch (r) {
|
159
|
+
return console.log(r), b(r), Promise.reject(r);
|
160
|
+
}
|
161
|
+
},
|
162
|
+
async update(e) {
|
163
|
+
try {
|
164
|
+
const r = await w.post("/api/reactions/update", e);
|
165
|
+
return m.error = null, Promise.resolve(r.data);
|
166
|
+
} catch (r) {
|
167
|
+
return b(r), Promise.reject(r);
|
168
|
+
}
|
169
|
+
},
|
170
|
+
async delete(e) {
|
171
|
+
try {
|
172
|
+
const r = await w.post("/api/reactions/delete", e);
|
173
|
+
return m.error = null, Promise.resolve(r.data);
|
174
|
+
} catch (r) {
|
175
|
+
return b(r), Promise.reject(r);
|
176
|
+
}
|
177
|
+
}
|
178
|
+
}, G = {
|
179
|
+
handleReactionUpdate(e, r, n) {
|
180
|
+
let t;
|
181
|
+
if (Array.isArray(e) ? t = e.find((s) => s._id === r.target) : typeof e == "object" && e._id === r.target && (t = e), t)
|
182
|
+
if (t.hasReaction = n, n)
|
183
|
+
t.reactions.push(r), t.numberOfReactions += 1;
|
184
|
+
else {
|
185
|
+
const s = t.reactions.findIndex((h) => h._id === r._id);
|
186
|
+
s !== -1 && (t.reactions.splice(s, 1), t.numberOfReactions -= 1);
|
187
|
+
}
|
188
|
+
}
|
189
|
+
};
|
190
|
+
E(m, (e) => {
|
191
|
+
});
|
192
|
+
const ie = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
193
|
+
__proto__: null,
|
194
|
+
actions: q,
|
195
|
+
mutations: G,
|
196
|
+
state: m
|
197
|
+
}, Symbol.toStringTag, { value: "Module" })), K = { class: "flex-v-center gap-thin flex" }, Q = { class: "pd-thin radius-small t-semi bg-main" }, W = {
|
198
|
+
key: 1,
|
199
|
+
class: "pd-thin radius-small t-semi bg-white"
|
200
|
+
}, ae = {
|
201
|
+
__name: "Chips",
|
202
|
+
props: ["chips"],
|
203
|
+
setup(e) {
|
204
|
+
return (r, n) => (o(), i("div", K, [
|
205
|
+
e.chips.length ? (o(!0), i(v, { key: 0 }, $(e.chips, (t, s) => (o(), i("div", Q, u(t.text ? t.text : t), 1))), 256)) : (o(), i("div", W, u(e.chips), 1))
|
206
|
+
]));
|
207
|
+
}
|
208
|
+
};
|
209
|
+
export {
|
210
|
+
ne as _,
|
211
|
+
q as a,
|
212
|
+
ae as b,
|
213
|
+
ie as r
|
214
|
+
};
|
@@ -0,0 +1,132 @@
|
|
1
|
+
import q, { withAsyncContext as R, ref as B, computed as C, openBlock as w, createElementBlock as S, createElementVNode as f, unref as M, Fragment as U, renderList as G, createBlock as H, withCtx as J, pushScopeId as K, popScopeId as Q } from "vue";
|
2
|
+
import { r as W, s as E, _ as X, a as Y } from "./CardBlogpost-3c92fbc9.mjs";
|
3
|
+
import { s as Z } from "./auth-56dc2ba7.mjs";
|
4
|
+
import { useRouter as ee } from "vue-router";
|
5
|
+
import { _ as te } from "./_plugin-vue_export-helper-dad06003.mjs";
|
6
|
+
import "./index-a661083c.mjs";
|
7
|
+
import "./globals-96ba60e4.mjs";
|
8
|
+
import "vue-i18n";
|
9
|
+
import "./Chips-f1a0d085.mjs";
|
10
|
+
import "./PlaceholderUserpic-14c6ea7e.mjs";
|
11
|
+
import "./Dropdown-cab3605b.mjs";
|
12
|
+
import "./Popup-0915427c.mjs";
|
13
|
+
import "./IconCross-84cb1292.mjs";
|
14
|
+
import "./Popup.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
15
|
+
import "./Button-9e1a9284.mjs";
|
16
|
+
import "./Button.vue_vue_type_style_index_0_lang-4ed993c7.mjs";
|
17
|
+
import "./Select-11ddabf5.mjs";
|
18
|
+
import "./reports-79cd9459.mjs";
|
19
|
+
import "./click-outside-6101836c.mjs";
|
20
|
+
import "./memberships-12210953.mjs";
|
21
|
+
import "./IconEdit-9edfd74d.mjs";
|
22
|
+
var le = {};
|
23
|
+
(function(r) {
|
24
|
+
Object.defineProperties(r, { __esModule: { value: !0 }, [Symbol.toStringTag]: { value: "Module" } });
|
25
|
+
var e = q;
|
26
|
+
const g = { class: "flex-nowrap flex-v-center flex pd-medium bg-white" }, k = { key: 0, class: "t-left mn-r-small w-33" }, y = { class: "w-100" }, h = ["value", "placeholder"], v = e.defineComponent({ __name: "Field", props: { label: { default: "Label" }, placeholder: { default: "Enter something here" }, field: { default: null }, validation: { type: Boolean, default: !1 } }, emits: ["update:modelValue"], setup(t, { emit: a }) {
|
27
|
+
const l = t, n = e.ref(l.field);
|
28
|
+
return (d, u) => (e.openBlock(), e.createElementBlock("div", g, [t.label ? (e.openBlock(), e.createElementBlock("div", k, [e.createElementVNode("label", null, e.toDisplayString(t.label), 1)])) : e.createCommentVNode("", !0), e.createElementVNode("div", y, [e.createElementVNode("input", { onInput: u[0] || (u[0] = (b) => {
|
29
|
+
var i;
|
30
|
+
return n.value = a("update:modelValue", (i = b.target) == null ? void 0 : i.value);
|
31
|
+
}), type: "text", class: "w-100", value: t.field, placeholder: t.placeholder }, null, 40, h)])]));
|
32
|
+
} }), o = { class: "input-wrapper" }, p = { class: "t-transp p-small" }, c = { key: 0, class: "flex-nojustify flex-v-center flex-nowrap flex w-100" }, _ = { key: 1, class: "w-100" }, T = ["onClick"], V = { __name: "Select", props: ["obj", "label", "prop", "value", "options", "content", "textarea", "placeholder", "size"], setup(t) {
|
33
|
+
const a = t, l = e.ref(null), n = e.ref(!1);
|
34
|
+
e.ref("Please select an item");
|
35
|
+
let d = e.computed(() => {
|
36
|
+
if (a.prop[a.content]) {
|
37
|
+
var i = a.options.indexOf(a.prop[a.content]), m = a.options.map((s) => s);
|
38
|
+
return i != -1 && m.splice(i, 1), m;
|
39
|
+
} else
|
40
|
+
return a.options;
|
41
|
+
});
|
42
|
+
a.prop[a.content] && (l.value = a.prop[a.content]);
|
43
|
+
function u() {
|
44
|
+
n.value = !n.value;
|
45
|
+
}
|
46
|
+
function b(i, m, s) {
|
47
|
+
var N = s;
|
48
|
+
l.value = N, n.value = !n.value, i[m] = N;
|
49
|
+
}
|
50
|
+
return (i, m) => (e.openBlock(), e.createElementBlock("div", o, [e.createElementVNode("span", p, e.toDisplayString(t.label), 1), e.createElementVNode("li", { onClick: m[0] || (m[0] = e.withModifiers((s) => u(), ["stop"])), class: e.normalizeClass([{ "input-small": t.size === "small" }, "pd-small flex-center flex-nowrap flex bg-grey input-select input"]) }, [l.value ? (e.openBlock(), e.createElementBlock("span", c, [e.createElementVNode("span", null, e.toDisplayString(l.value.name ? l.value.name : l.value), 1)])) : (e.openBlock(), e.createElementBlock("span", _, e.toDisplayString(t.placeholder ? t.placeholder : "Please select"), 1))], 2), n.value ? (e.openBlock(), e.createElementBlock("ul", { key: 0, class: e.normalizeClass([{ "dropdown-small": t.size === "small" }, "bg-grey dropdown-menu"]) }, [(e.openBlock(!0), e.createElementBlock(e.Fragment, null, e.renderList(e.unref(d), (s) => (e.openBlock(), e.createElementBlock("li", { class: e.normalizeClass([{ "input-small": t.size === "small" }, "pd-small bg-grey input-select input"]) }, [s ? (e.openBlock(), e.createElementBlock("span", { key: 0, onClick: (N) => b(t.prop, t.content, s), class: "flex-nojustify flex-v-center flex-nowrap flex w-100" }, [e.createElementVNode("span", null, e.toDisplayString(s.name ? s.name : s), 1)], 8, T)) : e.createCommentVNode("", !0)], 2))), 256))], 2)) : e.createCommentVNode("", !0)]));
|
51
|
+
} }, I = ["disabled"], L = { key: 0 }, $ = { key: 0, class: "loading" }, z = e.createElementVNode("span", null, [e.createElementVNode("svg", { class: "i-default", width: "135", height: "140", viewBox: "0 0 135 140", xmlns: "http://www.w3.org/2000/svg", fill: "#fff" }, [e.createElementVNode("rect", { y: "10", width: "15", height: "120", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0.5s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0.5s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })]), e.createElementVNode("rect", { x: "30", y: "10", width: "15", height: "120", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0.25s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0.25s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })]), e.createElementVNode("rect", { x: "60", width: "15", height: "140", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })]), e.createElementVNode("rect", { x: "90", y: "10", width: "15", height: "120", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0.25s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0.25s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })]), e.createElementVNode("rect", { x: "120", y: "10", width: "15", height: "120", rx: "6" }, [e.createElementVNode("animate", { attributeName: "height", begin: "0.5s", dur: "1s", values: "120;110;100;90;80;70;60;50;40;140;120", calcMode: "linear", repeatCount: "indefinite" }), e.createTextVNode(), e.createElementVNode("animate", { attributeName: "y", begin: "0.5s", dur: "1s", values: "10;15;20;25;30;35;40;45;50;0;10", calcMode: "linear", repeatCount: "indefinite" })])])], -1), F = [z], D = { key: 0, class: "h4 loading" }, P = e.createElementVNode("span", { class: "t-white" }, "✔", -1), j = [P], A = { key: 0, class: "error" }, x = e.defineComponent({ __name: "Button", props: { submit: { type: Function, default: async () => {
|
52
|
+
console.log("Button click.");
|
53
|
+
} }, callback: { type: Function, default: async () => {
|
54
|
+
console.log("Button callback.");
|
55
|
+
} }, validation: { type: Boolean, default: !1 } }, setup(t) {
|
56
|
+
const a = t, l = e.ref(null), n = e.ref(null), d = e.ref(!1), u = e.ref(!1);
|
57
|
+
async function b() {
|
58
|
+
l.value.style["pointer-events"] = "none", n.value = null, d.value = !0;
|
59
|
+
try {
|
60
|
+
await a.submit(), l.value.classList.add("bg-light-blue"), l.value.classList.remove("bg-blue"), d.value = !1, u.value = !0, setTimeout(() => a.callback(), 750);
|
61
|
+
} catch {
|
62
|
+
l.value.classList.add("bg-light-red"), l.value.classList.remove("bg-blue"), n.value = "❌", setTimeout(() => {
|
63
|
+
l.value.classList.add("bg-blue"), l.value.classList.remove("bg-light-red"), l.value.style.pointerEvents = "auto", d.value = !1, u.value = !1, n.value = null;
|
64
|
+
}, 1e3);
|
65
|
+
}
|
66
|
+
}
|
67
|
+
return (i, m) => (e.openBlock(), e.createElementBlock("button", { onClick: b, disabled: t.validation, ref_key: "button", ref: l, class: "w-100 t-white bg-blue button" }, [e.createVNode(e.Transition, { mode: "out-in", name: "fadeIn" }, { default: e.withCtx(() => [!d.value && !n.value && !u.value ? (e.openBlock(), e.createElementBlock("span", L, [e.renderSlot(i.$slots, "default")])) : e.createCommentVNode("", !0)]), _: 3 }), e.createVNode(e.Transition, { mode: "out-in", name: "fadeIn" }, { default: e.withCtx(() => [d.value && !n.value ? (e.openBlock(), e.createElementBlock("div", $, F)) : e.createCommentVNode("", !0)]), _: 1 }), e.createVNode(e.Transition, { mode: "out-in", name: "fadeIn" }, { default: e.withCtx(() => [u.value ? (e.openBlock(), e.createElementBlock("div", D, j)) : e.createCommentVNode("", !0)]), _: 1 }), e.createVNode(e.Transition, { mode: "out-in", name: "fadeIn" }, { default: e.withCtx(() => [n.value ? (e.openBlock(), e.createElementBlock("div", A, [e.createElementVNode("span", null, e.toDisplayString(n.value), 1)])) : e.createCommentVNode("", !0)]), _: 1 })], 8, I));
|
68
|
+
} });
|
69
|
+
var O = { install: (t) => {
|
70
|
+
t.component("Field", v), t.component("Button", x), t.component("Select", V);
|
71
|
+
} };
|
72
|
+
r.Button = x, r.Field = v, r.Select = V, r.default = O;
|
73
|
+
})(le);
|
74
|
+
const ae = (r) => (K("data-v-faeb0fe0"), r = r(), Q(), r), ne = { class: "flex-v-center flex-nowrap flex mn-medium" }, oe = /* @__PURE__ */ ae(() => /* @__PURE__ */ f("h3", { class: "mn-r-medium" }, "Blog", -1)), re = { class: "" }, ie = { class: "flex-nowrap flex pd-t-zero pd-b-zero pd-big" }, se = ["onClick"], ce = ["onClick"], ue = {
|
75
|
+
__name: "Community",
|
76
|
+
async setup(r) {
|
77
|
+
let e, g;
|
78
|
+
const k = ee();
|
79
|
+
[e, g] = R(() => W()), await e, g(), console.log(E), B({
|
80
|
+
title: "",
|
81
|
+
content: "",
|
82
|
+
categories: []
|
83
|
+
});
|
84
|
+
const y = async (o) => {
|
85
|
+
window.confirm("Are you sure you want to delete this post?") && (console.log(o), await Y(o));
|
86
|
+
};
|
87
|
+
let h = B("all");
|
88
|
+
const v = C(() => h.value === "all" ? E.all : E.all.filter((o) => o.categories.includes(h.value)));
|
89
|
+
return C(() => {
|
90
|
+
for (let o of v.value)
|
91
|
+
if (o.blocks && o.blocks.length > 0) {
|
92
|
+
const p = o.blocks.find((c) => c.type.name === "ImageUpload");
|
93
|
+
if (p)
|
94
|
+
return p.content;
|
95
|
+
}
|
96
|
+
return null;
|
97
|
+
}), (o, p) => (w(), S("div", null, [
|
98
|
+
f("div", ne, [
|
99
|
+
oe,
|
100
|
+
f("button", {
|
101
|
+
onClick: p[0] || (p[0] = (c) => M(k).push({ name: "Create BlogPost" })),
|
102
|
+
class: "t-white bg-second button-small button"
|
103
|
+
}, "+")
|
104
|
+
]),
|
105
|
+
f("div", re, [
|
106
|
+
(w(!0), S(U, null, G(M(v), (c) => (w(), H(X, {
|
107
|
+
key: c._id,
|
108
|
+
blogpost: c,
|
109
|
+
owner: Z.user._id,
|
110
|
+
class: "mn-medium"
|
111
|
+
}, {
|
112
|
+
default: J(() => [
|
113
|
+
f("div", ie, [
|
114
|
+
f("button", {
|
115
|
+
class: "mn-r-thin button-small w-100 button",
|
116
|
+
onClick: (_) => o.$router.push({ path: "/community/posts/" + c.url + "/edit" })
|
117
|
+
}, "Edit", 8, se),
|
118
|
+
f("button", {
|
119
|
+
class: "button-small w-100 button",
|
120
|
+
onClick: (_) => y(c._id)
|
121
|
+
}, "Delete", 8, ce)
|
122
|
+
])
|
123
|
+
]),
|
124
|
+
_: 2
|
125
|
+
}, 1032, ["blogpost", "owner"]))), 128))
|
126
|
+
])
|
127
|
+
]));
|
128
|
+
}
|
129
|
+
}, Ie = /* @__PURE__ */ te(ue, [["__scopeId", "data-v-faeb0fe0"]]);
|
130
|
+
export {
|
131
|
+
Ie as default
|
132
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),v=require("./CardBlogpost-c7364b1e.js"),$=require("./auth-f018f5b3.js"),D=require("vue-router"),P=require("./_plugin-vue_export-helper-f246444f.js");require("./index-b41aac19.js");require("./globals-928eb13c.js");require("vue-i18n");require("./Chips-0fdb31c9.js");require("./PlaceholderUserpic-47f6f319.js");require("./Dropdown-31115457.js");require("./Popup-795f5c88.js");require("./IconCross-5bf93179.js");require("./Popup.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Button-7643c9aa.js");require("./Button.vue_vue_type_style_index_0_lang-0ea8fbf8.js");require("./Select-3ca5ab39.js");require("./reports-270f69df.js");require("./click-outside-0b0727d1.js");require("./memberships-393765d8.js");require("./IconEdit-c0469b45.js");var j={};(function(i){Object.defineProperties(i,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e=t;const h={class:"flex-nowrap flex-v-center flex pd-medium bg-white"},N={key:0,class:"t-left mn-r-small w-33"},y={class:"w-100"},k=["value","placeholder"],b=e.defineComponent({__name:"Field",props:{label:{default:"Label"},placeholder:{default:"Enter something here"},field:{default:null},validation:{type:Boolean,default:!1}},emits:["update:modelValue"],setup(l,{emit:n}){const a=l,o=e.ref(a.field);return(m,d)=>(e.openBlock(),e.createElementBlock("div",h,[l.label?(e.openBlock(),e.createElementBlock("div",N,[e.createElementVNode("label",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("div",y,[e.createElementVNode("input",{onInput:d[0]||(d[0]=g=>{var c;return o.value=n("update:modelValue",(c=g.target)==null?void 0:c.value)}),type:"text",class:"w-100",value:l.field,placeholder:l.placeholder},null,40,k)])]))}}),r={class:"input-wrapper"},f={class:"t-transp p-small"},u={key:0,class:"flex-nojustify flex-v-center flex-nowrap flex w-100"},_={key:1,class:"w-100"},B=["onClick"],V={__name:"Select",props:["obj","label","prop","value","options","content","textarea","placeholder","size"],setup(l){const n=l,a=e.ref(null),o=e.ref(!1);e.ref("Please select an item");let m=e.computed(()=>{if(n.prop[n.content]){var c=n.options.indexOf(n.prop[n.content]),p=n.options.map(s=>s);return c!=-1&&p.splice(c,1),p}else return n.options});n.prop[n.content]&&(a.value=n.prop[n.content]);function d(){o.value=!o.value}function g(c,p,s){var E=s;a.value=E,o.value=!o.value,c[p]=E}return(c,p)=>(e.openBlock(),e.createElementBlock("div",r,[e.createElementVNode("span",f,e.toDisplayString(l.label),1),e.createElementVNode("li",{onClick:p[0]||(p[0]=e.withModifiers(s=>d(),["stop"])),class:e.normalizeClass([{"input-small":l.size==="small"},"pd-small flex-center flex-nowrap flex bg-grey input-select input"])},[a.value?(e.openBlock(),e.createElementBlock("span",u,[e.createElementVNode("span",null,e.toDisplayString(a.value.name?a.value.name:a.value),1)])):(e.openBlock(),e.createElementBlock("span",_,e.toDisplayString(l.placeholder?l.placeholder:"Please select"),1))],2),o.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([{"dropdown-small":l.size==="small"},"bg-grey dropdown-menu"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(m),s=>(e.openBlock(),e.createElementBlock("li",{class:e.normalizeClass([{"input-small":l.size==="small"},"pd-small bg-grey input-select input"])},[s?(e.openBlock(),e.createElementBlock("span",{key:0,onClick:E=>g(l.prop,l.content,s),class:"flex-nojustify flex-v-center flex-nowrap flex w-100"},[e.createElementVNode("span",null,e.toDisplayString(s.name?s.name:s),1)],8,B)):e.createCommentVNode("",!0)],2))),256))],2)):e.createCommentVNode("",!0)]))}},C=["disabled"],x={key:0},q={key:0,class:"loading"},S=e.createElementVNode("span",null,[e.createElementVNode("svg",{class:"i-default",width:"135",height:"140",viewBox:"0 0 135 140",xmlns:"http://www.w3.org/2000/svg",fill:"#fff"},[e.createElementVNode("rect",{y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"30",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"60",width:"15",height:"140",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"90",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.25s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.25s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})]),e.createElementVNode("rect",{x:"120",y:"10",width:"15",height:"120",rx:"6"},[e.createElementVNode("animate",{attributeName:"height",begin:"0.5s",dur:"1s",values:"120;110;100;90;80;70;60;50;40;140;120",calcMode:"linear",repeatCount:"indefinite"}),e.createTextVNode(),e.createElementVNode("animate",{attributeName:"y",begin:"0.5s",dur:"1s",values:"10;15;20;25;30;35;40;45;50;0;10",calcMode:"linear",repeatCount:"indefinite"})])])],-1),M=[S],T={key:0,class:"h4 loading"},I=e.createElementVNode("span",{class:"t-white"},"✔",-1),L=[I],z={key:0,class:"error"},w=e.defineComponent({__name:"Button",props:{submit:{type:Function,default:async()=>{console.log("Button click.")}},callback:{type:Function,default:async()=>{console.log("Button callback.")}},validation:{type:Boolean,default:!1}},setup(l){const n=l,a=e.ref(null),o=e.ref(null),m=e.ref(!1),d=e.ref(!1);async function g(){a.value.style["pointer-events"]="none",o.value=null,m.value=!0;try{await n.submit(),a.value.classList.add("bg-light-blue"),a.value.classList.remove("bg-blue"),m.value=!1,d.value=!0,setTimeout(()=>n.callback(),750)}catch{a.value.classList.add("bg-light-red"),a.value.classList.remove("bg-blue"),o.value="❌",setTimeout(()=>{a.value.classList.add("bg-blue"),a.value.classList.remove("bg-light-red"),a.value.style.pointerEvents="auto",m.value=!1,d.value=!1,o.value=null},1e3)}}return(c,p)=>(e.openBlock(),e.createElementBlock("button",{onClick:g,disabled:l.validation,ref_key:"button",ref:a,class:"w-100 t-white bg-blue button"},[e.createVNode(e.Transition,{mode:"out-in",name:"fadeIn"},{default:e.withCtx(()=>[!m.value&&!o.value&&!d.value?(e.openBlock(),e.createElementBlock("span",x,[e.renderSlot(c.$slots,"default")])):e.createCommentVNode("",!0)]),_:3}),e.createVNode(e.Transition,{mode:"out-in",name:"fadeIn"},{default:e.withCtx(()=>[m.value&&!o.value?(e.openBlock(),e.createElementBlock("div",q,M)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{mode:"out-in",name:"fadeIn"},{default:e.withCtx(()=>[d.value?(e.openBlock(),e.createElementBlock("div",T,L)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{mode:"out-in",name:"fadeIn"},{default:e.withCtx(()=>[o.value?(e.openBlock(),e.createElementBlock("div",z,[e.createElementVNode("span",null,e.toDisplayString(o.value),1)])):e.createCommentVNode("",!0)]),_:1})],8,C))}});var F={install:l=>{l.component("Field",b),l.component("Button",w),l.component("Select",V)}};i.Button=w,i.Field=b,i.Select=V,i.default=F})(j);const O=i=>(t.pushScopeId("data-v-faeb0fe0"),i=i(),t.popScopeId(),i),A={class:"flex-v-center flex-nowrap flex mn-medium"},R=O(()=>t.createElementVNode("h3",{class:"mn-r-medium"},"Blog",-1)),H={class:""},U={class:"flex-nowrap flex pd-t-zero pd-b-zero pd-big"},G=["onClick"],J=["onClick"],K={__name:"Community",async setup(i){let e,h;const N=D.useRouter();[e,h]=t.withAsyncContext(()=>v.read()),await e,h(),console.log(v.state),t.ref({title:"",content:"",categories:[]});const y=async r=>{window.confirm("Are you sure you want to delete this post?")&&(console.log(r),await v.remove(r))};let k=t.ref("all");const b=t.computed(()=>k.value==="all"?v.state.all:v.state.all.filter(r=>r.categories.includes(k.value)));return t.computed(()=>{for(let r of b.value)if(r.blocks&&r.blocks.length>0){const f=r.blocks.find(u=>u.type.name==="ImageUpload");if(f)return f.content}return null}),(r,f)=>(t.openBlock(),t.createElementBlock("div",null,[t.createElementVNode("div",A,[R,t.createElementVNode("button",{onClick:f[0]||(f[0]=u=>t.unref(N).push({name:"Create BlogPost"})),class:"t-white bg-second button-small button"},"+")]),t.createElementVNode("div",H,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(t.unref(b),u=>(t.openBlock(),t.createBlock(v._sfc_main,{key:u._id,blogpost:u,owner:$.state.user._id,class:"mn-medium"},{default:t.withCtx(()=>[t.createElementVNode("div",U,[t.createElementVNode("button",{class:"mn-r-thin button-small w-100 button",onClick:_=>r.$router.push({path:"/community/posts/"+u.url+"/edit"})},"Edit",8,G),t.createElementVNode("button",{class:"button-small w-100 button",onClick:_=>y(u._id)},"Delete",8,J)])]),_:2},1032,["blogpost","owner"]))),128))])]))}},Q=P._export_sfc(K,[["__scopeId","data-v-faeb0fe0"]]);exports.default=Q;
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),i=require("./Menu-b5d6a0c7.js"),n=require("./MenuItem-56ae7f94.js"),o=require("vue-router");require("./IconChevronRight-a55f838e.js");require("./_plugin-vue_export-helper-f246444f.js");const u={class:""},c=e.createElementVNode("h1",{class:"mn-small"},"Your Backoffice",-1),l=e.createElementVNode("span",null," Organizations ",-1),d=e.createElementVNode("span",null," Events ",-1),f=e.createElementVNode("span",null," Community ",-1),m=e.createElementVNode("span",null," Products ",-1),_=e.createElementVNode("span",null," Leftovers ",-1),p=e.createElementVNode("span",null," Orders ",-1),k=e.createElementVNode("span",null," Payments ",-1),C=e.createElementVNode("span",null," Gallery ",-1),N=e.createElementVNode("span",null," Reports ",-1),V={__name:"Dashboard",props:{favorites:Array},setup(v){const r=o.useRoute(),s=o.useRouter();return(h,t)=>(e.openBlock(),e.createElementBlock("div",u,[c,e.createVNode(i._sfc_main,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(n._sfc_main,{onClick:t[0]||(t[0]=a=>e.unref(s).push({name:"Backoffice Organizations",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[l]),_:1}),e.createVNode(n._sfc_main,{onClick:t[1]||(t[1]=a=>e.unref(s).push({name:"Backoffice Events",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[d]),_:1}),e.createVNode(n._sfc_main,{onClick:t[2]||(t[2]=a=>e.unref(s).push({name:"Backoffice Community",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[f]),_:1}),e.createVNode(n._sfc_main,{onClick:t[3]||(t[3]=a=>e.unref(s).push({name:"Backoffice Products",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[m]),_:1}),e.createVNode(n._sfc_main,{onClick:t[4]||(t[4]=a=>e.unref(s).push({name:"Backoffice Leftovers",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[_]),_:1}),e.createVNode(n._sfc_main,{onClick:t[5]||(t[5]=a=>e.unref(s).push({name:"Backoffice Orders",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[p]),_:1}),e.createVNode(n._sfc_main,{onClick:t[6]||(t[6]=a=>e.unref(s).push({name:"Backoffice Payments",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[k]),_:1}),e.createVNode(n._sfc_main,{onClick:t[7]||(t[7]=a=>e.unref(s).push({name:"Backoffice Gallery",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[C]),_:1}),e.createVNode(n._sfc_main,{onClick:t[8]||(t[8]=a=>e.unref(s).push({name:"Backoffice Reports",params:{_id:e.unref(r).params._id}})),class:"cursor-pointer"},{default:e.withCtx(()=>[N]),_:1})]),_:1})]))}};exports.default=V;
|
@@ -0,0 +1,152 @@
|
|
1
|
+
import { openBlock as p, createElementBlock as u, createVNode as a, withCtx as e, unref as o, createElementVNode as t } from "vue";
|
2
|
+
import { _ as m } from "./Menu-dd7645c1.mjs";
|
3
|
+
import { _ as i } from "./MenuItem-6296d02f.mjs";
|
4
|
+
import { useRoute as d, useRouter as _ } from "vue-router";
|
5
|
+
import "./IconChevronRight-fae9d012.mjs";
|
6
|
+
import "./_plugin-vue_export-helper-dad06003.mjs";
|
7
|
+
const f = { class: "" }, c = /* @__PURE__ */ t("h1", { class: "mn-small" }, "Your Backoffice", -1), k = /* @__PURE__ */ t("span", null, " Organizations ", -1), v = /* @__PURE__ */ t("span", null, " Events ", -1), B = /* @__PURE__ */ t("span", null, " Community ", -1), C = /* @__PURE__ */ t("span", null, " Products ", -1), $ = /* @__PURE__ */ t("span", null, " Leftovers ", -1), y = /* @__PURE__ */ t("span", null, " Orders ", -1), h = /* @__PURE__ */ t("span", null, " Payments ", -1), g = /* @__PURE__ */ t("span", null, " Gallery ", -1), E = /* @__PURE__ */ t("span", null, " Reports ", -1), N = {
|
8
|
+
__name: "Dashboard",
|
9
|
+
props: {
|
10
|
+
favorites: Array
|
11
|
+
},
|
12
|
+
setup(O) {
|
13
|
+
const r = d(), n = _();
|
14
|
+
return (P, s) => (p(), u("div", f, [
|
15
|
+
c,
|
16
|
+
a(m, { class: "bg-grey" }, {
|
17
|
+
default: e(() => [
|
18
|
+
a(i, {
|
19
|
+
onClick: s[0] || (s[0] = (l) => o(n).push({
|
20
|
+
name: "Backoffice Organizations",
|
21
|
+
params: {
|
22
|
+
_id: o(r).params._id
|
23
|
+
}
|
24
|
+
})),
|
25
|
+
class: "cursor-pointer"
|
26
|
+
}, {
|
27
|
+
default: e(() => [
|
28
|
+
k
|
29
|
+
]),
|
30
|
+
_: 1
|
31
|
+
}),
|
32
|
+
a(i, {
|
33
|
+
onClick: s[1] || (s[1] = (l) => o(n).push({
|
34
|
+
name: "Backoffice Events",
|
35
|
+
params: {
|
36
|
+
_id: o(r).params._id
|
37
|
+
}
|
38
|
+
})),
|
39
|
+
class: "cursor-pointer"
|
40
|
+
}, {
|
41
|
+
default: e(() => [
|
42
|
+
v
|
43
|
+
]),
|
44
|
+
_: 1
|
45
|
+
}),
|
46
|
+
a(i, {
|
47
|
+
onClick: s[2] || (s[2] = (l) => o(n).push({
|
48
|
+
name: "Backoffice Community",
|
49
|
+
params: {
|
50
|
+
_id: o(r).params._id
|
51
|
+
}
|
52
|
+
})),
|
53
|
+
class: "cursor-pointer"
|
54
|
+
}, {
|
55
|
+
default: e(() => [
|
56
|
+
B
|
57
|
+
]),
|
58
|
+
_: 1
|
59
|
+
}),
|
60
|
+
a(i, {
|
61
|
+
onClick: s[3] || (s[3] = (l) => o(n).push({
|
62
|
+
name: "Backoffice Products",
|
63
|
+
params: {
|
64
|
+
_id: o(r).params._id
|
65
|
+
}
|
66
|
+
})),
|
67
|
+
class: "cursor-pointer"
|
68
|
+
}, {
|
69
|
+
default: e(() => [
|
70
|
+
C
|
71
|
+
]),
|
72
|
+
_: 1
|
73
|
+
}),
|
74
|
+
a(i, {
|
75
|
+
onClick: s[4] || (s[4] = (l) => o(n).push({
|
76
|
+
name: "Backoffice Leftovers",
|
77
|
+
params: {
|
78
|
+
_id: o(r).params._id
|
79
|
+
}
|
80
|
+
})),
|
81
|
+
class: "cursor-pointer"
|
82
|
+
}, {
|
83
|
+
default: e(() => [
|
84
|
+
$
|
85
|
+
]),
|
86
|
+
_: 1
|
87
|
+
}),
|
88
|
+
a(i, {
|
89
|
+
onClick: s[5] || (s[5] = (l) => o(n).push({
|
90
|
+
name: "Backoffice Orders",
|
91
|
+
params: {
|
92
|
+
_id: o(r).params._id
|
93
|
+
}
|
94
|
+
})),
|
95
|
+
class: "cursor-pointer"
|
96
|
+
}, {
|
97
|
+
default: e(() => [
|
98
|
+
y
|
99
|
+
]),
|
100
|
+
_: 1
|
101
|
+
}),
|
102
|
+
a(i, {
|
103
|
+
onClick: s[6] || (s[6] = (l) => o(n).push({
|
104
|
+
name: "Backoffice Payments",
|
105
|
+
params: {
|
106
|
+
_id: o(r).params._id
|
107
|
+
}
|
108
|
+
})),
|
109
|
+
class: "cursor-pointer"
|
110
|
+
}, {
|
111
|
+
default: e(() => [
|
112
|
+
h
|
113
|
+
]),
|
114
|
+
_: 1
|
115
|
+
}),
|
116
|
+
a(i, {
|
117
|
+
onClick: s[7] || (s[7] = (l) => o(n).push({
|
118
|
+
name: "Backoffice Gallery",
|
119
|
+
params: {
|
120
|
+
_id: o(r).params._id
|
121
|
+
}
|
122
|
+
})),
|
123
|
+
class: "cursor-pointer"
|
124
|
+
}, {
|
125
|
+
default: e(() => [
|
126
|
+
g
|
127
|
+
]),
|
128
|
+
_: 1
|
129
|
+
}),
|
130
|
+
a(i, {
|
131
|
+
onClick: s[8] || (s[8] = (l) => o(n).push({
|
132
|
+
name: "Backoffice Reports",
|
133
|
+
params: {
|
134
|
+
_id: o(r).params._id
|
135
|
+
}
|
136
|
+
})),
|
137
|
+
class: "cursor-pointer"
|
138
|
+
}, {
|
139
|
+
default: e(() => [
|
140
|
+
E
|
141
|
+
]),
|
142
|
+
_: 1
|
143
|
+
})
|
144
|
+
]),
|
145
|
+
_: 1
|
146
|
+
})
|
147
|
+
]));
|
148
|
+
}
|
149
|
+
};
|
150
|
+
export {
|
151
|
+
N as default
|
152
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const e=require("vue"),p=require("./Popup-795f5c88.js"),d=require("./Button-7643c9aa.js"),m=require("./Select-3ca5ab39.js"),f=require("./reports-270f69df.js"),_=require("./click-outside-0b0727d1.js"),g=require("./_plugin-vue_export-helper-f246444f.js"),v=e.createElementVNode("h3",{class:"mn-small"}," Report Content ",-1),w=e.createElementVNode("p",{class:"p-medium mn-small"}," We strive to maintain a safe and comfortable environment for all users. If you encounter content that you believe violates our guidelines, please report it: ",-1),b=e.createElementVNode("p",{class:"p-medium mn-small"},"Our moderators will review your report within 24 hours and take action if it violates our policies.",-1),h={__name:"FormReport",props:{user:{type:String,required:!1},type:{type:String,required:!1},reason:{type:String,required:!1},target:{type:String,required:!0},text:{type:String,default:"!"},status:{type:String,default:"new"}},setup(o){const r=o,t=e.reactive({user:r.user,type:r.type,reason:r.reason,target:r.target,status:r.status});function a(){t.user===null&&delete t.user,f.actions.create(t)}const n=e.ref(!1);function s(){n.value=!0}function l(){n.value=!1}return(c,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:i[0]||(i[0]=u=>s())},[e.renderSlot(c.$slots,"default")]),e.createVNode(p._sfc_main,{onClosePopup:l,isPopupOpen:n.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[v,w,e.createVNode(m.Select,{select:t.reason,"onUpdate:select":i[1]||(i[1]=u=>t.reason=u),options:["harassment","spam","inappropriate","misinformation","copyright","other"],placeholder:"Select reason",class:"mn-small bg-white br-solid br-black-transp br-1px uppercase pd-medium t-semi bg-white t-black radius-medium"},null,8,["select"]),b,e.createVNode(d._sfc_main,{submit:a,callback:l,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode(" Report ")]),_:1})]),_:1},8,["isPopupOpen"])],64))}};const y={__name:"Dropdown",props:{label:{type:String,default:"Open"},align:{type:String,default:"left"}},setup(o){let r=_.clickOutside;const t=e.ref(!1);function a(){t.value=!1}return(n,s)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:s[0]||(s[0]=e.withModifiers(l=>t.value=!t.value,["stop"]))},[e.createTextVNode(e.toDisplayString(o.label)+" ",1),e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{style:e.normalizeStyle({left:o.align==="left"?"0":"auto",right:o.align==="right"?"0":"auto"}),class:"dropdown-content w-15r radius-big"},[e.renderSlot(n.$slots,"default",{},void 0,!0)],4),[[e.vShow,t.value]])]),_:3})])),[[e.unref(r),a]])}},S=g._export_sfc(y,[["__scopeId","data-v-5646d77f"]]);exports.Dropdown=S;exports._sfc_main=h;
|