@ozdao/prometheus-framework 0.1.87 → 0.1.88
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue.js +2 -49
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Dropdown/Dropdown.vue2.js +49 -2
- 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/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.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 +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/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/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 +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/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/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/DetailsTab.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/modules/auth/store/auth.js +2 -1
@@ -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,51 +1,4 @@
|
|
1
|
-
|
2
|
-
import y from "../FieldPhone/click-outside.js";
|
3
|
-
import "./Dropdown.vue2.js";
|
4
|
-
import O from "../../../../_virtual/_plugin-vue_export-helper.js";
|
5
|
-
const b = {
|
6
|
-
__name: "Dropdown",
|
7
|
-
props: {
|
8
|
-
label: {
|
9
|
-
type: String,
|
10
|
-
default: "Open"
|
11
|
-
},
|
12
|
-
align: {
|
13
|
-
type: String,
|
14
|
-
default: "left"
|
15
|
-
}
|
16
|
-
},
|
17
|
-
setup(t) {
|
18
|
-
let l = y;
|
19
|
-
const e = a(!1);
|
20
|
-
function n() {
|
21
|
-
e.value = !1;
|
22
|
-
}
|
23
|
-
return (r, o) => i((d(), s("div", {
|
24
|
-
class: "dropdown pos-relative",
|
25
|
-
onClick: o[0] || (o[0] = u((x) => e.value = !e.value, ["stop"]))
|
26
|
-
}, [
|
27
|
-
c(f(t.label) + " ", 1),
|
28
|
-
p(m, {
|
29
|
-
name: "TransitionTranslateY",
|
30
|
-
mode: "out-in"
|
31
|
-
}, {
|
32
|
-
default: v(() => [
|
33
|
-
i(g("div", {
|
34
|
-
style: w({ left: t.align === "left" ? "0" : "auto", right: t.align === "right" ? "0" : "auto" }),
|
35
|
-
class: "dropdown-content w-15r radius-big"
|
36
|
-
}, [
|
37
|
-
k(r.$slots, "default", {}, void 0, !0)
|
38
|
-
], 4), [
|
39
|
-
[S, e.value]
|
40
|
-
])
|
41
|
-
]),
|
42
|
-
_: 3
|
43
|
-
})
|
44
|
-
])), [
|
45
|
-
[h(l), n]
|
46
|
-
]);
|
47
|
-
}
|
48
|
-
}, N = /* @__PURE__ */ O(b, [["__scopeId", "data-v-2f59adb5"]]);
|
1
|
+
const _ = "";
|
49
2
|
export {
|
50
|
-
|
3
|
+
_ as default
|
51
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"),a=require("../FieldPhone/click-outside.cjs");require("./Dropdown.vue.cjs");const u=require("../../../../_virtual/_plugin-vue_export-helper.cjs"),s={__name:"Dropdown",props:{label:{type:String,default:"Open"},align:{type:String,default:"left"}},setup(i){let n=a.default;const t=e.ref(!1);function r(){t.value=!1}return(o,l)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"dropdown pos-relative",onClick:l[0]||(l[0]=e.withModifiers(c=>t.value=!t.value,["stop"]))},[e.createTextVNode(e.toDisplayString(i.label)+" ",1),e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[e.withDirectives(e.createElementVNode("div",{style:e.normalizeStyle({left:i.align==="left"?"0":"auto",right:i.align==="right"?"0":"auto"}),class:"dropdown-content w-15r radius-big"},[e.renderSlot(o.$slots,"default",{},void 0,!0)],4),[[e.vShow,t.value]])]),_:3})])),[[e.unref(n),r]])}},d=u.default(s,[["__scopeId","data-v-2f59adb5"]]);exports.default=d;
|
@@ -1,4 +1,51 @@
|
|
1
|
-
|
1
|
+
import { ref as a, withDirectives as i, openBlock as d, createElementBlock as s, withModifiers as u, createTextVNode as c, toDisplayString as f, createVNode as p, Transition as m, withCtx as v, createElementVNode as g, normalizeStyle as w, renderSlot as k, vShow as S, unref as h } from "vue";
|
2
|
+
import y from "../FieldPhone/click-outside.js";
|
3
|
+
import "./Dropdown.vue.js";
|
4
|
+
import O from "../../../../_virtual/_plugin-vue_export-helper.js";
|
5
|
+
const b = {
|
6
|
+
__name: "Dropdown",
|
7
|
+
props: {
|
8
|
+
label: {
|
9
|
+
type: String,
|
10
|
+
default: "Open"
|
11
|
+
},
|
12
|
+
align: {
|
13
|
+
type: String,
|
14
|
+
default: "left"
|
15
|
+
}
|
16
|
+
},
|
17
|
+
setup(t) {
|
18
|
+
let l = y;
|
19
|
+
const e = a(!1);
|
20
|
+
function n() {
|
21
|
+
e.value = !1;
|
22
|
+
}
|
23
|
+
return (r, o) => i((d(), s("div", {
|
24
|
+
class: "dropdown pos-relative",
|
25
|
+
onClick: o[0] || (o[0] = u((x) => e.value = !e.value, ["stop"]))
|
26
|
+
}, [
|
27
|
+
c(f(t.label) + " ", 1),
|
28
|
+
p(m, {
|
29
|
+
name: "TransitionTranslateY",
|
30
|
+
mode: "out-in"
|
31
|
+
}, {
|
32
|
+
default: v(() => [
|
33
|
+
i(g("div", {
|
34
|
+
style: w({ left: t.align === "left" ? "0" : "auto", right: t.align === "right" ? "0" : "auto" }),
|
35
|
+
class: "dropdown-content w-15r radius-big"
|
36
|
+
}, [
|
37
|
+
k(r.$slots, "default", {}, void 0, !0)
|
38
|
+
], 4), [
|
39
|
+
[S, e.value]
|
40
|
+
])
|
41
|
+
]),
|
42
|
+
_: 3
|
43
|
+
})
|
44
|
+
])), [
|
45
|
+
[h(l), n]
|
46
|
+
]);
|
47
|
+
}
|
48
|
+
}, N = /* @__PURE__ */ O(b, [["__scopeId", "data-v-2f59adb5"]]);
|
2
49
|
export {
|
3
|
-
|
50
|
+
N as default
|
4
51
|
};
|
@@ -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.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../../../../node_modules/axios/lib/axios.cjs"),d=require("../../../../../node_modules/js-cookie/src/js.cookie.cjs"),l=require("../../../../node_modules/@capacitor/core/dist/index.cjs"),k=require("vue"),n=require("../../globals/store/globals.cjs"),g=require("./twofa.cjs"),i=w.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=k.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}});async function O(){const e=await
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("../../../../node_modules/axios/lib/axios.cjs"),d=require("../../../../../node_modules/js-cookie/src/js.cookie.cjs"),l=require("../../../../node_modules/@capacitor/core/dist/index.cjs"),k=require("vue"),n=require("../../globals/store/globals.cjs"),g=require("./twofa.cjs"),i=w.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=k.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}});async function O(){const e=await m("user");if(console.log("user cookie is "+e),e){const{_id:t,email:s,phone:c,roles:r,accessToken:o}=e;Object.assign(a.user,{_id:t,email:s,phone:c}),Object.assign(a.access,{token:o,roles:r,status:!!o}),i.interceptors.request.use(u=>(o&&(u.headers["x-access-token"]=o),u),u=>Promise.reject(u))}}O();const f={async login(e,t){try{const s=await i.post("/api/auth/signin",{...e,type:t});return p("user",s.data),Object.assign(a.user,{...s.data}),Object.assign(a.access,{token:s.data.accessToken,status:!0,roles:s.data.roles}),s.data}catch(s){return Object.assign(a.access,{token:null,status:!1,roles:null}),n.setError(s),Promise.reject(s)}},async signup(e,t,s){const{password:c,passwordRepeat:r}=a.user;if(c!==r){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(o),new Error(o.response.status)}try{e.phone=e.phone.number;const o=await i.post("/api/auth/signup",{...e,type:t,inviteCode:s});return o.data.accessToken&&p("user",o.data),Object.assign(a.user,{...o.data}),Object.assign(a.access,{token:o.data.accessToken,status:!0,roles:o.data.roles}),o.data}catch(o){throw n.setError(o),console.log("Sign up falied"),o}},logout(){P("user"),Object.assign(a.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(a.access,{token:null,status:!1})},async resetPassword(e,t){try{const s=await i.post("/api/auth/reset-password",{email:e.email,phone:e.phone.number,type:t});return Object.assign(g.state.code,{...s.data,isSended:!0}),s.data}catch(s){return n.setError(s),Promise.reject(s)}},async updatePassword(e,t){const{password:s,passwordRepeat:c}=a.user;if(s!==c){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(r),new Error(r.response.status)}try{const r=await i.post("/api/auth/update-password",{email:e.email,phone:e.phone.number,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return r.data.accessToken&&p("user",r.data),Object.assign(a.user,{...r.data}),Object.assign(a.access,{token:r.data.accessToken,status:!0}),r.data}catch(r){return n.setError(r),Promise.reject(r)}}},h={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};async function m(e){if(process.env.MOBILE_APP){const t=await l.CapacitorCookies.getCookies();return console.log("capacitor cookie is "+t),console.log(t),t?JSON.parse(t.user):null}else{const t=d.default.get(e);return t?JSON.parse(t):null}}function p(e,t,s=process.env.NODE_ENV){process.env.MOBILE_APP?l.CapacitorCookies.setCookie({url:process.env.API_URL,key:e,value:JSON.stringify(t)}):d.default.set(e,JSON.stringify(t),h[s])}function P(e,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)l.CapacitorCookies.deleteCookie({url:process.env.API_URL,key:e});else{const s=t==="production"?{domain:process.env.API_URL}:{};d.default.remove(e,s)}}k.watch(a,(e,t)=>{});exports.actions=f;exports.state=a;
|
@@ -138,7 +138,7 @@ const y = {
|
|
138
138
|
async function h(e) {
|
139
139
|
if (process.env.MOBILE_APP) {
|
140
140
|
const o = await l.getCookies();
|
141
|
-
return console.log("capacitor cookie is " + o), o ? JSON.parse(o
|
141
|
+
return console.log("capacitor cookie is " + o), console.log(o), o ? JSON.parse(o.user) : null;
|
142
142
|
} else {
|
143
143
|
const o = d.get(e);
|
144
144
|
return o ? JSON.parse(o) : null;
|
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.vue2.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.log(o)}):n.create(t.value).then(o=>{u.push({name:"BlogPost",params:{url:o.url}})}).catch(o=>{console.log(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";
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs
CHANGED
@@ -1,4 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=
|
2
|
-
|
3
|
-
`)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function p(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function i(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{i()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{i()}),r()}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=u=>l.prop[l.content]=u),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:d,onFocus:o[1]||(o[1]=u=>c("focus",n.value)),onKeyup:p,ref_key:"textarea",ref:n,tabindex:"-1",class:"text-area mn-thin"},`
|
4
|
-
`,40,k),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=x;
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js
CHANGED
@@ -1,64 +1,4 @@
|
|
1
|
-
|
2
|
-
import "./Textarea.vue2.js";
|
3
|
-
const T = ["placeholder"], b = {
|
4
|
-
__name: "Textarea",
|
5
|
-
props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
|
6
|
-
emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
|
7
|
-
setup(n, { emit: u }) {
|
8
|
-
const e = n, a = u;
|
9
|
-
d(e);
|
10
|
-
const t = d(null);
|
11
|
-
d(0);
|
12
|
-
function p(l) {
|
13
|
-
let o = l.target.value.split(/\n+/);
|
14
|
-
if (o.length > 1) {
|
15
|
-
e.prop[e.content] = o[0], s(() => {
|
16
|
-
c();
|
17
|
-
});
|
18
|
-
let r = o.slice(1).map((k) => ({ __name: "Textarea", content: k }));
|
19
|
-
a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
|
20
|
-
} else
|
21
|
-
l.target.value.trim() === "" && l.target.value.includes(`
|
22
|
-
|
23
|
-
`) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
|
24
|
-
}
|
25
|
-
function f(l) {
|
26
|
-
(l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
|
27
|
-
}
|
28
|
-
function i() {
|
29
|
-
s(() => {
|
30
|
-
t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
|
31
|
-
});
|
32
|
-
}
|
33
|
-
function c() {
|
34
|
-
t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
|
35
|
-
}
|
36
|
-
return x(() => {
|
37
|
-
e.setFocus && s(() => {
|
38
|
-
i();
|
39
|
-
}), c();
|
40
|
-
}), m(() => {
|
41
|
-
e.setFocus && s(() => {
|
42
|
-
i();
|
43
|
-
}), c();
|
44
|
-
}), (l, o) => (h(), B("div", null, [
|
45
|
-
g(v("textarea", {
|
46
|
-
"onUpdate:modelValue": o[0] || (o[0] = (r) => n.prop[n.content] = r),
|
47
|
-
placeholder: n.placeholder ? n.placeholder : "Enter text",
|
48
|
-
onInput: p,
|
49
|
-
onFocus: o[1] || (o[1] = (r) => a("focus", t.value)),
|
50
|
-
onKeyup: f,
|
51
|
-
ref_key: "textarea",
|
52
|
-
ref: t,
|
53
|
-
tabindex: "-1",
|
54
|
-
class: "text-area mn-thin"
|
55
|
-
}, `
|
56
|
-
`, 40, T), [
|
57
|
-
[y, n.prop[n.content]]
|
58
|
-
])
|
59
|
-
]));
|
60
|
-
}
|
61
|
-
};
|
1
|
+
const e = "";
|
62
2
|
export {
|
63
|
-
|
3
|
+
e as default
|
64
4
|
};
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs
CHANGED
@@ -1 +1,4 @@
|
|
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("./Textarea.vue.cjs");const k=["placeholder"],x={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(l,{emit:s}){const t=l,c=s;e.ref(t);const n=e.ref(null);e.ref(0);function d(a){let o=a.target.value.split(/\n+/);if(o.length>1){t.prop[t.content]=o[0],e.nextTick(()=>{r()});let u=o.slice(1).map(f=>({__name:"Textarea",content:f}));c("addBlock","Textarea","",t.index,{blocks:u,ref:n})}else a.target.value.trim()===""&&a.target.value.includes(`
|
2
|
+
|
3
|
+
`)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function p(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function i(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{i()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{i()}),r()}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=u=>l.prop[l.content]=u),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:d,onFocus:o[1]||(o[1]=u=>c("focus",n.value)),onKeyup:p,ref_key:"textarea",ref:n,tabindex:"-1",class:"text-area mn-thin"},`
|
4
|
+
`,40,k),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=x;
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js
CHANGED
@@ -1,4 +1,64 @@
|
|
1
|
-
|
1
|
+
import { ref as d, onUpdated as x, nextTick as s, onMounted as m, openBlock as h, createElementBlock as B, withDirectives as g, createElementVNode as v, vModelText as y } from "vue";
|
2
|
+
import "./Textarea.vue.js";
|
3
|
+
const T = ["placeholder"], b = {
|
4
|
+
__name: "Textarea",
|
5
|
+
props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
|
6
|
+
emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
|
7
|
+
setup(n, { emit: u }) {
|
8
|
+
const e = n, a = u;
|
9
|
+
d(e);
|
10
|
+
const t = d(null);
|
11
|
+
d(0);
|
12
|
+
function p(l) {
|
13
|
+
let o = l.target.value.split(/\n+/);
|
14
|
+
if (o.length > 1) {
|
15
|
+
e.prop[e.content] = o[0], s(() => {
|
16
|
+
c();
|
17
|
+
});
|
18
|
+
let r = o.slice(1).map((k) => ({ __name: "Textarea", content: k }));
|
19
|
+
a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
|
20
|
+
} else
|
21
|
+
l.target.value.trim() === "" && l.target.value.includes(`
|
22
|
+
|
23
|
+
`) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
|
24
|
+
}
|
25
|
+
function f(l) {
|
26
|
+
(l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
|
27
|
+
}
|
28
|
+
function i() {
|
29
|
+
s(() => {
|
30
|
+
t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
|
31
|
+
});
|
32
|
+
}
|
33
|
+
function c() {
|
34
|
+
t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
|
35
|
+
}
|
36
|
+
return x(() => {
|
37
|
+
e.setFocus && s(() => {
|
38
|
+
i();
|
39
|
+
}), c();
|
40
|
+
}), m(() => {
|
41
|
+
e.setFocus && s(() => {
|
42
|
+
i();
|
43
|
+
}), c();
|
44
|
+
}), (l, o) => (h(), B("div", null, [
|
45
|
+
g(v("textarea", {
|
46
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => n.prop[n.content] = r),
|
47
|
+
placeholder: n.placeholder ? n.placeholder : "Enter text",
|
48
|
+
onInput: p,
|
49
|
+
onFocus: o[1] || (o[1] = (r) => a("focus", t.value)),
|
50
|
+
onKeyup: f,
|
51
|
+
ref_key: "textarea",
|
52
|
+
ref: t,
|
53
|
+
tabindex: "-1",
|
54
|
+
class: "text-area mn-thin"
|
55
|
+
}, `
|
56
|
+
`, 40, T), [
|
57
|
+
[y, n.prop[n.content]]
|
58
|
+
])
|
59
|
+
]));
|
60
|
+
}
|
61
|
+
};
|
2
62
|
export {
|
3
|
-
|
63
|
+
b as default
|
4
64
|
};
|
package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),E=require("../elements/Textarea.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),E=require("../elements/Textarea.vue2.cjs"),x=require("../elements/H2.vue.cjs"),N=require("../elements/Caption.vue.cjs"),y=require("../elements/Bullets.vue.cjs"),A=require("../elements/ImageUpload.vue.cjs"),V=require("../elements/Embed.vue.cjs"),q=require("../elements/Audio.vue.cjs"),D=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),M=["onMouseover"],T={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-small flex-nowrap flex-column flex"},$=["onClick"],F=["onClick"],I=["onClick"],S=["onClick"],U={__name:"Constructor",props:["content"],emits:["update"],setup(v,{emit:f}){const k=v,u=f;let t=e.ref(null);e.ref(null),t.value={content:k.content};const g={Textarea:E.default,H2:x.default,Bullets:y.default,Caption:N.default,ImageUpload:A.default,Embed:V.default,Audio:q.default};function s(c="Textarea",l="",n,o){console.log("We are adding new block (functuin HandleAddBlock):"+c+l+n+o);let a={order:t.value.content.length+1,type:c,style:"",class:"",content:l,blocks:[],setFocus:!0};if(o&&o.blocks&&Array.isArray(o.blocks)){let m=o.blocks.map(_=>({...a,content:_.content})),B=[(o.index||n)+1,0].concat(m);t.value.content.splice.apply(t.value.content,B);const C=m[m.length-1];console.log("New block is"+C)}else n!==void 0?(t.value.content.splice(n+1,0,a),console.log("Latest block is"+a)):(console.log("Another block is"+a),t.value.content.push(a));i.value=null,u("update",t.value.content)}function h(c,l){const n=t.value.content.findIndex(o=>o===c);n!==-1&&(t.value.content[n]={...t.value.content[n],...l}),u("update",t.value.content)}function p(c){let l=t.value.content.findIndex(n=>n===c);l!==-1&&t.value.content.splice(l,1),t.value.content[l-1].setFocus=!0,u("update",t.value.content)}const i=e.ref(null),d=e.ref(!1),r=e.ref(!1);function b(){d.value=!0}function w(){d.value=!1}return e.watchEffect(()=>{t.value&&t.value.content.length===0&&s("Textarea",""),u("update",t.value.content)}),(c,l)=>(e.openBlock(),e.createElementBlock("section",null,[e.unref(t).content?(e.openBlock(),e.createBlock(e.unref(D.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:b,onEnd:w},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(t).content,(n,o)=>(e.openBlock(),e.createElementBlock("div",{key:o,class:"pos-relative"},[e.createElementVNode("div",{onMouseover:a=>(i.value=o,r.value=!1),class:"pos-relative w-full h-full"},[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(g[n.type]),{index:o,component:n,prop:n,class:e.normalizeClass(n.class),setFocus:n.setFocus,content:"content",onDeleteBlock:p,onAddBlock:s,onUpdateBlock:h},null,40,["index","component","prop","class","setFocus"]))],40,M),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[i.value===o?(e.openBlock(),e.createElementBlock("div",{key:0,class:"pos-absolute z-index-4 i-semi",style:{right:"calc(100% + 0.5rem)",top:"calc(50% - 1.125rem)"},onMousedown:l[1]||(l[1]=e.withModifiers(a=>d.value=!0,["prevent"]))},[e.createElementVNode("button",{onClick:l[0]||(l[0]=a=>r.value=!r.value),class:"mn-small cursor-pointer w-100 i-semi bg-white radius-thin"},e.toDisplayString(n.content?"...":"+"),1),r.value?(e.openBlock(),e.createElementBlock("div",T,[e.createElementVNode("span",{onClick:a=>p(n),class:"mn-thin w-max t-red bg-white button-small button"}," Remove ",8,$),e.createElementVNode("span",{onClick:a=>s("ImageUpload","",o),class:"mn-thin w-max t-black bg-white button-small button"}," Add Image ",8,F),e.createElementVNode("span",{onClick:a=>s("H2","",o),class:"w-max button-small t-black bg-white button"}," Add Title ",8,I),e.createElementVNode("span",{onClick:a=>s("Embed","",o),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,S)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=U;
|
package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { ref as u, watchEffect as M, openBlock as a, createElementBlock as r, unref as p, createBlock as g, withCtx as b, Fragment as N, renderList as I, createElementVNode as c, resolveDynamicComponent as T, normalizeClass as U, createVNode as V, Transition as z, withModifiers as H, toDisplayString as S, createCommentVNode as k } from "vue";
|
2
|
-
import L from "../elements/Textarea.
|
2
|
+
import L from "../elements/Textarea.vue2.js";
|
3
3
|
import R from "../elements/H2.vue.js";
|
4
4
|
import W from "../elements/Caption.vue.js";
|
5
5
|
import j from "../elements/Bullets.vue.js";
|
package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Select/Select.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),c=require("vue-router");require("../../../../components/Select/Select.vue.cjs");const f=require("../../../../components/DatePicker/DatePicker.vue.cjs"),i=require("../../store/events.cjs"),m={class:"pd-thin min-h-100vh"},g=e.createElementVNode("div",{class:"mn-thin br-solid br-1px br-grey bg-grey radius-big"},null,-1),y={class:""},_={__name:"layoutEvents",setup(b){const l=c.useRoute(),d=c.useRouter(),u=p(new Date);function p(t){return`${t.getDate().toString().padStart(2,"0")}${(t.getMonth()+1).toString().padStart(2,"0")}${t.getFullYear()}`}if(l.query){const t=l.query,s={tags:t.tags?t.tags.split(","):null,date:t.date?t.date:u};i.state.filter=s}else{const t={date:u};i.state.filter=t}return e.watch(()=>i.state.filter,(t,s)=>{const a={...l.query};Object.keys(s).forEach(o=>{a[o]&&delete a[o]});const n=Object.fromEntries(Object.entries(t).filter(([o,r])=>Array.isArray(r)&&r.length>0||typeof r=="string"&&r).map(([o,r])=>[o,Array.isArray(r)?r.join(","):r]));Object.assign(a,n),d.push({query:a})},{deep:!0}),(t,s)=>{const a=e.resolveComponent("router-view");return e.openBlock(),e.createElementBlock("div",m,[e.createVNode(f.default,{date:i.state.filter.date,"onUpdate:date":s[0]||(s[0]=n=>i.state.filter.date=n),locale:t.$i18n.locale,class:"radius-small bg-grey pd-l-zero pd-r-zero pd-medium"},null,8,["date","locale"]),g,e.createElementVNode("section",y,[e.createVNode(a,null,{default:e.withCtx(({Component:n,route:o})=>[e.createVNode(e.Transition,{name:"scaleIn",mode:"out-in"},{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(n),{ref:"page",key:o.query}))]),_:2},1024)]),_:1})])])}}};exports.default=_;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { watch as y, resolveComponent as g, openBlock as u, createElementBlock as _, createVNode as l, createElementVNode as m, withCtx as d, Transition as b, createBlock as h, resolveDynamicComponent as w } from "vue";
|
2
2
|
import { useRoute as D, useRouter as q } from "vue-router";
|
3
|
-
import "../../../../components/Select/Select.
|
3
|
+
import "../../../../components/Select/Select.vue.js";
|
4
4
|
import j from "../../../../components/DatePicker/DatePicker.vue.js";
|
5
5
|
import { state as s } from "../../store/events.js";
|
6
6
|
const k = { class: "pd-thin min-h-100vh" }, E = /* @__PURE__ */ m("div", { class: "mn-thin br-solid br-1px br-grey bg-grey radius-big" }, null, -1), V = { class: "" }, B = {
|