@ozdao/prometheus-framework 0.1.94 → 0.1.95
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/auth.server.js +1 -1
- package/dist/auth.server.mjs +1 -1
- package/dist/community.server.js +1 -1
- package/dist/community.server.mjs +1 -1
- package/dist/events.server.js +1 -1
- package/dist/events.server.mjs +1 -1
- package/dist/files.server.js +1 -1
- package/dist/files.server.mjs +1 -1
- package/dist/gallery.server.js +1 -1
- package/dist/gallery.server.mjs +1 -1
- package/dist/index-96ec80f2.mjs +217 -0
- package/dist/index-fd6fdd90.js +216 -0
- package/dist/middlewares.server.js +1 -1
- package/dist/middlewares.server.mjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +224 -2
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +2 -224
- package/dist/prometheus-framework/src/components/Field/Field.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue.js +76 -2
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +2 -76
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +1 -1
- 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/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -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 +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- 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 +4 -4
- package/dist/prometheus-framework/src/modules/community/store/blogposts.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/store/blogposts.js +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.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 -62
- 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 +62 -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/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.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 +3 -3
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
- 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 +3 -3
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +11 -2
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.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 +3 -3
- 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 +4 -4
- 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 +3 -3
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- 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 +3 -3
- 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 +3 -3
- 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 +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/reports.server.js +1 -1
- package/dist/reports.server.mjs +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/modules/community/components/pages/CreateBlogPost.vue +3 -2
- package/src/modules/community/store/blogposts.js +1 -0
- package/src/modules/middlewares/server/authJwt.js +15 -8
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../Button/Button.vue2.cjs");require("./LocationMarker.vue2.cjs");const w=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),h=r=>(e.pushScopeId("data-v-29acef04"),r=r(),e.popScopeId(),r),y={class:"pos-relative map-container"},v=h(()=>e.createElementVNode("svg",{class:"i-medium",width:"98",height:"98",viewBox:"0 0 98 98",fill:"none",xmlns:"http://www.w3.org/2000/svg"},[e.createElementVNode("path",{d:"M50.0004 31.4995C39.7996 31.4995 31.5 39.7991 31.5 49.9999C31.5 60.2007 39.7996 68.5003 50.0004 68.5003C60.2012 68.5003 68.5008 60.2007 68.5008 49.9999C68.5008 39.7991 60.2012 31.4995 50.0004 31.4995ZM50.0004 63.7944C42.3941 63.7944 36.2059 57.6062 36.2059 49.9999C36.2059 42.3936 42.3941 36.2054 50.0004 36.2054C57.6067 36.2054 63.7949 42.3936 63.7949 49.9999C63.7949 57.6062 57.6067 63.7944 50.0004 63.7944Z",fill:"white"}),e.createElementVNode("path",{d:"M97.6471 47.6471H84.56C83.3977 30.4141 69.5859 16.6024 52.3529 15.44V2.35294C52.3529 1.05255 51.2988 0 50 0C48.6996 0 47.6471 1.05255 47.6471 2.35294V15.44C30.4141 16.6024 16.6024 30.4141 15.44 47.6471H2.35294C1.05255 47.6471 0 48.6996 0 50C0 51.2988 1.05255 52.3529 2.35294 52.3529H15.44C16.6024 69.5859 30.4141 83.3977 47.6471 84.56V97.6471C47.6471 98.9459 48.6996 100 50 100C51.2988 100 52.3529 98.9459 52.3529 97.6471V84.56C69.5859 83.3977 83.3977 69.5859 84.56 52.3529H97.6471C98.9459 52.3529 100 51.2988 100 50C100 48.6996 98.9459 47.6471 97.6471 47.6471ZM50 79.9435C33.4886 79.9435 20.0565 66.5114 20.0565 50C20.0565 33.4886 33.4886 20.0565 50 20.0565C66.5098 20.0565 79.9435 33.4886 79.9435 50C79.9435 66.5098 66.5098 79.9435 50 79.9435Z",fill:"white"})],-1)),L=[v],M={__name:"LocationMarker",props:{location:{type:Object,default:{lat:48.6900735,lng:41.1620239}},address:{type:String,default:""},apiKey:String},emits:["update:location","update:address","update:country","update:state","update:city"],setup(r,{emit:C}){const t=r,a=C,d=e.ref(null);let c,i;e.onMounted(()=>{c=new google.maps.Map(d.value,{center:t.location,zoom:15,mapTypeControl:!1,fullscreenControl:!1}),i=new google.maps.Marker({position:t.location,map:c,draggable:!0}),i.addListener("dragend",o=>{const n={lat:o.latLng.lat(),lng:o.latLng.lng()};a("update:location",n),u(n)})}),e.watchEffect(()=>{t.location&&i&&i.setPosition(new google.maps.LatLng(t.location.lat,t.location.lng))}),e.watchEffect(()=>{if(t.location&&c){const o=new google.maps.LatLng(t.location.lat,t.location.lng);c.setCenter(o)}});function u(o){new google.maps.Geocoder().geocode({location:o},(s,p)=>{if(p==="OK")if(s[0]){a("update:address",s[0].formatted_address);let g="",f="",m="";s[0].address_components.forEach(l=>{l.types.includes("country")&&(g=l.long_name),l.types.includes("administrative_area_level_1")&&(f=l.long_name),l.types.includes("locality")&&(m=l.long_name)}),a("update:country",g),a("update:state",f),a("update:city",m)}else console.error("No results found");else console.error("Geocoder failed due to: "+p)})}async function _(){navigator.geolocation?navigator.geolocation.getCurrentPosition(o=>{const n={lat:o.coords.latitude,lng:o.coords.longitude};a("update:location",n),u(n)},()=>{console.error("Error getting location")}):console.error("Geolocation is not supported by this browser.")}return(o,n)=>(e.openBlock(),e.createElementBlock("div",y,[e.createElementVNode("div",{ref_key:"mapContainer",ref:d,class:"w-100 h-100"},null,512),e.createElementVNode("button",{class:"pos-absolute pos-t-regular pos-r-regular i-semi bg-second radius-extra",onClick:_},L)]))}},E=w.default(M,[["__scopeId","data-v-29acef04"]]);exports.default=E;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as h, onMounted as y, watchEffect as C, openBlock as v, createElementBlock as L, createElementVNode as s, pushScopeId as M, popScopeId as k } from "vue";
|
2
|
-
import "../Button/Button.
|
2
|
+
import "../Button/Button.vue2.js";
|
3
3
|
import "./LocationMarker.vue2.js";
|
4
4
|
import b from "../../../../_virtual/_plugin-vue_export-helper.js";
|
5
5
|
const x = (l) => (M("data-v-29acef04"), l = l(), k(), l), E = { class: "pos-relative map-container" }, S = /* @__PURE__ */ x(() => /* @__PURE__ */ s("svg", {
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
|
@@ -1,80 +1,4 @@
|
|
1
|
-
|
2
|
-
import "./Select.vue2.js";
|
3
|
-
import M from "../../../../_virtual/_plugin-vue_export-helper.js";
|
4
|
-
const N = ["onClick"], O = {
|
5
|
-
key: 0,
|
6
|
-
class: "t-transp mn-r-small"
|
7
|
-
}, T = { class: "w-100" }, V = ["onClick"], $ = {
|
8
|
-
key: 0,
|
9
|
-
class: "w-100"
|
10
|
-
}, z = {
|
11
|
-
key: 0,
|
12
|
-
class: "mn-t-thin invalid-feedback"
|
13
|
-
}, E = {
|
14
|
-
__name: "Select",
|
15
|
-
props: {
|
16
|
-
label: String,
|
17
|
-
select: [String, Object],
|
18
|
-
placeholder: { type: String, default: "Please select an item" },
|
19
|
-
options: { type: Array, default: () => [] },
|
20
|
-
validation: Boolean
|
21
|
-
},
|
22
|
-
emits: ["update:select", "focus", "blur"],
|
23
|
-
setup(s, { emit: w }) {
|
24
|
-
const d = w, a = s, n = f(a.select), o = f(!1);
|
25
|
-
S(() => a.select, (e) => {
|
26
|
-
n.value = e;
|
27
|
-
});
|
28
|
-
const y = x(() => a.select ? a.options.filter((e) => e !== a.select) : a.options), m = () => {
|
29
|
-
o.value = !o.value, d(o.value ? "focus" : "blur");
|
30
|
-
}, C = (e) => {
|
31
|
-
n.value = e, m(), d("update:select", n.value);
|
32
|
-
};
|
33
|
-
return (e, L) => {
|
34
|
-
var p;
|
35
|
-
return t(), l(v, null, [
|
36
|
-
i("div", {
|
37
|
-
onClick: h(m, ["stop"]),
|
38
|
-
class: _([e.$attrs.class, "cursor-pointer flex-nowrap flex"])
|
39
|
-
}, [
|
40
|
-
s.label ? (t(), l("div", O, [
|
41
|
-
i("span", null, r(s.label), 1)
|
42
|
-
])) : u("", !0),
|
43
|
-
i("li", T, [
|
44
|
-
i("span", null, r(((p = n.value) == null ? void 0 : p.name) || n.value || s.placeholder), 1)
|
45
|
-
]),
|
46
|
-
k(b, {
|
47
|
-
mode: "out-in",
|
48
|
-
name: "TransitionTranslateY"
|
49
|
-
}, {
|
50
|
-
default: g(() => [
|
51
|
-
o.value ? (t(), l("ul", {
|
52
|
-
key: 0,
|
53
|
-
class: _([e.$attrs.class, "pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"])
|
54
|
-
}, [
|
55
|
-
(t(!0), l(v, null, B(y.value, (c) => (t(), l("li", {
|
56
|
-
onClick: h((j) => C(c), ["stop"])
|
57
|
-
}, [
|
58
|
-
c ? (t(), l("span", $, r(c.name || c), 1)) : u("", !0)
|
59
|
-
], 8, V))), 256))
|
60
|
-
], 2)) : u("", !0)
|
61
|
-
]),
|
62
|
-
_: 1
|
63
|
-
})
|
64
|
-
], 10, N),
|
65
|
-
k(b, {
|
66
|
-
mode: "out-in",
|
67
|
-
name: "fade"
|
68
|
-
}, {
|
69
|
-
default: g(() => [
|
70
|
-
s.validation ? (t(), l("div", z, " * " + r(s.validation.message), 1)) : u("", !0)
|
71
|
-
]),
|
72
|
-
_: 1
|
73
|
-
})
|
74
|
-
], 64);
|
75
|
-
};
|
76
|
-
}
|
77
|
-
}, I = /* @__PURE__ */ M(E, [["__scopeId", "data-v-dfe03dc2"]]);
|
1
|
+
const e = "";
|
78
2
|
export {
|
79
|
-
|
3
|
+
e as default
|
80
4
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Select.vue.cjs");const p=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),k=["onClick"],v={key:0,class:"t-transp mn-r-small"},f={class:"w-100"},h=["onClick"],g={key:0,class:"w-100"},B={key:0,class:"mn-t-thin invalid-feedback"},_={__name:"Select",props:{label:String,select:[String,Object],placeholder:{type:String,default:"Please select an item"},options:{type:Array,default:()=>[]},validation:Boolean},emits:["update:select","focus","blur"],setup(l,{emit:u}){const c=u,o=l,n=e.ref(o.select),a=e.ref(!1);e.watch(()=>o.select,t=>{n.value=t});const d=e.computed(()=>o.select?o.options.filter(t=>t!==o.select):o.options),r=()=>{a.value=!a.value,c(a.value?"focus":"blur")},m=t=>{n.value=t,r(),c("update:select",n.value)};return(t,C)=>{var i;return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",{onClick:e.withModifiers(r,["stop"]),class:e.normalizeClass([t.$attrs.class,"cursor-pointer flex-nowrap flex"])},[l.label?(e.openBlock(),e.createElementBlock("div",v,[e.createElementVNode("span",null,e.toDisplayString(l.label),1)])):e.createCommentVNode("",!0),e.createElementVNode("li",f,[e.createElementVNode("span",null,e.toDisplayString(((i=n.value)==null?void 0:i.name)||n.value||l.placeholder),1)]),e.createVNode(e.Transition,{mode:"out-in",name:"TransitionTranslateY"},{default:e.withCtx(()=>[a.value?(e.openBlock(),e.createElementBlock("ul",{key:0,class:e.normalizeClass([t.$attrs.class,"pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"])},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,s=>(e.openBlock(),e.createElementBlock("li",{onClick:e.withModifiers(E=>m(s),["stop"])},[s?(e.openBlock(),e.createElementBlock("span",g,e.toDisplayString(s.name||s),1)):e.createCommentVNode("",!0)],8,h))),256))],2)):e.createCommentVNode("",!0)]),_:1})],10,k),e.createVNode(e.Transition,{mode:"out-in",name:"fade"},{default:e.withCtx(()=>[l.validation?(e.openBlock(),e.createElementBlock("div",B," * "+e.toDisplayString(l.validation.message),1)):e.createCommentVNode("",!0)]),_:1})],64)}}},y=p.default(_,[["__scopeId","data-v-dfe03dc2"]]);exports.default=y;
|
@@ -1,4 +1,80 @@
|
|
1
|
-
|
1
|
+
import { ref as f, watch as S, computed as x, openBlock as t, createElementBlock as l, Fragment as v, createElementVNode as i, withModifiers as h, normalizeClass as _, toDisplayString as r, createCommentVNode as u, createVNode as k, Transition as b, withCtx as g, renderList as B } from "vue";
|
2
|
+
import "./Select.vue.js";
|
3
|
+
import M from "../../../../_virtual/_plugin-vue_export-helper.js";
|
4
|
+
const N = ["onClick"], O = {
|
5
|
+
key: 0,
|
6
|
+
class: "t-transp mn-r-small"
|
7
|
+
}, T = { class: "w-100" }, V = ["onClick"], $ = {
|
8
|
+
key: 0,
|
9
|
+
class: "w-100"
|
10
|
+
}, z = {
|
11
|
+
key: 0,
|
12
|
+
class: "mn-t-thin invalid-feedback"
|
13
|
+
}, E = {
|
14
|
+
__name: "Select",
|
15
|
+
props: {
|
16
|
+
label: String,
|
17
|
+
select: [String, Object],
|
18
|
+
placeholder: { type: String, default: "Please select an item" },
|
19
|
+
options: { type: Array, default: () => [] },
|
20
|
+
validation: Boolean
|
21
|
+
},
|
22
|
+
emits: ["update:select", "focus", "blur"],
|
23
|
+
setup(s, { emit: w }) {
|
24
|
+
const d = w, a = s, n = f(a.select), o = f(!1);
|
25
|
+
S(() => a.select, (e) => {
|
26
|
+
n.value = e;
|
27
|
+
});
|
28
|
+
const y = x(() => a.select ? a.options.filter((e) => e !== a.select) : a.options), m = () => {
|
29
|
+
o.value = !o.value, d(o.value ? "focus" : "blur");
|
30
|
+
}, C = (e) => {
|
31
|
+
n.value = e, m(), d("update:select", n.value);
|
32
|
+
};
|
33
|
+
return (e, L) => {
|
34
|
+
var p;
|
35
|
+
return t(), l(v, null, [
|
36
|
+
i("div", {
|
37
|
+
onClick: h(m, ["stop"]),
|
38
|
+
class: _([e.$attrs.class, "cursor-pointer flex-nowrap flex"])
|
39
|
+
}, [
|
40
|
+
s.label ? (t(), l("div", O, [
|
41
|
+
i("span", null, r(s.label), 1)
|
42
|
+
])) : u("", !0),
|
43
|
+
i("li", T, [
|
44
|
+
i("span", null, r(((p = n.value) == null ? void 0 : p.name) || n.value || s.placeholder), 1)
|
45
|
+
]),
|
46
|
+
k(b, {
|
47
|
+
mode: "out-in",
|
48
|
+
name: "TransitionTranslateY"
|
49
|
+
}, {
|
50
|
+
default: g(() => [
|
51
|
+
o.value ? (t(), l("ul", {
|
52
|
+
key: 0,
|
53
|
+
class: _([e.$attrs.class, "pos-absolute pos-t-100 pos-l-0 z-index-5 w-100 mn-t-thin"])
|
54
|
+
}, [
|
55
|
+
(t(!0), l(v, null, B(y.value, (c) => (t(), l("li", {
|
56
|
+
onClick: h((j) => C(c), ["stop"])
|
57
|
+
}, [
|
58
|
+
c ? (t(), l("span", $, r(c.name || c), 1)) : u("", !0)
|
59
|
+
], 8, V))), 256))
|
60
|
+
], 2)) : u("", !0)
|
61
|
+
]),
|
62
|
+
_: 1
|
63
|
+
})
|
64
|
+
], 10, N),
|
65
|
+
k(b, {
|
66
|
+
mode: "out-in",
|
67
|
+
name: "fade"
|
68
|
+
}, {
|
69
|
+
default: g(() => [
|
70
|
+
s.validation ? (t(), l("div", z, " * " + r(s.validation.message), 1)) : u("", !0)
|
71
|
+
]),
|
72
|
+
_: 1
|
73
|
+
})
|
74
|
+
], 64);
|
75
|
+
};
|
76
|
+
}
|
77
|
+
}, I = /* @__PURE__ */ M(E, [["__scopeId", "data-v-dfe03dc2"]]);
|
2
78
|
export {
|
3
|
-
|
79
|
+
I as default
|
4
80
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");require("../../../../components/Field/Field.vue2.cjs");require("../../../../components/Button/Button.vue2.cjs");require("../../../../../../node_modules/vue3-carousel/dist/carousel.css.cjs");require("vue-i18n");require("../../../../../../node_modules/vue3-carousel/dist/carousel.es.cjs");require("../sections/SliderFeatures.vue2.cjs");const r=require("vue-router");require("../../store/auth.cjs");require("../../../middlewares/client/inputs.validation.cjs");const u={class:"cols-2-1_2 gap-small pd-small bg-white"},n=e.createElementVNode("section",{class:"w-100 desktop-only o-hidden radius-big bg-grad-main"},null,-1),s={__name:"Auth",setup(a){return e.ref(null),e.ref(null),e.ref(null),r.useRoute(),r.useRouter(),e.ref("email"),(o,c)=>{const t=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",u,[e.createVNode(t,{class:"pd-medium br-solid br-1px br-grey radius-big w-m-66r t-center"},{default:e.withCtx(({Component:i,route:l})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(i),{ref:"page",key:l.path,localPosition:o.localPosition},null,8,["localPosition"]))]),_:2},1024)]),_:1}),n])}}};exports.default=s;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref as e, resolveComponent as a, openBlock as o, createElementBlock as m, createVNode as t, withCtx as r, Transition as c, createBlock as p, resolveDynamicComponent as u, createElementVNode as d } from "vue";
|
2
2
|
import "../../../../components/Tab/Tab.vue.js";
|
3
|
-
import "../../../../components/Field/Field.
|
4
|
-
import "../../../../components/Button/Button.
|
3
|
+
import "../../../../components/Field/Field.vue2.js";
|
4
|
+
import "../../../../components/Button/Button.vue2.js";
|
5
5
|
import "../../../../../../node_modules/vue3-carousel/dist/carousel.css.js";
|
6
6
|
import "vue-i18n";
|
7
7
|
import "../../../../../../node_modules/vue3-carousel/dist/carousel.es.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue");require("../../../../components/Field/Field.vue2.cjs");const f=require("vue-router"),S=require("vue-i18n"),c=require("../../store/auth.cjs"),g=require("../../store/twofa.cjs"),y=require("../../../globals/store/globals.cjs"),b=require("../../localization/EnterCode.json.cjs"),D={class:"t-center pd-medium"},I={class:"mn-medium"},q={class:"mn-big t-transp"},k={class:"w-100 mn-big flex-nowrap flex"},C={key:1},N={__name:"EnterCode",setup(P){const m=f.useRoute(),v=f.useRouter(),{t:d}=S.useI18n(b.default),o=n.reactive({digits:["","","",""],error:null});n.watch(()=>o.digits[0],s=>{if(console.log(String(s)),console.log(String(s).length),s&&String(s).length>1){let e=String(s).split("");console.log(e);let t=[...o.digits];e.forEach((l,r)=>{console.log(r),console.log(t[r]),console.log(l),t[r]=l}),o.digits=t,u(3)}});const p=n.ref(null),i=n.ref(0);async function E(){try{await g.sendCode(c.state.user,m.query.type,c.state.user.phone?"phone":"email"),i.value=30;const s=setInterval(()=>{i.value>0?i.value-=1:clearInterval(s)},1e3)}catch{y.setError({response:{data:{errorCode:"CODE_NOT_SENT"}}})}}const a=(s,e)=>{if(s.key==="Backspace"&&(o.digits[e]===null||o.digits[e]===void 0||o.digits[e]==="")){s.preventDefault();const t=document.querySelectorAll("input"),l=e>0?t[e-1]:null;l&&(l.focus(),l.setSelectionRange(l.value.length,l.value.length))}},u=s=>{const e=document.querySelectorAll("input"),t=e[s+1],l=s>0?e[s-1]:null;if(o.digits[s]!==""&&o.digits[s]!==null&&o.digits[s]!==void 0&&s<4&&(s<3?t.focus():p.value.focus()),(o.digits[s]===null||o.digits[s]===void 0||o.digits[s]==="")&&s>0&&l.focus(),o.digits.every(r=>r!=="")){const r=o.digits.join(""),w=g.state.code.code.toString();r===w?(g.state.code.isValid=!0,v.push({path:"/auth/enter-password",query:{type:g.state.code.type,method:m.query.method}})):(y.setError({response:{data:{errorCode:"WRONG_CODE"}}}),p.value.focus(),o.digits=["","","",""])}};return(s,e)=>(n.openBlock(),n.createElementBlock("section",D,[n.createElementVNode("h3",I,n.toDisplayString(n.unref(d)("verifyNumberTitle")),1),n.createElementVNode("p",q,n.toDisplayString(n.unref(d)("instructions")),1),n.createElementVNode("div",k,[n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[0]||(e[0]=t=>o.digits[0]=t),ref_key:"firstInput",ref:p,maxlength:"1",onInput:e[1]||(e[1]=t=>u(0)),onPaste:e[2]||(e[2]=t=>s.onPaste(t,0)),onKeydown:e[3]||(e[3]=t=>a(t,0)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[0]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[4]||(e[4]=t=>o.digits[1]=t),maxlength:"1",onInput:e[5]||(e[5]=t=>u(1)),onPaste:e[6]||(e[6]=t=>s.onPaste(t,1)),onKeydown:e[7]||(e[7]=t=>a(t,1)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[1]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[8]||(e[8]=t=>o.digits[2]=t),maxlength:"1",onInput:e[9]||(e[9]=t=>u(2)),onPaste:e[10]||(e[10]=t=>s.onPaste(t,2)),onKeydown:e[11]||(e[11]=t=>a(t,2)),class:"w-100 h1 pd-small t-center bg-grey radius-small mn-r-small"},null,544),[[n.vModelText,o.digits[2]]]),n.withDirectives(n.createElementVNode("input",{type:"number","onUpdate:modelValue":e[12]||(e[12]=t=>o.digits[3]=t),maxlength:"1",onInput:e[13]||(e[13]=t=>u(3)),onPaste:e[14]||(e[14]=t=>s.onPaste(t,3)),onKeydown:e[15]||(e[15]=t=>a(t,3)),class:"w-100 h1 pd-small t-center bg-grey radius-small"},null,544),[[n.vModelText,o.digits[3]]])]),i.value<1?(n.openBlock(),n.createElementBlock("a",{key:0,onClick:E,class:"t-blue"},n.toDisplayString(n.unref(d)("resendCode")),1)):(n.openBlock(),n.createElementBlock("span",C,n.toDisplayString(i.value)+" "+n.toDisplayString(n.unref(d)("secondsResend")),1))]))}};exports.default=N;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { reactive as D, watch as $, ref as b, openBlock as v, createElementBlock as c, createElementVNode as r, toDisplayString as d, unref as m, withDirectives as g, vModelText as f } from "vue";
|
2
|
-
import "../../../../components/Field/Field.
|
2
|
+
import "../../../../components/Field/Field.vue2.js";
|
3
3
|
import { useRoute as q, useRouter as K } from "vue-router";
|
4
4
|
import { useI18n as N } from "vue-i18n";
|
5
5
|
import { state as C } from "../../store/auth.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),d=require("vue-router"),h=require("vue-i18n"),t=require("../../store/auth.cjs"),i=require("../../../middlewares/client/inputs.validation.cjs"),w=require("../../localization/EnterPassword.json.cjs");require("./EnterPassword.vue2.cjs");const y={class:"t-left pd-medium"},_={class:"mn-small"},g={key:0,class:"mn-semi t-transp"},k={key:1,class:"mn-semi t-transp"},q={class:"mn-semi radius-small o-hidden"},B={key:2,class:"p-medium t-semi mn-semi"},E=e.createElementVNode("a",{class:"t-second",href:"https://thecommunephuket.com/legal/eula",target:"_blank",rel:"noopener noreferrer"},"End User License Agreement (EULA)",-1),P={key:0},v={key:1},b={__name:"EnterPassword",setup(V){const n=e.ref(null),{t:s}=h.useI18n(w.default),r=d.useRoute(),u=d.useRouter();e.ref("phone");async function c(){try{await i.validateInputs(n,i.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}r.query.method==="reset-password"&&await t.actions.updatePassword(t.state.user,r.query.type),r.query.method!=="reset-password"&&await t.actions.signup(t.state.user,r.query.type)}function p(){u.push({name:"User Profile",params:{_id:t.state.user._id},query:{afterAuth:"true"}})}return(m,o)=>(e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("h3",_,e.toDisplayString(e.unref(s)("almostDone")),1),e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("p",g,e.toDisplayString(e.unref(s)("newPasswordPrompt")),1)):(e.openBlock(),e.createElementBlock("p",k,e.toDisplayString(e.unref(s)("registrationPasswordPrompt")),1)),e.createElementVNode("div",q,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":o[0]||(o[0]=a=>t.state.user.password=a),type:"password",validation:n.value,placeholder:e.unref(s)("passwordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","validation","placeholder"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":o[1]||(o[1]=a=>t.state.user.passwordRepeat=a),type:"password",placeholder:e.unref(s)("repeatPasswordPlaceholder"),class:"bg-grey pd-small radius-small mn-thin"},null,8,["field","placeholder"])]),e.unref(r).query.method!=="reset-password"?(e.openBlock(),e.createElementBlock("div",B,[e.createTextVNode(" By registering, you agree to our "),E])):e.createCommentVNode("",!0),e.createVNode(f.default,{submit:c,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.unref(r).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",P,e.toDisplayString(e.unref(s)("changePasswordBtn")),1)):(e.openBlock(),e.createElementBlock("span",v,e.toDisplayString(e.unref(s)("registerBtn")),1))]),_:1})]))}};exports.default=b;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref as u, openBlock as o, createElementBlock as a, createElementVNode as m, toDisplayString as d, unref as e, createVNode as l, createTextVNode as g, createCommentVNode as P, withCtx as k } from "vue";
|
2
2
|
import "../../../../components/Tab/Tab.vue.js";
|
3
|
-
import c from "../../../../components/Field/Field.
|
4
|
-
import q from "../../../../components/Button/Button.
|
3
|
+
import c from "../../../../components/Field/Field.vue.js";
|
4
|
+
import q from "../../../../components/Button/Button.vue.js";
|
5
5
|
import { useRoute as b, useRouter as v } from "vue-router";
|
6
6
|
import { useI18n as E } from "vue-i18n";
|
7
7
|
import { state as s, actions as h } from "../../store/auth.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("../../../../components/Tab/Tab.vue.cjs");const l=require("../../../../components/Field/Field.vue.cjs"),f=require("../../../../components/Button/Button.vue.cjs"),d=require("vue-router"),t=require("../../store/auth.cjs"),u=require("../../store/invites.cjs"),c=require("../../../middlewares/client/inputs.validation.cjs");require("./Invite.vue2.cjs");const h={class:"t-left pd-medium"},v=e.createElementVNode("h3",{class:"mn-small"},"Вы были пригилашены в организацию",-1),y=e.createElementVNode("p",{class:"mn-semi t-transp"},"Пожалуйста, укажите пароль, на этом регистрация будет закочена.",-1),b={class:"mn-semi radius-small o-hidden"},q={key:0},k={key:1},B={__name:"Invite",async setup(E){let r,n;const i=e.ref(null),s=d.useRoute(),p=d.useRouter();[r,n]=e.withAsyncContext(()=>u.actions.readOne(s.query.inviteCode)),await r,n();async function m(){try{await c.validateInputs(i,c.validatePassword,t.state.user.password,"Некорректный пароль")}catch{throw new Error}await t.actions.signup(t.state.user,s.query.type,s.query.inviteCode)}function _(){p.push({name:"Dashboard"})}return(w,a)=>(e.openBlock(),e.createElementBlock("section",h,[v,y,e.createElementVNode("div",b,[e.createVNode(l.default,{field:t.state.user.password,"onUpdate:field":a[0]||(a[0]=o=>t.state.user.password=o),type:"password",validation:i.value,label:"Пароль",placeholder:"******",class:"bg-white radius-small mn-small"},null,8,["field","validation"]),e.createVNode(l.default,{field:t.state.user.passwordRepeat,"onUpdate:field":a[1]||(a[1]=o=>t.state.user.passwordRepeat=o),type:"password",label:"Повторите пароль",placeholder:"******",class:"bg-white radius-small mn-semi"},null,8,["field"])]),e.createVNode(f.default,{disabled:u.state.invite===null,submit:m,callback:_,class:"mn-big"},{default:e.withCtx(()=>[e.unref(s).query.method==="reset-password"?(e.openBlock(),e.createElementBlock("span",q,"Поменять пароль")):(e.openBlock(),e.createElementBlock("span",k,"Зарегистрироваться"))]),_:1},8,["disabled"])]))}};exports.default=B;
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { ref as w, withAsyncContext as h, openBlock as o, createElementBlock as r, createElementVNode as n, createVNode as i, withCtx as y, unref as b } from "vue";
|
2
2
|
import "../../../../components/Tab/Tab.vue.js";
|
3
|
-
import p from "../../../../components/Field/Field.
|
4
|
-
import v from "../../../../components/Button/Button.
|
3
|
+
import p from "../../../../components/Field/Field.vue.js";
|
4
|
+
import v from "../../../../components/Button/Button.vue.js";
|
5
5
|
import { useRoute as k, useRouter as g } from "vue-router";
|
6
6
|
import { state as e, actions as q } from "../../store/auth.js";
|
7
7
|
import { actions as x, state as C } from "../../store/invites.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),h=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),v=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),_=require("../../../../components/Button/Button.vue.cjs"),u=require("vue-router"),w=require("vue-i18n"),V=require("../../localization/ResetPassword.json.cjs"),s=require("../../store/auth.cjs");require("../../store/twofa.cjs");const n=require("../../../middlewares/client/inputs.validation.cjs");require("./ResetPassword.vue2.cjs");const g={class:"t-left pd-medium"},y={class:"mn-small"},N={class:"mn-small t-transp"},b={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},E={key:0,class:"mn-semi radius-small o-hidden"},k={class:"mn-small t-transp"},C={key:0,class:"mn-semi radius-small o-hidden"},P={class:"mn-small t-transp"},S={__name:"ResetPassword",setup(I){const{t}=w.useI18n(V.default),i=e.ref(null),d=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await n.validateInputs(i,n.validatePhone,s.state.user.phone,"Некорректный телефон"),a.value==="email"&&await n.validateInputs(d,n.validateEmail,s.state.user.email,"Некорректный email")}catch{throw new Error}try{await s.actions.resetPassword(s.state.user,a.value,"reset-password")}catch(r){throw console.log(r),new Error}}function p(){c.push({name:"Enter Code",query:{type:a.value,method:"reset-password"}})}return(r,o)=>(e.openBlock(),e.createElementBlock("section",g,[e.createElementVNode("h3",y,e.toDisplayString(e.unref(t)("forgotPasswordTitle")),1),e.createElementVNode("p",N,e.toDisplayString(e.unref(t)("instructions")),1),e.createElementVNode("div",b,[e.createVNode(h.default,{selected:a.value,"onUpdate:selected":o[0]||(o[0]=l=>a.value=l),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="phone"?(e.openBlock(),e.createElementBlock("div",E,[e.createElementVNode("p",k,e.toDisplayString(e.unref(t)("smsInfo")),1),e.createVNode(v.default,{modelValue:s.state.user.phone,"onUpdate:modelValue":o[1]||(o[1]=l=>s.state.user.phone=l),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])])):e.createCommentVNode("",!0)]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[a.value==="email"?(e.openBlock(),e.createElementBlock("div",C,[e.createElementVNode("p",P,e.toDisplayString(e.unref(t)("emailInfo")),1),e.createVNode(f.default,{field:s.state.user.email,"onUpdate:field":o[2]||(o[2]=l=>s.state.user.email=l),placeholder:e.unref(t)("emailPlaceholder"),validation:d.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])])):e.createCommentVNode("",!0)]),_:1})]),e.createVNode(_.default,{submit:m,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1})]))}};exports.default=S;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ref as m, openBlock as u, createElementBlock as p, createElementVNode as l, toDisplayString as r, unref as t, createVNode as i, Transition as _, withCtx as c, createCommentVNode as v, createTextVNode as V } from "vue";
|
2
2
|
import P from "../../../../components/Tab/Tab.vue2.js";
|
3
|
-
import C from "../../../../components/Field/Field.
|
3
|
+
import C from "../../../../components/Field/Field.vue.js";
|
4
4
|
import E from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
-
import I from "../../../../components/Button/Button.
|
5
|
+
import I from "../../../../components/Button/Button.vue.js";
|
6
6
|
import { useRoute as k, useRouter as x } from "vue-router";
|
7
7
|
import { useI18n as N } from "vue-i18n";
|
8
8
|
import T from "../../localization/ResetPassword.json.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Tab/Tab.vue2.cjs"),c=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../components/Tab/Tab.vue2.cjs"),c=require("../../../../components/Field/Field.vue.cjs"),V=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),w=require("../../../../components/Button/Button.vue.cjs"),p=require("vue-router"),N=require("vue-i18n"),b=require("../../localization/SignIn.json.cjs"),a=require("../../store/auth.cjs"),r=require("../../../middlewares/client/inputs.validation.cjs");require("./SignIn.vue2.cjs");const y={class:""},S=["src"],E={class:"mn-medium"},q=e.createElementVNode("br",null,null,-1),x={class:"t-semi"},C={class:"mn-big"},D={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},P={class:"pos-relative"},T={class:"mn-thin radius-small"},I={class:"mn-thin radius-small o-hidden"},U={class:"w-100 mn-big"},k={__name:"SignIn",setup(j){const d=e.ref(null),m=e.ref(null),u=e.ref(null);p.useRoute();const h=p.useRouter(),{t:l}=N.useI18n(b.default),n=e.ref("phone"),f=o=>new Promise((s,i)=>{const t=document.createElement("script");t.type="text/javascript",t.src=o,t.onload=s,t.onerror=i,document.head.appendChild(t)});e.onMounted(async()=>{await f("https://appleid.cdn-apple.com/appleauth/static/jsapi/appleid/1/en_US/appleid.auth.js")});async function v(){try{n.value==="phone"&&await r.validateInputs(d,r.validatePhone,a.state.user.phone,"Некорректный телефон"),n.value==="email"&&await r.validateInputs(u,r.validateEmail,a.state.user.email,"Некорректный email")}catch{throw new Error}const o={...a.state.user};o.phone=a.state.user.phone.number,await a.actions.login(o,n.value)}function _(){h.push({name:"User Profile",params:{_id:a.state.user._id},query:{afterAuth:"true"}})}return(o,s)=>{const i=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",y,[e.createElementVNode("img",{src:"/logo/logo_square.svg",class:"i-extra radius-small mn-small"},null,8,S),e.createElementVNode("h3",E,[e.createTextVNode(e.toDisplayString(e.unref(l)("title"))+" ",1),q,e.createElementVNode("span",x,e.toDisplayString(e.unref(l)("subtitle")),1)]),e.createElementVNode("p",C,[e.createVNode(i,{to:{name:"Sign Up"},class:"underline t-second"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signup")),1)]),_:1})]),e.createElementVNode("div",D,[e.createVNode(g.default,{selected:n.value,"onUpdate:selected":s[0]||(s[0]=t=>n.value=t),tabs:[{name:e.unref(l)("phone"),value:"phone"},{name:e.unref(l)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",P,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",T,[e.createVNode(V.default,{modelValue:a.state.user.phone,"onUpdate:modelValue":s[1]||(s[1]=t=>a.state.user.phone=t),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:d.value,mode:"national",inputOptions:{placeholder:e.unref(l)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,n.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",I,[e.createVNode(c.default,{field:a.state.user.email,"onUpdate:field":s[2]||(s[2]=t=>a.state.user.email=t),placeholder:e.unref(l)("emailPlaceholder"),validation:u.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,n.value==="email"]])]),_:1})]),e.createVNode(c.default,{field:a.state.user.password,"onUpdate:field":s[3]||(s[3]=t=>a.state.user.password=t),type:"password",validation:m.value,placeholder:e.unref(l)("passwordPlaceholder"),class:"bg-grey pd-medium radius-small mn-semi"},null,8,["field","validation","placeholder"]),e.createElementVNode("div",U,[e.createVNode(i,{to:"/auth/reset-password",class:"underline d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("forgotPassword")),1)]),_:1})]),e.createVNode(w.default,{submit:v,callback:_,class:"mn-thin"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)("signin")),1)]),_:1})])}}};exports.default=k;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ref as p, onMounted as U, resolveComponent as k, openBlock as C, createElementBlock as E, createElementVNode as l, createTextVNode as c, toDisplayString as d, unref as o, createVNode as i, withCtx as u, Transition as f, withDirectives as v, vShow as g } from "vue";
|
2
2
|
import I from "../../../../components/Tab/Tab.vue2.js";
|
3
|
-
import w from "../../../../components/Field/Field.
|
3
|
+
import w from "../../../../components/Field/Field.vue.js";
|
4
4
|
import D from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
-
import j from "../../../../components/Button/Button.
|
5
|
+
import j from "../../../../components/Button/Button.vue.js";
|
6
6
|
import { useRoute as F, useRouter as N } from "vue-router";
|
7
7
|
import { useI18n as O } from "vue-i18n";
|
8
8
|
import T from "../../localization/SignIn.json.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),v=require("../../../../components/Tab/Tab.vue2.cjs"),f=require("../../../../components/Field/Field.vue.cjs"),_=require("../../../../components/FieldPhone/FieldPhone.vue.cjs"),V=require("../../../../components/Button/Button.vue.cjs"),u=require("vue-router"),g=require("vue-i18n"),w=require("../../localization/SignUp.json.cjs"),n=require("../../store/auth.cjs"),N=require("../../store/twofa.cjs"),s=require("../../../middlewares/client/inputs.validation.cjs");require("./SignUp.vue2.cjs");const b={class:"t-left pd-medium"},E={class:"mn-small"},S={class:"mn-small t-transp"},y={class:"mn-small p-small uppercase t-semi bg-grey radius-big o-hidden"},q={class:"pos-relative"},C={class:"mn-semi radius-small"},D={class:"mn-small t-transp"},x={class:"mn-semi radius-small o-hidden"},T={class:"mn-small t-transp"},k={class:"w-100"},I={__name:"SignUp",setup(P){const{t}=g.useI18n(w.default),i=e.ref(null),r=e.ref(null);u.useRoute();const c=u.useRouter(),a=e.ref("phone");async function m(){try{a.value==="phone"&&await s.validateInputs(i,s.validatePhone,n.state.user.phone,"Некорректный телефон"),a.value==="email"&&await s.validateInputs(r,s.validateEmail,n.state.user.email,"Некорректный email")}catch{throw new Error}try{await N.sendCode(n.state.user,"signup",a.value)}catch{throw new Error}}function p(){c.push({name:"Enter Code"})}return(d,l)=>{const h=e.resolveComponent("router-link");return e.openBlock(),e.createElementBlock("section",b,[e.createElementVNode("h3",E,e.toDisplayString(e.unref(t)("title")),1),e.createElementVNode("p",S,e.toDisplayString(e.unref(t)("description")),1),e.createElementVNode("div",y,[e.createVNode(v.default,{selected:a.value,"onUpdate:selected":l[0]||(l[0]=o=>a.value=o),tabs:[{name:e.unref(t)("phone"),value:"phone"},{name:e.unref(t)("email"),value:"email"}]},null,8,["selected","tabs"])]),e.createElementVNode("div",q,[e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",C,[e.createElementVNode("p",D,e.toDisplayString(e.unref(t)("smsNotice")),1),e.createVNode(_.default,{modelValue:n.state.user.phone,"onUpdate:modelValue":l[1]||(l[1]=o=>n.state.user.phone=o),dropdownOptions:{showDialCodeInSelection:!0,showFlags:!0,showDialCodeInList:!0},validation:i.value,mode:"national",inputOptions:{placeholder:e.unref(t)("phonePlaceholder")},class:"bg-grey pd-small radius-small mn-thin"},null,8,["modelValue","validation","inputOptions"])],512),[[e.vShow,a.value==="phone"]])]),_:1}),e.createVNode(e.Transition,{name:"slide-fade"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",x,[e.createElementVNode("p",T,e.toDisplayString(e.unref(t)("emailNotice")),1),e.createVNode(f.default,{field:n.state.user.email,"onUpdate:field":l[2]||(l[2]=o=>n.state.user.email=o),placeholder:e.unref(t)("emailPlaceholder"),validation:r.value,class:"bg-grey pd-medium radius-small"},null,8,["field","placeholder","validation"])],512),[[e.vShow,a.value==="email"]])]),_:1})]),e.createVNode(V.default,{submit:m,callback:p,class:"mn-big"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("sendCode")),1)]),_:1}),e.createElementVNode("div",k,[e.createVNode(h,{to:"/auth/signin",class:"underline mn-medium d-block t-blue"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("haveAccount")),1)]),_:1})])])}}};exports.default=I;
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ref as d, resolveComponent as C, openBlock as k, createElementBlock as E, createElementVNode as o, toDisplayString as n, unref as t, createVNode as a, Transition as h, withCtx as m, withDirectives as _, vShow as f, createTextVNode as v } from "vue";
|
2
2
|
import x from "../../../../components/Tab/Tab.vue2.js";
|
3
|
-
import N from "../../../../components/Field/Field.
|
3
|
+
import N from "../../../../components/Field/Field.vue.js";
|
4
4
|
import S from "../../../../components/FieldPhone/FieldPhone.vue.js";
|
5
|
-
import D from "../../../../components/Button/Button.
|
5
|
+
import D from "../../../../components/Button/Button.vue.js";
|
6
6
|
import { useRoute as I, useRouter as P } from "vue-router";
|
7
7
|
import { useI18n as U } from "vue-i18n";
|
8
8
|
import F from "../../localization/SignUp.json.js";
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../mobile/components/Menu/Menu.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../mobile/components/Menu/Menu.vue.cjs"),n=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),o=require("vue-router"),i={class:""},l=e.createElementVNode("h1",{class:"mn-small"},"Your Backoffice",-1),d=e.createElementVNode("span",null," Organizations ",-1),f=e.createElementVNode("span",null," Events ",-1),c=e.createElementVNode("span",null," Community ",-1),p=e.createElementVNode("span",null," Products ",-1),m=e.createElementVNode("span",null," Leftovers ",-1),_=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",i,[l,e.createVNode(u.default,{class:"bg-grey"},{default:e.withCtx(()=>[e.createVNode(n.default,{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(()=>[d]),_:1}),e.createVNode(n.default,{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(()=>[f]),_:1}),e.createVNode(n.default,{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(()=>[c]),_:1}),e.createVNode(n.default,{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(()=>[p]),_:1}),e.createVNode(n.default,{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(()=>[m]),_:1}),e.createVNode(n.default,{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(()=>[_]),_:1}),e.createVNode(n.default,{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.default,{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.default,{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;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { openBlock as p, createElementBlock as u, createVNode as e, withCtx as a, unref as o, createElementVNode as n } from "vue";
|
2
|
-
import m from "../../../mobile/components/Menu/Menu.
|
2
|
+
import m from "../../../mobile/components/Menu/Menu.vue.js";
|
3
3
|
import i from "../../../mobile/components/Menu/MenuItem.vue.js";
|
4
4
|
import { useRoute as d, useRouter as _ } from "vue-router";
|
5
5
|
const f = { class: "" }, c = /* @__PURE__ */ n("h1", { class: "mn-small" }, "Your Backoffice", -1), k = /* @__PURE__ */ n("span", null, " Organizations ", -1), v = /* @__PURE__ */ n("span", null, " Events ", -1), B = /* @__PURE__ */ n("span", null, " Community ", -1), C = /* @__PURE__ */ n("span", null, " Products ", -1), $ = /* @__PURE__ */ n("span", null, " Leftovers ", -1), y = /* @__PURE__ */ n("span", null, " Orders ", -1), h = /* @__PURE__ */ n("span", null, " Payments ", -1), g = /* @__PURE__ */ n("span", null, " Gallery ", -1), E = /* @__PURE__ */ n("span", null, " Reports ", -1), G = {
|
package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),u=require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),n=require("vue-router"),u=require("../../../../components/Select/Select.vue2.cjs"),a=require("../../store/blogposts.cjs"),c=require("../../../auth/store/auth.cjs"),m={class:"min-h-100vh pd-thin"},d={class:"mn-thin flex-v-center t-left flex-nowrap flex"},p={class:"flex-v-center flex-nowrap flex t-left"},f=e.createElementVNode("span",{class:""},"Topics for ",-1),g={class:"w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex"},h={class:""},w={__name:"Community",setup(k){const l=n.useRoute(),r=n.useRouter();return(y,t)=>{const s=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",m,[e.createElementVNode("header",d,[e.createElementVNode("h2",p,[f,e.createVNode(u.default,{options:["today","week","month","year"],select:a.state.filter.period,"onUpdate:select":t[0]||(t[0]=o=>a.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",g,[e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="featured"},"t-medium pd-thin radius-small"]),onClick:t[1]||(t[1]=o=>e.unref(r).push({name:"Blog"}))},"👑 Featured",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="popular"},"t-medium pd-thin radius-small"]),onClick:t[2]||(t[2]=o=>e.unref(r).push({name:"Blog",params:{category:"popular"}}))},"🔥 Popular",2),e.createElementVNode("li",{class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="new"},"t-medium pd-thin radius-small"]),onClick:t[3]||(t[3]=o=>e.unref(r).push({name:"Blog",params:{category:"new"}}))},"🆕 New",2),c.state.user._id?(e.openBlock(),e.createElementBlock("li",{key:0,class:e.normalizeClass([{"t-white bg-black":e.unref(l).params.category==="following"},"t-medium pd-thin radius-small"]),onClick:t[4]||(t[4]=o=>e.unref(r).push({name:"Blog",params:{category:"following"}}))},"👥 Following",2)):e.createCommentVNode("",!0)]),e.createElementVNode("section",h,[e.createVNode(s,null,{default:e.withCtx(({Component:o,route:i})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(o),{ref:"page",key:i.query}))]),_:2},1024)]),_:1})])])}}};exports.default=w;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { resolveComponent as f, openBlock as n, createElementBlock as m, createElementVNode as o, createVNode as i, normalizeClass as r, unref as t, createCommentVNode as g, withCtx as p, Transition as h, createBlock as w, resolveDynamicComponent as y } from "vue";
|
2
2
|
import { useRoute as _, useRouter as k } from "vue-router";
|
3
|
-
import b from "../../../../components/Select/Select.
|
3
|
+
import b from "../../../../components/Select/Select.vue2.js";
|
4
4
|
import { state as c } from "../../store/blogposts.js";
|
5
5
|
import { state as v } from "../../../auth/store/auth.js";
|
6
6
|
const x = { class: "min-h-100vh pd-thin" }, C = { class: "mn-thin flex-v-center t-left flex-nowrap flex" }, B = { class: "flex-v-center flex-nowrap flex t-left" }, $ = /* @__PURE__ */ o("span", { class: "" }, "Topics for ", -1), N = { class: "w-100 bg-grey pd-small radius-big mn-semi gap-thin flex-nowrap flex" }, V = { class: "" }, D = {
|
package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.vue2.cjs"),V=require("../../../constructor/components/sections/Constructor.vue.cjs"),y=require("../../../../components/Popup/Popup.vue.cjs");require("../../../../components/FieldTags/tag-input.vue.cjs");require("../../../../components/FieldTags/vue-tags-input.scss.cjs");const B=require("../../../../components/FieldTags/BlockTags.vue.cjs"),N=require("../../../../components/Checkbox/Checkbox.vue.cjs"),P=require("../../../../components/SelectMulti/SelectMulti.vue.cjs"),x=require("../../../../components/Button/Button.vue.cjs"),f=require("vue-router"),n=require("../../store/blogposts.cjs"),i=require("../../../auth/store/auth.cjs"),C=require("../../../organizations/store/organizations.cjs"),q={class:"pd-thin"},E={key:0,class:"h-100 w-100 bg-grey pd-big radius-big"},T={class:"w-full h-full"},z={key:1,class:"pd-thin pos-sticky pos-l-0 pos-b-0 w-100"},O={class:"pd-thin radius-big bg-main w-100 flex-nowrap flex"},D=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),M=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),S={key:0,class:"mn-thin"},U={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},A={__name:"CreateBlogPost",setup(R){const s=f.useRoute(),u=f.useRouter();let t=e.ref(null),p=e.ref(null);const c=e.ref([]),r=e.ref(null);e.onMounted(async()=>{if(s.params.url){const a=await n.read({user:i.state.user._id,url:s.params.url});t.value=a.pop()}else n.clean(),t.value=n.state.current;t.value.owner||(t.value.owner={target:i.state.user._id,type:"user"}),t.value.creator||(t.value.creator={target:i.state.user._id,type:"user",hidden:!1}),t.value.owner.type==="organization"&&(r.value={_id:t.value.owner.target._id,name:t.value.owner.target.profile.name,photo:t.value.owner.target.profile.photo});const o=await C.actions.read({user:i.state.user._id,postable:i.state.user._id,limit:100});console.log(o),p.value=o.map(a=>({name:a.profile.name,_id:a._id,photo:a.profile.photo}))});const g=e.ref(""),m=e.ref([{text:"story"},{text:"news"},{text:"guide"},{text:"discussion"},{text:"photos"}]);e.computed(()=>m.value.filter(o=>o.text.toLowerCase().includes(g.value.toLowerCase()))),e.computed(()=>m.value.filter(o=>!c.value.some(a=>a.text===o.text)));const d=e.ref(!1);function v(){d.value=!0}function h(){d.value=!1}function b(){c.value.length>0&&c.value.map(o=>o.text),t.value.status="draft",s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(o)})}function k(){r.value&&(t.value.owner={target:r.value._id,type:"organization"}),r.value||(t.value.creator.hidden=!1),r.value||(t.value.organization=t.value.creator),t.value.status="published",console.log(t.value),s.params.url?n.update(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.error(o)})}function _(){confirm("Are you sure you want to delete this post?")&&n.remove(t.value._id).then(o=>{u.push({name:"User Blogposts",params:{_id:t.value.creator.target._id}})}).catch(o=>{console.log(o)})}return(o,a)=>(e.openBlock(),e.createElementBlock("article",q,[e.unref(t)?(e.openBlock(),e.createElementBlock("section",E,[e.createElementVNode("div",T,[e.createVNode(w.default,{prop:e.unref(t),content:"name",placeholder:"Enter post title",class:"h2"},null,8,["prop"])]),e.createVNode(V.default,{content:e.unref(t).content,onUpdate:a[0]||(a[0]=l=>e.unref(t).content=l)},null,8,["content"])])):e.createCommentVNode("",!0),e.unref(t)?(e.openBlock(),e.createElementBlock("section",z,[e.createElementVNode("div",O,[e.unref(s).params.url?(e.openBlock(),e.createElementBlock("a",{key:0,onClick:a[1]||(a[1]=l=>_()),class:"mn-r-auto bg-red t-white t-black button"},"Delete")):e.createCommentVNode("",!0),e.createElementVNode("a",{onClick:a[2]||(a[2]=l=>b()),class:"mn-l-auto bg-white t-black button"},"To Drafts"),e.createElementVNode("a",{onClick:a[3]||(a[3]=l=>v()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:h,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[D,e.createVNode(B.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),M,e.createVNode(P.default,{modelValue:r.value,"onUpdate:modelValue":a[5]||(a[5]=l=>r.value=l),options:e.unref(p),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"]),r.value?(e.openBlock(),e.createElementBlock("h5",S,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",U,[e.createVNode(N.default,{label:"Hide Author",radio:e.unref(t).creator.hidden,"onUpdate:radio":a[6]||(a[6]=l=>e.unref(t).creator.hidden=l),name:"prices",class:"w-100"},null,8,["radio"])])):e.createCommentVNode("",!0),e.createVNode(x.default,{submit:k,callback:o.redirectTo,class:"w-100 bg-black t-white"},{default:e.withCtx(()=>[e.createTextVNode("Publish")]),_:1},8,["callback"])]),_:1},8,["isPopupOpen"])]))}};exports.default=A;
|
package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as r, onMounted as V, computed as _, openBlock as u, createElementBlock as i, unref as a, createElementVNode as p, createVNode as n, createCommentVNode as m, withCtx as w, createTextVNode as z } from "vue";
|
2
|
-
import D from "../../../constructor/components/elements/Textarea.
|
2
|
+
import D from "../../../constructor/components/elements/Textarea.vue2.js";
|
3
3
|
import N from "../../../constructor/components/sections/Constructor.vue.js";
|
4
4
|
import O from "../../../../components/Popup/Popup.vue.js";
|
5
5
|
import "../../../../components/FieldTags/tag-input.vue.js";
|
@@ -7,7 +7,7 @@ import "../../../../components/FieldTags/vue-tags-input.scss.js";
|
|
7
7
|
import U from "../../../../components/FieldTags/BlockTags.vue.js";
|
8
8
|
import A from "../../../../components/Checkbox/Checkbox.vue.js";
|
9
9
|
import E from "../../../../components/SelectMulti/SelectMulti.vue.js";
|
10
|
-
import L from "../../../../components/Button/Button.
|
10
|
+
import L from "../../../../components/Button/Button.vue.js";
|
11
11
|
import { useRoute as M, useRouter as R } from "vue-router";
|
12
12
|
import { read as S, clean as F, state as H, update as k, create as y, remove as j } from "../../store/blogposts.js";
|
13
13
|
import { state as f } from "../../../auth/store/auth.js";
|
@@ -92,11 +92,11 @@ const G = { class: "pd-thin" }, J = {
|
|
92
92
|
}), s.value || (e.value.creator.hidden = !1), s.value || (e.value.organization = e.value.creator), e.value.status = "published", console.log(e.value), c.params.url ? k(e.value).then((t) => {
|
93
93
|
d.push({ name: "BlogPost", params: { url: t.url } });
|
94
94
|
}).catch((t) => {
|
95
|
-
console.
|
95
|
+
console.error(t);
|
96
96
|
}) : y(e.value).then((t) => {
|
97
97
|
d.push({ name: "BlogPost", params: { url: t.url } });
|
98
98
|
}).catch((t) => {
|
99
|
-
console.
|
99
|
+
console.error(t);
|
100
100
|
});
|
101
101
|
}
|
102
102
|
function T() {
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../../../node_modules/axios/lib/axios.cjs"),u=require("vue"),c=require("../../globals/store/globals.cjs"),s=d.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=u.reactive({all:[],filter:{tags:[],period:""},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",url:"",status:"",name:"",tags:[],owner:{},date:"",views:0,content:[]}});async function m(e={}){e.params=e.params||{},e.params.skip=e.skip||0,e.params.limit=e.limit||9,e.params.tags=e.tags||[],e.period&&(e.params.period=e.period),e.url&&(e.params={url:e.url}),e.category&&(e.params.category=e.category),e.owner&&(e.params.owner=e.owner),e.following&&(e.params.following=e.following),e.creator&&(e.params.creator=e.creator),e.status&&(e.params.status=e.status),e.user&&(e.params.user=e.user),e.params.skip=e.skip||0,e.params.limit=e.limit||10;try{console.log("Request params:"+e.params);const r=await s.get("/api/blog/read",{params:e.params});return e.url?t(r.data,"current"):t(r.data,"all"),Promise.resolve(r.data)}catch(r){return c.setError(r),Promise.reject(r)}}async function i(e){return s.post("/api/blog/create",e).then(r=>(t(r.data,"current"),Promise.resolve(r.data)),r=>(c.setError(r),Promise.reject(r)))}async function f(e){return s.post("/api/blog/update",e).then(r=>(t(r.data,"current"),Promise.resolve(r.data)),r=>(c.setError(r),Promise.reject(r)))}async function g(e){return await s.delete(`/api/blog/delete/${e}`).then(r=>{const l=a.all.findIndex(n=>n._id===e);return l!==-1&&a.all.splice(l,1),Promise.resolve(r.data)},r=>(c.setError(r),Promise.reject(r)))}function t(e,r){a[r]=e}function w(){a.current={_id:"",url:"",status:"",name:"",tags:[],author:"",owner:"",date:"",views:0,content:[]}}function y(e){const r={order:a.project.content.length+1,type:e.type,data:e.data,class:e.class,content:e.content};a.project.content.push(r)}u.watch(a,(e,r)=>{});exports.blockAdd=y;exports.clean=w;exports.create=i;exports.read=m;exports.remove=g;exports.set=t;exports.state=a;exports.update=f;
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("../../../../node_modules/axios/lib/axios.cjs"),u=require("vue"),c=require("../../globals/store/globals.cjs"),s=d.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=u.reactive({all:[],filter:{tags:[],period:""},pagination:{page:1,perPage:18},sort:{current:"popularity",ascending:!1},current:{_id:"",url:"",status:"",name:"",tags:[],owner:{},date:"",views:0,content:[]}});async function m(e={}){e.params=e.params||{},e.params.skip=e.skip||0,e.params.limit=e.limit||9,e.params.tags=e.tags||[],e.period&&(e.params.period=e.period),e.url&&(e.params={url:e.url}),e.category&&(e.params.category=e.category),e.owner&&(e.params.owner=e.owner),e.following&&(e.params.following=e.following),e.creator&&(e.params.creator=e.creator),e.status&&(e.params.status=e.status),e.user&&(e.params.user=e.user),e.params.skip=e.skip||0,e.params.limit=e.limit||10;try{console.log("Request params:"+e.params);const r=await s.get("/api/blog/read",{params:e.params});return e.url?t(r.data,"current"):t(r.data,"all"),Promise.resolve(r.data)}catch(r){return c.setError(r),Promise.reject(r)}}async function i(e){return s.post("/api/blog/create",e).then(r=>(t(r.data,"current"),Promise.resolve(r.data)),r=>(c.setError(r),console.error(r),Promise.reject(r)))}async function f(e){return s.post("/api/blog/update",e).then(r=>(t(r.data,"current"),Promise.resolve(r.data)),r=>(c.setError(r),Promise.reject(r)))}async function g(e){return await s.delete(`/api/blog/delete/${e}`).then(r=>{const l=a.all.findIndex(n=>n._id===e);return l!==-1&&a.all.splice(l,1),Promise.resolve(r.data)},r=>(c.setError(r),Promise.reject(r)))}function t(e,r){a[r]=e}function w(){a.current={_id:"",url:"",status:"",name:"",tags:[],author:"",owner:"",date:"",views:0,content:[]}}function y(e){const r={order:a.project.content.length+1,type:e.type,data:e.data,class:e.class,content:e.content};a.project.content.push(r)}u.watch(a,(e,r)=>{});exports.blockAdd=y;exports.clean=w;exports.create=i;exports.read=m;exports.remove=g;exports.set=t;exports.state=a;exports.update=f;
|
@@ -43,7 +43,7 @@ async function w(e = {}) {
|
|
43
43
|
async function p(e) {
|
44
44
|
return s.post("/api/blog/create", e).then(
|
45
45
|
(a) => (t(a.data, "current"), Promise.resolve(a.data)),
|
46
|
-
(a) => (c(a), Promise.reject(a))
|
46
|
+
(a) => (c(a), console.error(a), Promise.reject(a))
|
47
47
|
);
|
48
48
|
}
|
49
49
|
async function y(e) {
|