@ozdao/prometheus-framework 0.1.17 → 0.1.18
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-2426cb6f.mjs +1945 -0
- package/dist/Breadcrumbs.vue_vue_type_style_index_0_lang-c6aba800.js +1 -0
- package/dist/ButtonFollow-351486b0.js +1 -0
- package/dist/ButtonFollow-3a05d29f.mjs +132 -0
- package/dist/CardOrganization-4d22037e.js +1 -0
- package/dist/CardOrganization-8c5b582b.mjs +230 -0
- package/dist/Feed-416d84b0.mjs +439 -0
- package/dist/Feed-44beaa4c.mjs +368 -0
- package/dist/Feed-8a151970.js +1 -0
- package/dist/Feed-c9e6190e.js +1 -0
- package/dist/Gallery-9305f294.mjs +357 -0
- package/dist/Gallery-dea27e94.js +1 -0
- package/dist/Image-22e17cef.js +9 -0
- package/dist/Image-c0ae2c5f.mjs +477 -0
- package/dist/Popup-ad5f59d0.js +1 -0
- package/dist/Popup-e7c9a43e.mjs +76 -0
- package/dist/Product-2d05acc8.mjs +839 -0
- package/dist/Product-d9c3b9b9.js +7 -0
- package/dist/ProductEdit-ab0530e8.js +1 -0
- package/dist/ProductEdit-aca44ef7.mjs +300 -0
- package/dist/ProfileBlogposts-2063c511.mjs +65 -0
- package/dist/ProfileBlogposts-eaecd267.js +1 -0
- package/dist/ProfileComments-1ae70859.js +1 -0
- package/dist/ProfileComments-78231e6a.mjs +44 -0
- package/dist/ProfileEvents-4a2fa422.mjs +57 -0
- package/dist/ProfileEvents-90448f97.js +1 -0
- package/dist/ProfileLikes-74c78a16.mjs +44 -0
- package/dist/ProfileLikes-b48ce0ef.js +1 -0
- package/dist/ProfileOrganizations-43710687.js +1 -0
- package/dist/ProfileOrganizations-cf8a12f5.mjs +213 -0
- package/dist/Publics-5472f70c.mjs +123 -0
- package/dist/Publics-71b9efbe.js +1 -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/auth-4415a97a.js +7 -0
- package/dist/auth-afa25b86.mjs +905 -0
- package/dist/auth.client.cjs +1 -1
- package/dist/auth.client.js +4 -4
- package/dist/auth.validation-3e93dc23.mjs +20 -0
- package/dist/auth.validation-a17cd085.js +1 -0
- package/dist/backoffice.client.cjs +1 -1
- package/dist/backoffice.client.js +1 -1
- package/dist/community.client.cjs +1 -1
- package/dist/community.client.js +11 -11
- package/dist/events.client.cjs +1 -1
- package/dist/events.client.js +9 -9
- package/dist/gallery.server.js +23 -2
- package/dist/gallery.server.mjs +23 -2
- package/dist/index-a661083c.mjs +934 -0
- package/dist/index-b41aac19.js +2 -0
- package/dist/organizations-65937ba4.js +1 -0
- package/dist/organizations-af965fcf.mjs +122 -0
- package/dist/organizations.client-1e9361ec.js +3 -0
- package/dist/organizations.client-43816e25.mjs +3018 -0
- package/dist/organizations.client.cjs +1 -1
- package/dist/organizations.client.js +11 -11
- package/dist/users.client.cjs +1 -1
- package/dist/users.client.js +10 -10
- package/package.json +1 -1
- package/src/modules/gallery/gallery.server.js +2 -2
package/dist/auth.client.js
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
import { ref as C, onMounted as ut, openBlock as g, createBlock as ce, unref as f, withCtx as w, createElementBlock as b, Fragment as fe, renderList as ct, createElementVNode as p, normalizeStyle as q, toDisplayString as h, resolveComponent as be, createVNode as y, Transition as R, resolveDynamicComponent as Ft, reactive as ft, watch as pt, withDirectives as I, vModelText as J, withAsyncContext as Dt, defineComponent as Rt, resolveDirective as Mt, normalizeClass as K, withKeys as ie, createCommentVNode as L, vShow as X, vModelDynamic as zt, renderSlot as Lt, createTextVNode as D, inject as Te } from "vue";
|
2
2
|
import { v as M, b as mt, c as _e, d as Ce } from "./inputs.validation-14e8e01f.mjs";
|
3
|
-
import { b as oe, c as ht, s as m, F as z, _ as G, a as V } from "./auth-
|
4
|
-
import { d as Di, t as Ri } from "./auth-
|
3
|
+
import { b as oe, c as ht, s as m, F as z, _ as G, a as V } from "./auth-afa25b86.mjs";
|
4
|
+
import { d as Di, t as Ri } from "./auth-afa25b86.mjs";
|
5
5
|
import { C as xt, S as kt } from "./carousel.es-44c501bc.mjs";
|
6
6
|
import { useI18n as H } from "vue-i18n";
|
7
7
|
import { useRoute as k, useRouter as j } from "vue-router";
|
8
8
|
import { s as x } from "./globals-96ba60e4.mjs";
|
9
|
-
import { a as jt } from "./index-
|
9
|
+
import { a as jt } from "./index-a661083c.mjs";
|
10
10
|
import { _ as we } from "./Tab-a243605d.mjs";
|
11
11
|
import { _ as Bt } from "./_plugin-vue_export-helper-dad06003.mjs";
|
12
|
-
import { r as W, a as ae, c as Ae } from "./auth.validation-
|
12
|
+
import { r as W, a as ae, c as Ae } from "./auth.validation-3e93dc23.mjs";
|
13
13
|
const Ut = { class: "parent-div" }, Gt = { class: "mn-small" }, Vt = { class: "mn-big mn-r-small mn-l-small" }, Ni = {
|
14
14
|
__name: "SliderFeatures",
|
15
15
|
setup(e) {
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { useRouter as i } from "vue-router";
|
2
|
+
import { s } from "./auth-afa25b86.mjs";
|
3
|
+
i();
|
4
|
+
function n(r, o, e) {
|
5
|
+
e(), s.user.phone = "", s.user.email = "", s.user.password = "", s.user.passwordRepeat = "";
|
6
|
+
}
|
7
|
+
function f(r, o, e) {
|
8
|
+
console.log(s.user), s.user.phone === "" && s.user.email === "" ? e("/auth/signin") : e();
|
9
|
+
}
|
10
|
+
i();
|
11
|
+
function c(r, o, e) {
|
12
|
+
if (s.access.status)
|
13
|
+
return e("/profile/" + s.user._id);
|
14
|
+
e();
|
15
|
+
}
|
16
|
+
export {
|
17
|
+
n as a,
|
18
|
+
f as c,
|
19
|
+
c as r
|
20
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";const u=require("vue-router"),e=require("./auth-4415a97a.js");u.useRouter();function o(t,r,s){s(),e.state.user.phone="",e.state.user.email="",e.state.user.password="",e.state.user.passwordRepeat=""}function i(t,r,s){console.log(e.state.user),e.state.user.phone===""&&e.state.user.email===""?s("/auth/signin"):s()}u.useRouter();function a(t,r,s){if(e.state.access.status)return s("/profile/"+e.state.user._id);s()}exports.checkUser=i;exports.requiresNoAuth=a;exports.resetUser=o;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("vue-router");const u={id:"account",class:"cols-2-1_3 gap-medium pd-medium"},l={class:"pd-medium menu-tabs"},i={class:"w-100"},m={__name:"Account",setup(p){n.useRoute(),n.useRouter();let a=e.reactive({currentTab:"user"});return e.toRefs(a),(t,o)=>{const r=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("section",u,[e.createElementVNode("div",l,[t.store.auth.state.access.roles.includes("ROLE_ADMIN")?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:o[0]||(o[0]=c=>t.$router.push("/account/community")),class:e.normalizeClass([{"product-tab-active":t.$route.path==="/account/community"},"mn-small product-tab"])}," Blog ",2)):e.createCommentVNode("",!0),t.store.auth.state.access.roles.includes("ROLE_ADMIN")?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o[1]||(o[1]=c=>t.$router.push("/account/gallery")),class:e.normalizeClass([{"product-tab-active":t.$route.path==="/account/gallery"},"product-tab"])}," Gallery ",2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",i,[e.createVNode(r,null,{default:e.withCtx(({Component:c,route:s})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c),{ref:"page",key:s.path}))]),_:2},1024)]),_:1})])])}}},d=[{path:"backoffice",component:m,children:[{path:":_id",name:"Backoffice",meta:{title:{en:"Backoffice",ru:"Управление"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./Gallery-
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),n=require("vue-router");const u={id:"account",class:"cols-2-1_3 gap-medium pd-medium"},l={class:"pd-medium menu-tabs"},i={class:"w-100"},m={__name:"Account",setup(p){n.useRoute(),n.useRouter();let a=e.reactive({currentTab:"user"});return e.toRefs(a),(t,o)=>{const r=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("section",u,[e.createElementVNode("div",l,[t.store.auth.state.access.roles.includes("ROLE_ADMIN")?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:o[0]||(o[0]=c=>t.$router.push("/account/community")),class:e.normalizeClass([{"product-tab-active":t.$route.path==="/account/community"},"mn-small product-tab"])}," Blog ",2)):e.createCommentVNode("",!0),t.store.auth.state.access.roles.includes("ROLE_ADMIN")?(e.openBlock(),e.createElementBlock("button",{key:1,onClick:o[1]||(o[1]=c=>t.$router.push("/account/gallery")),class:e.normalizeClass([{"product-tab-active":t.$route.path==="/account/gallery"},"product-tab"])}," Gallery ",2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",i,[e.createVNode(r,null,{default:e.withCtx(({Component:c,route:s})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(c),{ref:"page",key:s.path}))]),_:2},1024)]),_:1})])])}}},d=[{path:"backoffice",component:m,children:[{path:":_id",name:"Backoffice",meta:{title:{en:"Backoffice",ru:"Управление"},authorize:[]},component:()=>Promise.resolve().then(()=>require("./Gallery-dea27e94.js"))}]}];exports.backofficeRoutes=d;
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),$=require("./Publics-8595ab7e.js"),u=require("./Feed-51eef23f.js"),g=require("./auth-45a454f2.js"),x=require("./Image-a2c2ab9c.js"),I=require("./Popup-383abb2e.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-cab2bcd2.js"),z=require("./organizations-cf1ab766.js"),D=require("./EmptyState-7658d7d6.js"),P=require("./_plugin-vue_export-helper-f246444f.js"),F=require("vue-i18n");require("./globals-928eb13c.js");require("./CardOrganization-63dcc83b.js");require("./ButtonFollow-bf5e6d42.js");require("./index-2059e444.js");require("./Chips-3dac276c.js");require("./IconEdit-4cfe2115.js");require("./vue-draggable-next.esm-bundler-21a209c6.js");const O={class:"min-h-100vh pd-thin"},L={class:"mn-thin flex-v-center t-left flex-nowrap flex"},j={class:"flex-v-center flex-nowrap flex t-left"},U=e.createElementVNode("span",{class:""},"Topics for ",-1),A={class:"w-max bg-grey pd-medium radius-big mn-semi flex-nowrap flex"},H={class:""},T={__name:"Community",setup(c){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("header",L,[e.createElementVNode("h2",j,[U,e.createVNode($.Select,{options:["today","week","month","year"],select:u.state.filter.period,"onUpdate:select":a[0]||(a[0]=o=>u.state.filter.period=o),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",A,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="featured"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[1]||(a[1]=o=>e.unref(n).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="popular"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[2]||(a[2]=o=>e.unref(n).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="new"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[3]||(a[3]=o=>e.unref(n).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),g.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="following"},"t-medium pd-small radius-small"]),onClick:a[4]||(a[4]=o=>e.unref(n).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",H,[e.createVNode(d,null,{default:e.withCtx(({Component:o,route:m})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:m.query}))]),_:2},1024)]),_:1})])])}}},R={class:"pd-thin"},J={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},G={class:"w-full h-full"},Q={key:1,class:"pd-thin pos-fixed pos-l-0 pos-b-0 w-100"},W={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},K={class:"w-m-66r t-left pd-big bg-white radius-big"},X=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),Y=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),Z={key:0,class:"mn-thin"},ee={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},S={__name:"CreateBlogPost",setup(c){const r=w.useRoute(),n=w.useRouter();let t=e.ref(null),a=e.ref(null);const d=e.ref([]),o=e.ref(null);e.onMounted(async()=>{if(r.params.url){const i=await u.read({user:g.state.user._id,url:r.params.url});t.value=i.pop()}else u.clean(),t.value=u.state.current;t.value.owner||(t.value.owner={target:g.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:g.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const l=await z.actions.read({user:g.state.user._id,postable:g.state.user._id,limit:100});console.log(l),a.value=l.map(i=>({name:i.profile.name,_id:i._id,photo:i.profile.photo}))});const m=e.ref(""),s=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>s.value.filter(l=>l.text.toLowerCase().includes(m.value.toLowerCase()))),e.computed(()=>s.value.filter(l=>!d.value.some(i=>i.text===l.text)));const p=e.ref(!1);function b(){p.value=!0}function v(){p.value=!1}function k(){d.value.length>0&&d.value.map(l=>l.text),t.value.status="draft",r.params.url?u.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):u.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function B(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),r.params.url?u.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):u.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function N(){confirm("Are you sure you want to delete this post?")&&u.remove(t.value._id).then(l=>{n.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(l=>{console.log(l)})}return(l,i)=>(e.openBlock(),e.createElementBlock("article",R,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",J,[e.createElementVNode("div",G,[e.createVNode(x._sfc_main,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(x._sfc_main$1,{content:e.unref(t).content,onUpdate:i[0]||(i[0]=_=>e.unref(t).content=_)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",Q,[e.createElementVNode("div",W,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i[1]||(i[1]=_=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:i[2]||(i[2]=_=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:i[3]||(i[3]=_=>b()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(I._sfc_main,{title:"Добавить участника",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createElementVNode("div",K,[X,e.createVNode(V._sfc_main,{onTagsChanged:i[4]||(i[4]=_=>e.unref(t).tags=_),tags:e.unref(t).tags},null,8,["tags"]),Y,e.createVNode(V.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":i[5]||(i[5]=_=>o.value=_),options:e.unref(a),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",Z,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(V.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":i[6]||(i[6]=_=>e.unref(t).creator.hidden=_),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(g._sfc_main,{submit:B,callback:l.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])])]),_:1},8,["isPopupOpen"])]))}},C=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),te={},oe={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},ne=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),ae=[ne];function re(c,r){return e.openBlock(),e.createElementBlock("svg",oe,ae)}const se=P._export_sfc(te,[["render",re]]),le={class:"pd-thin"},q={__name:"BlogPost",setup(c){const r=w.useRoute(),n=e.ref(null),t=e.ref(!0);e.onMounted(async()=>{t.value=!0;const o=await u.read({user:g.state.user._id,url:r.params.url});n.value=o[0],t.value=!1});const a={Textarea:"p",H2:"h2",Bullets:"p",Caption:"p",ImageUpload:x._sfc_main$3};function d(o){return o.type==="Textarea"?{innerHTML:o.content,class:"p-medium"}:o.type==="H2"?{innerHTML:o.content,class:"h3"}:o.type==="Caption"?{innerHTML:o.content}:o.type==="ImageUpload"?{src:o.content}:{}}return(o,m)=>(e.openBlock(),e.createElementBlock("section",le,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[t.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,s=>e.createVNode(se,{key:s})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(D._sfc_main,{key:0,title:"No Blogpost Found",description:"Currently, there are no blogposts 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(()=>[!t.value&&n.value?(e.openBlock(),e.createBlock(u._sfc_main$1,{key:0,onClick:m[0]||(m[0]=s=>o.$router.push({name:"Blogpost",params:{url:n.value.url}})),blogpost:n.value,user:g.state.user._id,type:"blogpostPage",class:e.normalizeClass(["mn-medium",{"br-b br-solid br-black-transp-10":o.index!==n.value.length-1}])},{default:e.withCtx(()=>[e.createElementVNode("section",null,[n.value&&n.value.content?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value.content,(s,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a[s.type]),e.mergeProps({key:p,index:p,component:s,prop:s,class:s.class,content:"content"},d(s),{class:"mn-regular"}),null,16,["index","component","prop","class"]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["blogpost","user","class"])):e.createCommentVNode("",!0),e.createVNode($._sfc_main,{class:"mn-small"}),!t.value&&n.value?(e.openBlock(),e.createBlock(x._sfc_main$2,{key:1,type:"blogpost",target:n.value._id,owner:g.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ie=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),M={__name:"Blog",setup(c){const r=w.useRoute(),n=w.useRouter();return r.params.category||(r.params.category="featured"),e.onMounted(()=>{if(r.query){const t=r.query,a={tags:t.tags?t.tags.split(","):[],period:t.period?t.period:"week"};u.state.filter=a}}),e.watch(()=>u.state.filter,(t,a)=>{const d={...r.query};Object.keys(a).forEach(m=>{d[m]&&delete d[m]});const o=Object.fromEntries(Object.entries(t).filter(([m,s])=>Array.isArray(s)&&s.length>0||typeof s=="string"&&s).map(([m,s])=>[m,Array.isArray(s)?s.join(","):s]));Object.assign(d,o),n.replace({query:d})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(u._sfc_main,{category:e.unref(r).params.category,user:g.state.user._id,period:e.unref(r).query.period},null,8,["category","user","period"])]))}},ce=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"})),ue={class:"w-100 cols-4 t-left flex-nowrap flex"},de={key:0,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},me=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),pe={class:"t-semi uppercase"},ge=e.createElementVNode("br",null,null,-1),_e={key:1,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},fe=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"💬",-1),he={class:"t-semi uppercase"},ve=e.createElementVNode("br",null,null,-1),be={key:2,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ye=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),we={class:"t-semi uppercase"},ke=e.createElementVNode("br",null,null,-1),xe={__name:"Activity",props:{likes:Number,comments:Number,subscriptions:Number},setup(c){return(r,n)=>(e.openBlock(),e.createElementBlock("section",ue,[c.likes?(e.openBlock(),e.createElementBlock("div",de,[me,e.createElementVNode("span",pe,[e.createTextVNode(e.toDisplayString(c.likes),1),ge,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),c.comments?(e.openBlock(),e.createElementBlock("div",_e,[fe,e.createElementVNode("span",he,[e.createTextVNode(e.toDisplayString(c.comments),1),ve,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),c.subscriptions?(e.openBlock(),e.createElementBlock("div",be,[ye,e.createElementVNode("span",we,[e.createTextVNode(e.toDisplayString(c.subscriptions),1),ke,e.createTextVNode("subscriptions")])])):e.createCommentVNode("",!0)]))}},Be={class:"pd-thin radius-extra flex-nowrap flex"},Ne=["innerHTML"],Ve={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["First placeholder","Second placeholder","Third placeholder"],ru:["Первый плейсхолдер","Второй плейсхолдер","Третий плейсхолдер"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(c,{emit:r}){const n=c,{t,locale:a}=F.useI18n();let d=e.ref(0),o=e.ref(n.input),m=e.ref(n.placeholder),s=e.ref(n.enableTyping),p=e.ref(null),b=e.ref(""),v=e.ref(!0),k=null;function B(){r("action")}function N(h){r("update:input",h),b.value=h}function l(){d.value=(d.value+1)%n.placeholderTexts[a.value].length}function i(){s.value=!1,clearInterval(p.value),m.value=n.placeholder,b.value||(o.value="")}function _(){!b.value&&n.enableTyping&&(s.value=!0,m.value="",E())}function E(){let h=n.placeholderTexts[a.value][d.value],f=0,y=!1;k=setInterval(()=>{v.value=!v.value},200),p.value=setInterval(()=>{s.value&&(y?(o.value=o.value.slice(0,-1),o.value=h.substring(0,f)+(v.value&&f%2?"|":""),f--):(o.value=h.substring(0,f)+(v.value&&f%2?"|":""),f++),f>h.length&&n.loopTyping&&setTimeout(()=>{y=!0,o.value=h.substring(0,f)},333),f===0&&y&&(y=!1,l(),h=n.placeholderTexts[a.value][d.value]))},n.typingSpeed)}return e.onMounted(()=>{n.enableTyping&&E()}),e.watchEffect(()=>{s.value||(clearInterval(p.value),clearInterval(k))}),(h,f)=>(e.openBlock(),e.createElementBlock("div",Be,[e.createVNode(g.Field,{field:e.unref(o),"onUpdate:field":[f[0]||(f[0]=y=>e.isRef(o)?o.value=y:o=y),N],placeholder:e.unref(m),onInput:l,onFocus:i,onBlur:_,class:"w-100 pd-small p-big"},null,8,["field","placeholder"]),c.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:B,class:"w-min hover_bg-white hover-t-black t-black bg-main button",innerHTML:c.action},null,8,Ne)):e.createCommentVNode("",!0)]))}};const Ee={class:"pd-thin"},Ce={class:"o-hidden t-black bg-main pd-big radius-big"},$e=e.createElementVNode("header",{class:"t-center z-index-1 mn-big"},[e.createElementVNode("h2",{class:"mn-l-auto mn-r-auto w-m-40r mn-medium"},"Stay Updated with The Latest in Cannabis."),e.createElementVNode("p",{class:"t-transp p-big"},"Subscribe to our newsletter for news, insights, and more from the Weeder universe.")],-1),Pe={class:"z-index-1 mn-big w-100 flex-nowrap flex"},Te=e.createElementVNode("div",{class:"w-100 h-100 pos-absolute pos-t-50-negative pos-r-0 z-index-0 grid"},[e.createElementVNode("div",{class:"spiral"})],-1),Se={__name:"SubscribeNewsletter",setup(c){let r=e.ref("");return(n,t)=>(e.openBlock(),e.createElementBlock("section",Ee,[e.createElementVNode("div",Ce,[$e,e.createElementVNode("div",Pe,[e.createVNode(Ve,{input:e.unref(r),typingSpeed:75,loopTyping:!1,enableTyping:!1,placeholder:"Please enter your email",action:"Subscribe","onUpdate:input":t[0]||(t[0]=a=>e.isRef(r)?r.value=a:r=a),onAction:t[1]||(t[1]=a=>n.router.push({name:"Product Recommmendation",query:{mood:n.mood}})),class:"mn-l-auto mn-r-auto bg-white t-black w-50"},null,8,["input"])]),Te])]))}};const qe={class:"container container-joinus"},Me={class:"content"},Ie={class:"h0 mn-big"},ze=e.createElementVNode("p",{class:"w-m-33r t-center mn-small p-big"},"Together, we're shaping the future of the globals cannabis community.",-1),De=e.createElementVNode("button",{class:"bg-black t-white button"},"Join Now",-1),Fe={__name:"JoinUs",setup(c){const r=e.ref(120950),n=e.ref(["/assets/images/reviews/01.png","/assets/images/reviews/02.png","/assets/images/reviews/03.png","/assets/images/reviews/04.png","/assets/images/reviews/05.png","/assets/images/reviews/06.png"]),t=()=>{setInterval(()=>{r.value+=Math.floor(Math.random()*5)+1},330)},a={minSize:"6rem",maxSize:"10rem",minDuration:5,maxDuration:15,spawnPoints:[10,90]};e.onMounted(()=>{d(),t()});const d=()=>{n.value.forEach((o,m)=>{let s=document.createElement("img");s.src=o,s.classList.add("floating-image");let p=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],b=(Math.random()-.5)*2*10;s.style.left=`${p+b}%`,s.style.animationDuration=`${Math.random()*(a.maxDuration-a.minDuration)+a.minDuration}s`,document.querySelector(".container").appendChild(s),s.addEventListener("animationiteration",()=>{const v=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],k=(Math.random()-.5)*2*10;s.style.left=`${v+k}%`})})};return(o,m)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",Me,[e.createElementVNode("span",Ie,e.toDisplayString(r.value.toLocaleString()),1),ze,De])]))}};const Oe=c=>(e.pushScopeId("data-v-18db0d1b"),c=c(),e.popScopeId(),c),Le={class:"community-feed"},je=Oe(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),Ue={class:"grid-container"},Ae={__name:"HotPosts",async setup(c){let r,n;const t=e.ref([]),a=async()=>{const o=await u.read({skip:0,limit:7,period:"year"});console.log(o),t.value=o};[r,n]=e.withAsyncContext(()=>a()),await r,n();const d=o=>{switch(o){case 0:return"grid-item-2x2";case 1:return"grid-item-2x1";case 2:return"grid-item-1x1";case 3:case 4:return"grid-item-1x1";case 6:return"grid-item-2x1";default:return""}};return(o,m)=>(e.openBlock(),e.createElementBlock("section",Le,[je,e.createElementVNode("div",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(s,p)=>(e.openBlock(),e.createBlock(u._sfc_main$1,{blogpost:s,owner:g.state.user._id,key:p,class:e.normalizeClass(d(p))},null,8,["blogpost","owner","class"]))),128))])]))}},He=P._export_sfc(Ae,[["__scopeId","data-v-18db0d1b"]]),Re=[{path:"community",component:T,meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},children:[{path:":category?",name:"Blog",meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},component:()=>Promise.resolve().then(()=>ce)}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>ie)},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)}];exports.CardBlogpost=u._sfc_main$1;exports.Feed=u._sfc_main;exports.FooterBlogpost=u._sfc_main$2;exports.blogpostsStore=u.blogposts;exports.reactionsStore=u.reactions;exports.Comments=x._sfc_main$2;exports.Activity=xe;exports.Blog=M;exports.BlogPost=q;exports.Community=T;exports.CreateBlogPost=S;exports.HotPosts=He;exports.JoinUs=Fe;exports.SubscribeNewsletter=Se;exports.blogpostsRoutes=Re;
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),w=require("vue-router"),$=require("./Publics-71b9efbe.js"),u=require("./Feed-c9e6190e.js"),g=require("./auth-4415a97a.js"),x=require("./Image-22e17cef.js"),I=require("./Popup-ad5f59d0.js"),V=require("./Breadcrumbs.vue_vue_type_style_index_0_lang-c6aba800.js"),z=require("./organizations-65937ba4.js"),D=require("./EmptyState-7658d7d6.js"),P=require("./_plugin-vue_export-helper-f246444f.js"),F=require("vue-i18n");require("./globals-928eb13c.js");require("./CardOrganization-4d22037e.js");require("./ButtonFollow-351486b0.js");require("./index-b41aac19.js");require("./Chips-3dac276c.js");require("./IconEdit-4cfe2115.js");require("./vue-draggable-next.esm-bundler-21a209c6.js");const O={class:"min-h-100vh pd-thin"},L={class:"mn-thin flex-v-center t-left flex-nowrap flex"},j={class:"flex-v-center flex-nowrap flex t-left"},U=e.createElementVNode("span",{class:""},"Topics for ",-1),A={class:"w-max bg-grey pd-medium radius-big mn-semi flex-nowrap flex"},H={class:""},T={__name:"Community",setup(c){const r=w.useRoute(),n=w.useRouter();return(t,a)=>{const d=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",O,[e.createElementVNode("header",L,[e.createElementVNode("h2",j,[U,e.createVNode($.Select,{options:["today","week","month","year"],select:u.state.filter.period,"onUpdate:select":a[0]||(a[0]=o=>u.state.filter.period=o),placeholder:"Select type",class:"w-max mn-l-small bg-grey pd-thin radius-medium h2 t-center t-black"},null,8,["select"])])]),e.createElementVNode("ul",A,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="featured"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[1]||(a[1]=o=>e.unref(n).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="popular"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[2]||(a[2]=o=>e.unref(n).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="new"},"mn-r-small t-medium pd-small radius-small"]),onClick:a[3]||(a[3]=o=>e.unref(n).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),g.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(r).params.category==="following"},"t-medium pd-small radius-small"]),onClick:a[4]||(a[4]=o=>e.unref(n).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",H,[e.createVNode(d,null,{default:e.withCtx(({Component:o,route:m})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:m.query}))]),_:2},1024)]),_:1})])])}}},R={class:"pd-thin"},J={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},G={class:"w-full h-full"},Q={key:1,class:"pd-thin pos-fixed pos-l-0 pos-b-0 w-100"},W={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},K={class:"w-m-66r t-left pd-big bg-white radius-big"},X=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),Y=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),Z={key:0,class:"mn-thin"},ee={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},S={__name:"CreateBlogPost",setup(c){const r=w.useRoute(),n=w.useRouter();let t=e.ref(null),a=e.ref(null);const d=e.ref([]),o=e.ref(null);e.onMounted(async()=>{if(r.params.url){const i=await u.read({user:g.state.user._id,url:r.params.url});t.value=i.pop()}else u.clean(),t.value=u.state.current;t.value.owner||(t.value.owner={target:g.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:g.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(o.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const l=await z.actions.read({user:g.state.user._id,postable:g.state.user._id,limit:100});console.log(l),a.value=l.map(i=>({name:i.profile.name,_id:i._id,photo:i.profile.photo}))});const m=e.ref(""),s=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>s.value.filter(l=>l.text.toLowerCase().includes(m.value.toLowerCase()))),e.computed(()=>s.value.filter(l=>!d.value.some(i=>i.text===l.text)));const p=e.ref(!1);function b(){p.value=!0}function v(){p.value=!1}function k(){d.value.length>0&&d.value.map(l=>l.text),t.value.status="draft",r.params.url?u.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):u.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function B(){o.value&&(t.value.owner={target:o.value._id,type:"organization"}),o.value||(t.value.creator.hidden=!1),o.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),r.params.url?u.update(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)}):u.create(t.value).then(l=>{n.push({name:"BlogPost",params:{url:l.url}})}).catch(l=>{console.log(l)})}function N(){confirm("Are you sure you want to delete this post?")&&u.remove(t.value._id).then(l=>{n.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(l=>{console.log(l)})}return(l,i)=>(e.openBlock(),e.createElementBlock("article",R,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",J,[e.createElementVNode("div",G,[e.createVNode(x._sfc_main,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(x._sfc_main$1,{content:e.unref(t).content,onUpdate:i[0]||(i[0]=_=>e.unref(t).content=_)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",Q,[e.createElementVNode("div",W,[e.unref(r).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:i[1]||(i[1]=_=>N()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:i[2]||(i[2]=_=>k()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:i[3]||(i[3]=_=>b()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(I._sfc_main,{title:"Добавить участника",onClosePopup:v,isPopupOpen:p.value},{default:e.withCtx(()=>[e.createElementVNode("div",K,[X,e.createVNode(V._sfc_main,{onTagsChanged:i[4]||(i[4]=_=>e.unref(t).tags=_),tags:e.unref(t).tags},null,8,["tags"]),Y,e.createVNode(V.SelectMulti,{modelValue:o.value,"onUpdate:modelValue":i[5]||(i[5]=_=>o.value=_),options:e.unref(a),multiple:!1,taggable:!1,placeholder:"Type to search or add tag",label:"name","track-by":"_id",class:"mn-medium bg-grey radius-medium pd-small"},null,8,["modelValue","options"]),o.value?(e.openBlock(),e.createElementBlock("h5",Z,"Options:")):e.createCommentVNode("",!0),o.value?(e.openBlock(),e.createElementBlock("div",ee,[e.createVNode(V.Checkbox,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":i[6]||(i[6]=_=>e.unref(t).creator.hidden=_),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(g._sfc_main,{submit:B,callback:l.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])])]),_:1},8,["isPopupOpen"])]))}},C=Object.freeze(Object.defineProperty({__proto__:null,default:S},Symbol.toStringTag,{value:"Module"})),te={},oe={width:"100%",height:"20rem",xmlns:"http://www.w3.org/2000/svg"},ne=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),ae=[ne];function re(c,r){return e.openBlock(),e.createElementBlock("svg",oe,ae)}const se=P._export_sfc(te,[["render",re]]),le={class:"pd-thin"},q={__name:"BlogPost",setup(c){const r=w.useRoute(),n=e.ref(null),t=e.ref(!0);e.onMounted(async()=>{t.value=!0;const o=await u.read({user:g.state.user._id,url:r.params.url});n.value=o[0],t.value=!1});const a={Textarea:"p",H2:"h2",Bullets:"p",Caption:"p",ImageUpload:x._sfc_main$3};function d(o){return o.type==="Textarea"?{innerHTML:o.content,class:"p-medium"}:o.type==="H2"?{innerHTML:o.content,class:"h3"}:o.type==="Caption"?{innerHTML:o.content}:o.type==="ImageUpload"?{src:o.content}:{}}return(o,m)=>(e.openBlock(),e.createElementBlock("section",le,[e.createVNode(e.TransitionGroup,{tag:"ul",name:"fade",class:"o-hidden bg-grey radius-big"},{default:e.withCtx(()=>[t.value?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},e.renderList(3,s=>e.createVNode(se,{key:s})),64)):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[!t.value&&!n.value?(e.openBlock(),e.createBlock(D._sfc_main,{key:0,title:"No Blogpost Found",description:"Currently, there are no blogposts 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(()=>[!t.value&&n.value?(e.openBlock(),e.createBlock(u._sfc_main$1,{key:0,onClick:m[0]||(m[0]=s=>o.$router.push({name:"Blogpost",params:{url:n.value.url}})),blogpost:n.value,user:g.state.user._id,type:"blogpostPage",class:e.normalizeClass(["mn-medium",{"br-b br-solid br-black-transp-10":o.index!==n.value.length-1}])},{default:e.withCtx(()=>[e.createElementVNode("section",null,[n.value&&n.value.content?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(n.value.content,(s,p)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a[s.type]),e.mergeProps({key:p,index:p,component:s,prop:s,class:s.class,content:"content"},d(s),{class:"mn-regular"}),null,16,["index","component","prop","class"]))),128)):e.createCommentVNode("",!0)])]),_:1},8,["blogpost","user","class"])):e.createCommentVNode("",!0),e.createVNode($._sfc_main,{class:"mn-small"}),!t.value&&n.value?(e.openBlock(),e.createBlock(x._sfc_main$2,{key:1,type:"blogpost",target:n.value._id,owner:g.state.user._id},null,8,["target","owner"])):e.createCommentVNode("",!0)]),_:1})]))}},ie=Object.freeze(Object.defineProperty({__proto__:null,default:q},Symbol.toStringTag,{value:"Module"})),M={__name:"Blog",setup(c){const r=w.useRoute(),n=w.useRouter();return r.params.category||(r.params.category="featured"),e.onMounted(()=>{if(r.query){const t=r.query,a={tags:t.tags?t.tags.split(","):[],period:t.period?t.period:"week"};u.state.filter=a}}),e.watch(()=>u.state.filter,(t,a)=>{const d={...r.query};Object.keys(a).forEach(m=>{d[m]&&delete d[m]});const o=Object.fromEntries(Object.entries(t).filter(([m,s])=>Array.isArray(s)&&s.length>0||typeof s=="string"&&s).map(([m,s])=>[m,Array.isArray(s)?s.join(","):s]));Object.assign(d,o),n.replace({query:d})},{deep:!0}),(t,a)=>(e.openBlock(),e.createElementBlock("section",null,[e.createVNode(u._sfc_main,{category:e.unref(r).params.category,user:g.state.user._id,period:e.unref(r).query.period},null,8,["category","user","period"])]))}},ce=Object.freeze(Object.defineProperty({__proto__:null,default:M},Symbol.toStringTag,{value:"Module"})),ue={class:"w-100 cols-4 t-left flex-nowrap flex"},de={key:0,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},me=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),pe={class:"t-semi uppercase"},ge=e.createElementVNode("br",null,null,-1),_e={key:1,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},fe=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"💬",-1),he={class:"t-semi uppercase"},ve=e.createElementVNode("br",null,null,-1),be={key:2,class:"w-100 br-2px br-solid br-white-transp-10 radius-small pd-small flex-v-center flex-nowrap flex"},ye=e.createElementVNode("p",{class:"h4 i-medium mn-r-small"},"👍",-1),we={class:"t-semi uppercase"},ke=e.createElementVNode("br",null,null,-1),xe={__name:"Activity",props:{likes:Number,comments:Number,subscriptions:Number},setup(c){return(r,n)=>(e.openBlock(),e.createElementBlock("section",ue,[c.likes?(e.openBlock(),e.createElementBlock("div",de,[me,e.createElementVNode("span",pe,[e.createTextVNode(e.toDisplayString(c.likes),1),ge,e.createTextVNode("likes")])])):e.createCommentVNode("",!0),c.comments?(e.openBlock(),e.createElementBlock("div",_e,[fe,e.createElementVNode("span",he,[e.createTextVNode(e.toDisplayString(c.comments),1),ve,e.createTextVNode("comments")])])):e.createCommentVNode("",!0),c.subscriptions?(e.openBlock(),e.createElementBlock("div",be,[ye,e.createElementVNode("span",we,[e.createTextVNode(e.toDisplayString(c.subscriptions),1),ke,e.createTextVNode("subscriptions")])])):e.createCommentVNode("",!0)]))}},Be={class:"pd-thin radius-extra flex-nowrap flex"},Ne=["innerHTML"],Ve={__name:"FieldBig",props:{input:String,placeholder:{type:String},action:{type:String,default:"Action"},placeholderTexts:{type:Object,default:()=>({en:["First placeholder","Second placeholder","Third placeholder"],ru:["Первый плейсхолдер","Второй плейсхолдер","Третий плейсхолдер"]})},typingSpeed:{type:Number,default:200},loopTyping:{type:Boolean,default:!1},enableTyping:{type:Boolean,default:!1}},emits:["update:input","action"],setup(c,{emit:r}){const n=c,{t,locale:a}=F.useI18n();let d=e.ref(0),o=e.ref(n.input),m=e.ref(n.placeholder),s=e.ref(n.enableTyping),p=e.ref(null),b=e.ref(""),v=e.ref(!0),k=null;function B(){r("action")}function N(h){r("update:input",h),b.value=h}function l(){d.value=(d.value+1)%n.placeholderTexts[a.value].length}function i(){s.value=!1,clearInterval(p.value),m.value=n.placeholder,b.value||(o.value="")}function _(){!b.value&&n.enableTyping&&(s.value=!0,m.value="",E())}function E(){let h=n.placeholderTexts[a.value][d.value],f=0,y=!1;k=setInterval(()=>{v.value=!v.value},200),p.value=setInterval(()=>{s.value&&(y?(o.value=o.value.slice(0,-1),o.value=h.substring(0,f)+(v.value&&f%2?"|":""),f--):(o.value=h.substring(0,f)+(v.value&&f%2?"|":""),f++),f>h.length&&n.loopTyping&&setTimeout(()=>{y=!0,o.value=h.substring(0,f)},333),f===0&&y&&(y=!1,l(),h=n.placeholderTexts[a.value][d.value]))},n.typingSpeed)}return e.onMounted(()=>{n.enableTyping&&E()}),e.watchEffect(()=>{s.value||(clearInterval(p.value),clearInterval(k))}),(h,f)=>(e.openBlock(),e.createElementBlock("div",Be,[e.createVNode(g.Field,{field:e.unref(o),"onUpdate:field":[f[0]||(f[0]=y=>e.isRef(o)?o.value=y:o=y),N],placeholder:e.unref(m),onInput:l,onFocus:i,onBlur:_,class:"w-100 pd-small p-big"},null,8,["field","placeholder"]),c.action?(e.openBlock(),e.createElementBlock("button",{key:0,onClick:B,class:"w-min hover_bg-white hover-t-black t-black bg-main button",innerHTML:c.action},null,8,Ne)):e.createCommentVNode("",!0)]))}};const Ee={class:"pd-thin"},Ce={class:"o-hidden t-black bg-main pd-big radius-big"},$e=e.createElementVNode("header",{class:"t-center z-index-1 mn-big"},[e.createElementVNode("h2",{class:"mn-l-auto mn-r-auto w-m-40r mn-medium"},"Stay Updated with The Latest in Cannabis."),e.createElementVNode("p",{class:"t-transp p-big"},"Subscribe to our newsletter for news, insights, and more from the Weeder universe.")],-1),Pe={class:"z-index-1 mn-big w-100 flex-nowrap flex"},Te=e.createElementVNode("div",{class:"w-100 h-100 pos-absolute pos-t-50-negative pos-r-0 z-index-0 grid"},[e.createElementVNode("div",{class:"spiral"})],-1),Se={__name:"SubscribeNewsletter",setup(c){let r=e.ref("");return(n,t)=>(e.openBlock(),e.createElementBlock("section",Ee,[e.createElementVNode("div",Ce,[$e,e.createElementVNode("div",Pe,[e.createVNode(Ve,{input:e.unref(r),typingSpeed:75,loopTyping:!1,enableTyping:!1,placeholder:"Please enter your email",action:"Subscribe","onUpdate:input":t[0]||(t[0]=a=>e.isRef(r)?r.value=a:r=a),onAction:t[1]||(t[1]=a=>n.router.push({name:"Product Recommmendation",query:{mood:n.mood}})),class:"mn-l-auto mn-r-auto bg-white t-black w-50"},null,8,["input"])]),Te])]))}};const qe={class:"container container-joinus"},Me={class:"content"},Ie={class:"h0 mn-big"},ze=e.createElementVNode("p",{class:"w-m-33r t-center mn-small p-big"},"Together, we're shaping the future of the globals cannabis community.",-1),De=e.createElementVNode("button",{class:"bg-black t-white button"},"Join Now",-1),Fe={__name:"JoinUs",setup(c){const r=e.ref(120950),n=e.ref(["/assets/images/reviews/01.png","/assets/images/reviews/02.png","/assets/images/reviews/03.png","/assets/images/reviews/04.png","/assets/images/reviews/05.png","/assets/images/reviews/06.png"]),t=()=>{setInterval(()=>{r.value+=Math.floor(Math.random()*5)+1},330)},a={minSize:"6rem",maxSize:"10rem",minDuration:5,maxDuration:15,spawnPoints:[10,90]};e.onMounted(()=>{d(),t()});const d=()=>{n.value.forEach((o,m)=>{let s=document.createElement("img");s.src=o,s.classList.add("floating-image");let p=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],b=(Math.random()-.5)*2*10;s.style.left=`${p+b}%`,s.style.animationDuration=`${Math.random()*(a.maxDuration-a.minDuration)+a.minDuration}s`,document.querySelector(".container").appendChild(s),s.addEventListener("animationiteration",()=>{const v=a.spawnPoints[Math.floor(Math.random()*a.spawnPoints.length)],k=(Math.random()-.5)*2*10;s.style.left=`${v+k}%`})})};return(o,m)=>(e.openBlock(),e.createElementBlock("div",qe,[e.createElementVNode("div",Me,[e.createElementVNode("span",Ie,e.toDisplayString(r.value.toLocaleString()),1),ze,De])]))}};const Oe=c=>(e.pushScopeId("data-v-18db0d1b"),c=c(),e.popScopeId(),c),Le={class:"community-feed"},je=Oe(()=>e.createElementVNode("h2",{class:"w-m-75r mn-auto pd-t-big pd-b-big t-center"},"Discover the Vibrant Community",-1)),Ue={class:"grid-container"},Ae={__name:"HotPosts",async setup(c){let r,n;const t=e.ref([]),a=async()=>{const o=await u.read({skip:0,limit:7,period:"year"});console.log(o),t.value=o};[r,n]=e.withAsyncContext(()=>a()),await r,n();const d=o=>{switch(o){case 0:return"grid-item-2x2";case 1:return"grid-item-2x1";case 2:return"grid-item-1x1";case 3:case 4:return"grid-item-1x1";case 6:return"grid-item-2x1";default:return""}};return(o,m)=>(e.openBlock(),e.createElementBlock("section",Le,[je,e.createElementVNode("div",Ue,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.value,(s,p)=>(e.openBlock(),e.createBlock(u._sfc_main$1,{blogpost:s,owner:g.state.user._id,key:p,class:e.normalizeClass(d(p))},null,8,["blogpost","owner","class"]))),128))])]))}},He=P._export_sfc(Ae,[["__scopeId","data-v-18db0d1b"]]),Re=[{path:"community",component:T,meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},children:[{path:":category?",name:"Blog",meta:{title:{en:"Community",ru:"Коммьюнити"},title_hide:!0},component:()=>Promise.resolve().then(()=>ce)}]},{path:"community/posts/create",name:"Create BlogPost",meta:{title:{en:"Create Post",ru:"Создать Пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)},{path:"community/posts/:url",name:"BlogPost",meta:{title:{en:"Post",ru:"Пост"}},component:()=>Promise.resolve().then(()=>ie)},{path:"community/posts/:url/edit",name:"Edit BlogPost",meta:{title:{en:"Edit Post",ru:"Редактировать пост"},authorize:[]},component:()=>Promise.resolve().then(()=>C)}];exports.CardBlogpost=u._sfc_main$1;exports.Feed=u._sfc_main;exports.FooterBlogpost=u._sfc_main$2;exports.blogpostsStore=u.blogposts;exports.reactionsStore=u.reactions;exports.Comments=x._sfc_main$2;exports.Activity=xe;exports.Blog=M;exports.BlogPost=q;exports.Community=T;exports.CreateBlogPost=S;exports.HotPosts=He;exports.JoinUs=Fe;exports.SubscribeNewsletter=Se;exports.blogpostsRoutes=Re;
|
package/dist/community.client.js
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
import { resolveComponent as Y, openBlock as i, createElementBlock as p, createElementVNode as o, createVNode as h, normalizeClass as B, unref as c, createCommentVNode as v, withCtx as k, Transition as G, createBlock as I, resolveDynamicComponent as Q, ref as g, onMounted as F, computed as V, createTextVNode as T, createStaticVNode as Z, TransitionGroup as H, Fragment as D, renderList as U, mergeProps as ee, watch as te, toDisplayString as N, watchEffect as se, isRef as W, withAsyncContext as ae, pushScopeId as oe, popScopeId as ne } from "vue";
|
2
2
|
import { useRoute as z, useRouter as A } from "vue-router";
|
3
|
-
import { S as le, _ as re } from "./Publics-
|
4
|
-
import { s as M, r as L, c as ie, u as q, a as R, b as ue, d as K, _ as ce } from "./Feed-
|
5
|
-
import { e as ss, f as as, g as os } from "./Feed-
|
6
|
-
import { s as w, _ as pe, F as de } from "./auth-
|
7
|
-
import { _ as me, a as ge, b as _e, c as he } from "./Image-
|
8
|
-
import { _ as fe } from "./Popup-
|
9
|
-
import { _ as ve, S as be, C as ye } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-
|
10
|
-
import { a as we } from "./organizations-
|
3
|
+
import { S as le, _ as re } from "./Publics-5472f70c.mjs";
|
4
|
+
import { s as M, r as L, c as ie, u as q, a as R, b as ue, d as K, _ as ce } from "./Feed-416d84b0.mjs";
|
5
|
+
import { e as ss, f as as, g as os } from "./Feed-416d84b0.mjs";
|
6
|
+
import { s as w, _ as pe, F as de } from "./auth-afa25b86.mjs";
|
7
|
+
import { _ as me, a as ge, b as _e, c as he } from "./Image-c0ae2c5f.mjs";
|
8
|
+
import { _ as fe } from "./Popup-e7c9a43e.mjs";
|
9
|
+
import { _ as ve, S as be, C as ye } from "./Breadcrumbs.vue_vue_type_style_index_0_lang-2426cb6f.mjs";
|
10
|
+
import { a as we } from "./organizations-af965fcf.mjs";
|
11
11
|
import { _ as xe } from "./EmptyState-34d85f10.mjs";
|
12
12
|
import { _ as X } from "./_plugin-vue_export-helper-dad06003.mjs";
|
13
13
|
import { useI18n as $e } from "vue-i18n";
|
14
14
|
import "./globals-96ba60e4.mjs";
|
15
|
-
import "./CardOrganization-
|
16
|
-
import "./ButtonFollow-
|
17
|
-
import "./index-
|
15
|
+
import "./CardOrganization-8c5b582b.mjs";
|
16
|
+
import "./ButtonFollow-3a05d29f.mjs";
|
17
|
+
import "./index-a661083c.mjs";
|
18
18
|
import "./Chips-03ff0c34.mjs";
|
19
19
|
import "./IconEdit-eacf3856.mjs";
|
20
20
|
import "./vue-draggable-next.esm-bundler-ff6e3f52.mjs";
|