@ozdao/prometheus-framework 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
  2. package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +72 -2
  3. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
  4. package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +2 -72
  5. package/dist/prometheus-framework/src/components/Select/Select.vue.cjs +1 -1
  6. package/dist/prometheus-framework/src/components/Select/Select.vue.js +78 -2
  7. package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
  8. package/dist/prometheus-framework/src/components/Select/Select.vue2.js +2 -78
  9. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
  10. package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
  11. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
  12. package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
  13. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  14. package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +2 -2
  15. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +4 -1
  16. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +62 -2
  17. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +1 -4
  18. package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +2 -62
  19. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
  20. package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +1 -1
  21. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
  22. package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
  23. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
  24. package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +2 -2
  25. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.cjs +1 -1
  26. package/dist/prometheus-framework/src/modules/events/components/pages/Events.vue.js +2 -2
  27. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
  28. package/dist/prometheus-framework/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
  29. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.cjs +1 -1
  30. package/dist/prometheus-framework/src/modules/gallery/components/sections/GalleryWithCategories.vue.js +1 -1
  31. package/dist/prometheus-framework/src/modules/icons/icons.client.cjs +1 -1
  32. package/dist/prometheus-framework/src/modules/icons/icons.client.js +38 -37
  33. package/dist/prometheus-framework/src/modules/icons/navigation/IconMute.vue.cjs +1 -0
  34. package/dist/prometheus-framework/src/modules/icons/navigation/IconMute.vue.js +45 -0
  35. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
  36. package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +1 -1
  37. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
  38. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +11 -2
  39. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
  40. package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
  41. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.cjs +1 -1
  42. package/dist/prometheus-framework/src/modules/organizations/components/blocks/DepartmentMemberModify.vue.js +1 -1
  43. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
  44. package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +2 -2
  45. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
  46. package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +2 -2
  47. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
  48. package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +2 -2
  49. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
  50. package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +1 -1
  51. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
  52. package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.js +1 -1
  53. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
  54. package/dist/prometheus-framework/src/modules/organizations/components/sections/Organizations.vue.js +2 -2
  55. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.cjs +1 -1
  56. package/dist/prometheus-framework/src/modules/reports/components/sections/FormReport.vue.js +2 -2
  57. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.cjs +1 -1
  58. package/dist/prometheus-framework/src/modules/users/components/pages/Profile.vue.js +1 -1
  59. package/dist/style.css +1 -1
  60. package/package.json +1 -1
  61. package/src/modules/icons/icons.client.js +1 -0
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),c=require("vue-i18n"),d=require("../../modules/icons/navigation/IconCross.vue.cjs");require("./Popup.vue2.cjs");const m={key:"popup-content",class:"pd-small popup-wrapper"},v={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String},emits:["close-popup"],setup(t,{emit:l}){const u=t,a=l;function s(){a("close-popup")}e.watch(()=>u.isPopupOpen,o=>{o?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const p={messages:{en:{},ru:{}}};return c.useI18n(p),(o,n)=>t.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createElementBlock("section",e.mergeProps({key:0,class:"pos-relative z-index-4"},o.$attrs),[e.createElementVNode("button",{onClick:n[0]||(n[0]=i=>s()),class:"pd-regular hover-scale-1 z-index-5 button-close-popup button"},[e.createVNode(d.default)]),e.renderSlot(o.$slots,"default")],16)):e.createCommentVNode("",!0)]),_:3}),e.createElementVNode("div",{onClick:n[1]||(n[1]=i=>s()),class:e.normalizeClass([{active:t.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)}};exports.default=v;
@@ -1,4 +1,74 @@
1
- const e = "";
1
+ import { watch as v, openBlock as s, createBlock as y, Teleport as P, createVNode as n, Transition as l, withCtx as a, createElementBlock as i, mergeProps as k, createElementVNode as u, renderSlot as b, createCommentVNode as p, normalizeClass as x } from "vue";
2
+ import { useRoute as C, useRouter as O } from "vue-router";
3
+ import { useI18n as T } from "vue-i18n";
4
+ import g from "../../modules/icons/navigation/IconCross.vue.js";
5
+ import "./Popup.vue2.js";
6
+ const z = {
7
+ key: "popup-content",
8
+ class: "pd-small popup-wrapper"
9
+ }, I = {
10
+ __name: "Popup",
11
+ props: {
12
+ isPopupOpen: {
13
+ type: Boolean,
14
+ default: !1
15
+ },
16
+ style: String
17
+ },
18
+ emits: ["close-popup"],
19
+ setup(e, { emit: c }) {
20
+ const m = e, d = c;
21
+ function r() {
22
+ d("close-popup");
23
+ }
24
+ return v(() => m.isPopupOpen, (o) => {
25
+ o ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
26
+ }), C(), O(), T({
27
+ messages: {
28
+ en: {},
29
+ ru: {}
30
+ }
31
+ }), (o, t) => e.isPopupOpen ? (s(), y(P, {
32
+ key: 0,
33
+ to: "body"
34
+ }, [
35
+ n(l, {
36
+ name: "TransitionTranslateY",
37
+ appear: ""
38
+ }, {
39
+ default: a(() => [
40
+ e.isPopupOpen ? (s(), i("div", z, [
41
+ n(l, {
42
+ name: "TransitionTranslateY",
43
+ mode: "out-in"
44
+ }, {
45
+ default: a(() => [
46
+ e.isPopupOpen ? (s(), i("section", k({
47
+ key: 0,
48
+ class: "pos-relative z-index-4"
49
+ }, o.$attrs), [
50
+ u("button", {
51
+ onClick: t[0] || (t[0] = (f) => r()),
52
+ class: "pd-regular hover-scale-1 z-index-5 button-close-popup button"
53
+ }, [
54
+ n(g)
55
+ ]),
56
+ b(o.$slots, "default")
57
+ ], 16)) : p("", !0)
58
+ ]),
59
+ _: 3
60
+ }),
61
+ u("div", {
62
+ onClick: t[1] || (t[1] = (f) => r()),
63
+ class: x([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
64
+ }, null, 2)
65
+ ])) : p("", !0)
66
+ ]),
67
+ _: 3
68
+ })
69
+ ])) : p("", !0);
70
+ }
71
+ };
2
72
  export {
3
- e as default
73
+ I as default
4
74
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),r=require("vue-router"),c=require("vue-i18n"),d=require("../../modules/icons/navigation/IconCross.vue.cjs");require("./Popup.vue.cjs");const m={key:"popup-content",class:"pd-small popup-wrapper"},v={__name:"Popup",props:{isPopupOpen:{type:Boolean,default:!1},style:String},emits:["close-popup"],setup(t,{emit:l}){const u=t,a=l;function s(){a("close-popup")}e.watch(()=>u.isPopupOpen,o=>{o?document.body.classList.add("no-scroll"):document.body.classList.remove("no-scroll")}),r.useRoute(),r.useRouter();const p={messages:{en:{},ru:{}}};return c.useI18n(p),(o,n)=>t.isPopupOpen?(e.openBlock(),e.createBlock(e.Teleport,{key:0,to:"body"},[e.createVNode(e.Transition,{name:"TransitionTranslateY",appear:""},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createElementBlock("div",m,[e.createVNode(e.Transition,{name:"TransitionTranslateY",mode:"out-in"},{default:e.withCtx(()=>[t.isPopupOpen?(e.openBlock(),e.createElementBlock("section",e.mergeProps({key:0,class:"pos-relative z-index-4"},o.$attrs),[e.createElementVNode("button",{onClick:n[0]||(n[0]=i=>s()),class:"pd-regular hover-scale-1 z-index-5 button-close-popup button"},[e.createVNode(d.default)]),e.renderSlot(o.$slots,"default")],16)):e.createCommentVNode("",!0)]),_:3}),e.createElementVNode("div",{onClick:n[1]||(n[1]=i=>s()),class:e.normalizeClass([{active:t.isPopupOpen===!0},"color-overlay z-index-3"])},null,2)])):e.createCommentVNode("",!0)]),_:3})])):e.createCommentVNode("",!0)}};exports.default=v;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
@@ -1,74 +1,4 @@
1
- import { watch as v, openBlock as s, createBlock as y, Teleport as P, createVNode as n, Transition as l, withCtx as a, createElementBlock as i, mergeProps as k, createElementVNode as u, renderSlot as b, createCommentVNode as p, normalizeClass as x } from "vue";
2
- import { useRoute as C, useRouter as O } from "vue-router";
3
- import { useI18n as T } from "vue-i18n";
4
- import g from "../../modules/icons/navigation/IconCross.vue.js";
5
- import "./Popup.vue.js";
6
- const z = {
7
- key: "popup-content",
8
- class: "pd-small popup-wrapper"
9
- }, I = {
10
- __name: "Popup",
11
- props: {
12
- isPopupOpen: {
13
- type: Boolean,
14
- default: !1
15
- },
16
- style: String
17
- },
18
- emits: ["close-popup"],
19
- setup(e, { emit: c }) {
20
- const m = e, d = c;
21
- function r() {
22
- d("close-popup");
23
- }
24
- return v(() => m.isPopupOpen, (o) => {
25
- o ? document.body.classList.add("no-scroll") : document.body.classList.remove("no-scroll");
26
- }), C(), O(), T({
27
- messages: {
28
- en: {},
29
- ru: {}
30
- }
31
- }), (o, t) => e.isPopupOpen ? (s(), y(P, {
32
- key: 0,
33
- to: "body"
34
- }, [
35
- n(l, {
36
- name: "TransitionTranslateY",
37
- appear: ""
38
- }, {
39
- default: a(() => [
40
- e.isPopupOpen ? (s(), i("div", z, [
41
- n(l, {
42
- name: "TransitionTranslateY",
43
- mode: "out-in"
44
- }, {
45
- default: a(() => [
46
- e.isPopupOpen ? (s(), i("section", k({
47
- key: 0,
48
- class: "pos-relative z-index-4"
49
- }, o.$attrs), [
50
- u("button", {
51
- onClick: t[0] || (t[0] = (f) => r()),
52
- class: "pd-regular hover-scale-1 z-index-5 button-close-popup button"
53
- }, [
54
- n(g)
55
- ]),
56
- b(o.$slots, "default")
57
- ], 16)) : p("", !0)
58
- ]),
59
- _: 3
60
- }),
61
- u("div", {
62
- onClick: t[1] || (t[1] = (f) => r()),
63
- class: x([{ active: e.isPopupOpen === !0 }, "color-overlay z-index-3"])
64
- }, null, 2)
65
- ])) : p("", !0)
66
- ]),
67
- _: 3
68
- })
69
- ])) : p("", !0);
70
- }
71
- };
1
+ const e = "";
72
2
  export {
73
- I as default
3
+ e as default
74
4
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Select.vue2.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
- const e = "";
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.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"]]);
2
78
  export {
3
- e as default
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("./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
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
@@ -1,80 +1,4 @@
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"]]);
1
+ const e = "";
78
2
  export {
79
- I as default
3
+ e as default
80
4
  };
@@ -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.vue2.cjs"),n=require("../../../mobile/components/Menu/MenuItem.vue.cjs"),o=require("vue-router"),i={class:""},l=e.createElementVNode("h1",{class:"mn-b-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
+ "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-b-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.vue2.js";
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-b-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 = {
@@ -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.vue2.cjs"),a=require("../../store/blogposts.cjs"),c=require("../../../auth/store/auth.cjs"),m={class:"min-h-100vh pd-thin"},d={class:"mn-b-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-b-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
+ "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.vue.cjs"),a=require("../../store/blogposts.cjs"),c=require("../../../auth/store/auth.cjs"),m={class:"min-h-100vh pd-thin"},d={class:"mn-b-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-b-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.vue2.js";
3
+ import b from "../../../../components/Select/Select.vue.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-b-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-b-semi gap-thin flex-nowrap flex" }, V = { class: "" }, D = {
@@ -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.vue2.cjs"),V=require("../../../constructor/components/sections/Constructor.vue.cjs"),y=require("../../../../components/Popup/Popup.vue2.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-b-small"},"Final Touches",-1),M=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),S={key:0,class:"mn-b-thin"},U={key:1,class:"mn-b-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-b-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;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),w=require("../../../constructor/components/elements/Textarea.vue.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-b-small"},"Final Touches",-1),M=e.createElementVNode("h5",{class:"mn-b-thin"},"Add to public:",-1),S={key:0,class:"mn-b-thin"},U={key:1,class:"mn-b-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-b-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;
@@ -1,7 +1,7 @@
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.vue2.js";
2
+ import D from "../../../constructor/components/elements/Textarea.vue.js";
3
3
  import N from "../../../constructor/components/sections/Constructor.vue.js";
4
- import O from "../../../../components/Popup/Popup.vue2.js";
4
+ import O from "../../../../components/Popup/Popup.vue.js";
5
5
  import "../../../../components/FieldTags/tag-input.vue.js";
6
6
  import "../../../../components/FieldTags/vue-tags-input.scss.js";
7
7
  import U from "../../../../components/FieldTags/BlockTags.vue.js";
@@ -1 +1,4 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="";exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./Textarea.vue2.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-b-thin"},`
4
+ `,40,k),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=x;
@@ -1,4 +1,64 @@
1
- const e = "";
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.vue2.js";
3
+ const T = ["placeholder"], F = {
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-b-thin"
55
+ }, `
56
+ `, 40, T), [
57
+ [y, n.prop[n.content]]
58
+ ])
59
+ ]));
60
+ }
61
+ };
2
62
  export {
3
- e as default
63
+ F as default
4
64
  };
@@ -1,4 +1 @@
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-b-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;
@@ -1,64 +1,4 @@
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"], F = {
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-b-thin"
55
- }, `
56
- `, 40, T), [
57
- [y, n.prop[n.content]]
58
- ])
59
- ]));
60
- }
61
- };
1
+ const e = "";
62
2
  export {
63
- F as default
3
+ e as default
64
4
  };
@@ -1 +1 @@
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-b-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 b={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 g(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 h(){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:h,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(b[n.type]),{index:o,component:n,prop:n,class:e.normalizeClass(n.class),setFocus:n.setFocus,content:"content",onDeleteBlock:p,onAddBlock:s,onUpdateBlock:g},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-b-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-b-thin w-max t-red bg-white button-small button"}," Remove ",8,$),e.createElementVNode("span",{onClick:a=>s("ImageUpload","",o),class:"mn-b-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;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),E=require("../elements/Textarea.vue.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-b-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 b={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 g(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 h(){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:h,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(b[n.type]),{index:o,component:n,prop:n,class:e.normalizeClass(n.class),setFocus:n.setFocus,content:"content",onDeleteBlock:p,onAddBlock:s,onUpdateBlock:g},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-b-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-b-thin w-max t-red bg-white button-small button"}," Remove ",8,$),e.createElementVNode("span",{onClick:a=>s("ImageUpload","",o),class:"mn-b-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;