@ozdao/prometheus-framework 0.1.52 → 0.1.54
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Upload/Upload.vue.d.ts.map +1 -1
- package/dist/main.css +1 -1
- package/dist/modules/constructor/components/elements/Audio.vue.d.ts +9 -0
- package/dist/modules/constructor/components/elements/Embed.vue.d.ts +9 -0
- package/dist/modules/constructor/components/elements/H2.vue.d.ts +1 -1
- package/dist/modules/constructor/components/elements/Textarea.vue.d.ts +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue.js +2 -224
- package/dist/prometheus-framework/src/components/Button/Button.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Button/Button.vue2.js +224 -2
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue.js +2 -72
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +72 -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/components/Tab/Tab.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue.js +2 -44
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +44 -2
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -0
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +75 -0
- package/dist/prometheus-framework/src/components/Upload/Upload.vue2.cjs +1 -0
- package/dist/prometheus-framework/src/components/Upload/Upload.vue2.js +4 -0
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/Invite.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/ResetPassword.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignIn.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/SignUp.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/backoffice/components/pages/Dashboard.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/layouts/Community.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +46 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +48 -0
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.cjs +1 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue.js +2 -61
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +4 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +61 -2
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js +70 -61
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/elements/ButtonJoin.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/layouts/layoutEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +3 -3
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/gallery/components/pages/Gallery.vue.js +12 -10
- 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 +2 -2
- 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 +199 -2
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/components/blocks/CardHeader.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/legal/components/pages/Legal.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue.js +11 -2
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/modules/mobile/components/Menu/Menu.vue2.js +2 -11
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/orders/components/pages/Orders.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/elements/ButtonToggleMembership.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/elements/ButtonToggleMembership.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Members.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 +18 -18
- 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 +4 -4
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organizations.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/Documents.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/FeedDepartments.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 +2 -2
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersList.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 +4 -4
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/CardPosition.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/blocks/ImagesThumbnails.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/LeftoverAdd.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/Leftovers.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductEdit.vue.js +4 -4
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/pages/ProductsBackoffice.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditParameters.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditParameters.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/EditProductInfo.vue.js +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 +3 -3
- package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/spots/components/sections/Feed.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 +82 -100
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileBlogposts.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEdit.vue.js +2 -2
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileEvents.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/users/components/pages/ProfileOrganizations.vue.js +1 -1
- package/dist/prometheus-framework.cjs.js +19 -19
- package/dist/prometheus-framework.es.js +530 -522
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/components/Button/Button.vue +1 -1
- package/src/components/Upload/Upload.vue +28 -8
- package/src/modules/constructor/components/elements/Audio.vue +82 -0
- package/src/modules/constructor/components/elements/Embed.vue +85 -0
- package/src/modules/constructor/components/sections/Constructor.vue +54 -7
- package/src/modules/gallery/components/pages/Gallery.vue +2 -3
- package/src/modules/gallery/components/sections/GalleryWithCategories.vue +6 -24
- package/src/modules/globals/mixins/mixins.js +52 -0
- package/src/modules/globals/router/routerGuards.js +28 -0
- package/src/modules/marketplace/components/layouts/Marketplace.vue +0 -1
- package/src/modules/organizations/components/pages/Organization.vue +2 -2
- package/src/modules/users/components/pages/Profile.vue +5 -3
- package/src/styles/theme.scss +0 -1
- package/src/styles/components/button.scss +0 -253
@@ -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.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"},$=e.createElementVNode("h3",{class:"mn-small"},"Final Touches",-1),D=e.createElementVNode("h5",{class:"mn-thin"},"Add to public:",-1),M={key:0,class:"mn-thin"},S={key:1,class:"mn-medium br-grey br-2px br-solid pd-small radius-big"},U={__name:"CreateBlogPost",setup(A){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 h(){d.value=!0}function v(){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=>h()),class:"mn-l-thin bg-black t-white button"},"Publish")])])):e.createCommentVNode("",!0),e.createVNode(y.default,{title:"Добавить участника",onClosePopup:v,isPopupOpen:d.value,class:"w-m-33r t-left pd-big bg-white radius-big"},{default:e.withCtx(()=>[$,e.createVNode(B.default,{onTagsChanged:a[4]||(a[4]=l=>e.unref(t).tags=l),tags:e.unref(t).tags},null,8,["tags"]),D,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",M,"Options:")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("div",S,[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=U;
|
package/dist/prometheus-framework/src/modules/community/components/pages/CreateBlogPost.vue.js
CHANGED
@@ -1,13 +1,13 @@
|
|
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
|
-
import O from "../../../../components/Popup/Popup.
|
4
|
+
import O from "../../../../components/Popup/Popup.vue2.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";
|
8
8
|
import A from "../../../../components/Checkbox/Checkbox.vue.js";
|
9
9
|
import E from "../../../../components/SelectMulti/SelectMulti.vue.js";
|
10
|
-
import L from "../../../../components/Button/Button.
|
10
|
+
import L from "../../../../components/Button/Button.vue2.js";
|
11
11
|
import { useRoute as M, useRouter as R } from "vue-router";
|
12
12
|
import { read as S, clean as F, state as H, update as k, create as y, remove as j } from "../../store/blogposts.js";
|
13
13
|
import { state as f } from "../../../auth/store/auth.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),s=require("../../../../components/Upload/Upload.vue.cjs"),i={class:"mn-thin w-100 pd-medium bg-white radius-medium"},m=["innerHTML"],p={key:1,class:""},b={__name:"Audio",props:["label","value","prop"],emits:["input","updateBlock"],setup(t,{emit:u}){const a=t,o=e.ref(null);function r(l){return[/youtube\.com/,/soundcloud\.com/,/vimeo\.com/].some(c=>c.test(l))}function d(l){o.value=l,o.value&&r(o.value)?(u("input",o.value),u("updateBlock",a.prop,{content:o.value})):alert("Invalid embed code or source not allowed.")}return(l,n)=>(e.openBlock(),e.createElementBlock("div",i,[t.prop.content?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.prop.content,class:"flex-center flex"},null,8,m)):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(s.default,{field:o.value,"onUpdate:field":n[0]||(n[0]=c=>o.value=c),onFileChange:d,type:"file",placeholder:"Enter embed code",class:"w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-thin"},null,8,["field"]),e.createElementVNode("button",{onClick:d,class:"button-small button"}," Save ")]))]))}};exports.default=b;
|
@@ -0,0 +1,46 @@
|
|
1
|
+
import { ref as r, openBlock as d, createElementBlock as a, createVNode as m, createElementVNode as p } from "vue";
|
2
|
+
import b from "../../../../components/Upload/Upload.vue.js";
|
3
|
+
const f = { class: "mn-thin w-100 pd-medium bg-white radius-medium" }, v = ["innerHTML"], k = {
|
4
|
+
key: 1,
|
5
|
+
class: ""
|
6
|
+
}, C = {
|
7
|
+
__name: "Audio",
|
8
|
+
props: [
|
9
|
+
"label",
|
10
|
+
"value",
|
11
|
+
"prop"
|
12
|
+
],
|
13
|
+
emits: ["input", "updateBlock"],
|
14
|
+
setup(l, { emit: c }) {
|
15
|
+
const u = l, e = r(null);
|
16
|
+
function i(o) {
|
17
|
+
return [/youtube\.com/, /soundcloud\.com/, /vimeo\.com/].some((n) => n.test(o));
|
18
|
+
}
|
19
|
+
function s(o) {
|
20
|
+
e.value = o, e.value && i(e.value) ? (c("input", e.value), c("updateBlock", u.prop, { content: e.value })) : alert("Invalid embed code or source not allowed.");
|
21
|
+
}
|
22
|
+
return (o, t) => (d(), a("div", f, [
|
23
|
+
l.prop.content ? (d(), a("div", {
|
24
|
+
key: 0,
|
25
|
+
innerHTML: l.prop.content,
|
26
|
+
class: "flex-center flex"
|
27
|
+
}, null, 8, v)) : (d(), a("div", k, [
|
28
|
+
m(b, {
|
29
|
+
field: e.value,
|
30
|
+
"onUpdate:field": t[0] || (t[0] = (n) => e.value = n),
|
31
|
+
onFileChange: s,
|
32
|
+
type: "file",
|
33
|
+
placeholder: "Enter embed code",
|
34
|
+
class: "w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-thin"
|
35
|
+
}, null, 8, ["field"]),
|
36
|
+
p("button", {
|
37
|
+
onClick: s,
|
38
|
+
class: "button-small button"
|
39
|
+
}, " Save ")
|
40
|
+
]))
|
41
|
+
]));
|
42
|
+
}
|
43
|
+
};
|
44
|
+
export {
|
45
|
+
C as default
|
46
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../../components/Field/Field.vue2.cjs"),i={class:"mn-thin w-100 pd-medium bg-white radius-medium"},m=["innerHTML"],p={key:1,class:""},b=e.createElementVNode("p",{class:"t-center"},"Embeds from youtube.com, vimeo.com, soundcloud.com are allowed",-1),v={__name:"Embed",props:["label","value","prop"],emits:["input","updateBlock"],setup(t,{emit:c}){const d=t,o=e.ref(null);function s(a){return[/youtube\.com/,/soundcloud\.com/,/vimeo\.com/].some(n=>n.test(a))}function r(){o.value&&s(o.value)?(c("input",o.value),c("updateBlock",d.prop,{content:o.value})):alert("Invalid embed code or source not allowed.")}return(a,l)=>(e.openBlock(),e.createElementBlock("div",i,[t.prop.content?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.prop.content,class:"flex-center flex"},null,8,m)):(e.openBlock(),e.createElementBlock("div",p,[e.createVNode(u.default,{field:o.value,"onUpdate:field":l[0]||(l[0]=n=>o.value=n),type:"textarea",placeholder:"Paste your embed code here",class:"w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-thin"},null,8,["field"]),e.createElementVNode("div",{class:"flex-v-center flex-nowrap flex gap-small"},[b,e.createElementVNode("button",{onClick:r,class:"button-small button"}," Save ")])]))]))}};exports.default=v;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { ref as m, openBlock as n, createElementBlock as s, createVNode as p, createElementVNode as c } from "vue";
|
2
|
+
import b from "../../../../components/Field/Field.vue2.js";
|
3
|
+
const f = { class: "mn-thin w-100 pd-medium bg-white radius-medium" }, v = ["innerHTML"], k = {
|
4
|
+
key: 1,
|
5
|
+
class: ""
|
6
|
+
}, x = /* @__PURE__ */ c("p", { class: "t-center" }, "Embeds from youtube.com, vimeo.com, soundcloud.com are allowed", -1), _ = {
|
7
|
+
__name: "Embed",
|
8
|
+
props: [
|
9
|
+
"label",
|
10
|
+
"value",
|
11
|
+
"prop"
|
12
|
+
],
|
13
|
+
emits: ["input", "updateBlock"],
|
14
|
+
setup(o, { emit: d }) {
|
15
|
+
const r = o, e = m(null);
|
16
|
+
function u(a) {
|
17
|
+
return [/youtube\.com/, /soundcloud\.com/, /vimeo\.com/].some((t) => t.test(a));
|
18
|
+
}
|
19
|
+
function i() {
|
20
|
+
e.value && u(e.value) ? (d("input", e.value), d("updateBlock", r.prop, { content: e.value })) : alert("Invalid embed code or source not allowed.");
|
21
|
+
}
|
22
|
+
return (a, l) => (n(), s("div", f, [
|
23
|
+
o.prop.content ? (n(), s("div", {
|
24
|
+
key: 0,
|
25
|
+
innerHTML: o.prop.content,
|
26
|
+
class: "flex-center flex"
|
27
|
+
}, null, 8, v)) : (n(), s("div", k, [
|
28
|
+
p(b, {
|
29
|
+
field: e.value,
|
30
|
+
"onUpdate:field": l[0] || (l[0] = (t) => e.value = t),
|
31
|
+
type: "textarea",
|
32
|
+
placeholder: "Paste your embed code here",
|
33
|
+
class: "w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-thin"
|
34
|
+
}, null, 8, ["field"]),
|
35
|
+
c("div", { class: "flex-v-center flex-nowrap flex gap-small" }, [
|
36
|
+
x,
|
37
|
+
c("button", {
|
38
|
+
onClick: i,
|
39
|
+
class: "button-small button"
|
40
|
+
}, " Save ")
|
41
|
+
])
|
42
|
+
]))
|
43
|
+
]));
|
44
|
+
}
|
45
|
+
};
|
46
|
+
export {
|
47
|
+
_ as default
|
48
|
+
};
|
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+o),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:o})),r()}function i(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function s(){e.nextTick(()=>{o.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){o.value.style.height="1rem",o.value.style.height=o.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),(a,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":n[0]||(n[0]=u=>l.prop[l.content]=u),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:d,onFocus:n[1]||(n[1]=u=>c("focus",o.value)),onKeyup:i,ref_key:"textarea",ref:o,class:"text-area mn-thin"},`
|
4
|
-
`,40,f),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=k;
|
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,63 +1,4 @@
|
|
1
|
-
|
2
|
-
import "./Textarea.vue2.js";
|
3
|
-
const y = ["placeholder"], F = {
|
4
|
-
__name: "Textarea",
|
5
|
-
props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
|
6
|
-
emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
|
7
|
-
setup(l, { emit: a }) {
|
8
|
-
const e = l;
|
9
|
-
d(e);
|
10
|
-
const t = d(null);
|
11
|
-
d(0);
|
12
|
-
function i(n) {
|
13
|
-
let o = n.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((f) => ({ __name: "Textarea", content: f }));
|
19
|
-
a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
|
20
|
-
} else
|
21
|
-
n.target.value.trim() === "" && n.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 p(n) {
|
26
|
-
(n.keyCode === 8 || n.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
|
27
|
-
}
|
28
|
-
function u() {
|
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 k(() => {
|
37
|
-
e.setFocus && s(() => {
|
38
|
-
u();
|
39
|
-
}), c();
|
40
|
-
}), x(() => {
|
41
|
-
e.setFocus && s(() => {
|
42
|
-
u();
|
43
|
-
}), c();
|
44
|
-
}), (n, o) => (h(), B("div", null, [
|
45
|
-
m(g("textarea", {
|
46
|
-
"onUpdate:modelValue": o[0] || (o[0] = (r) => l.prop[l.content] = r),
|
47
|
-
placeholder: l.placeholder ? l.placeholder : "Enter text",
|
48
|
-
onInput: i,
|
49
|
-
onFocus: o[1] || (o[1] = (r) => a("focus", t.value)),
|
50
|
-
onKeyup: p,
|
51
|
-
ref_key: "textarea",
|
52
|
-
ref: t,
|
53
|
-
class: "text-area mn-thin"
|
54
|
-
}, `
|
55
|
-
`, 40, y), [
|
56
|
-
[v, l.prop[l.content]]
|
57
|
-
])
|
58
|
-
]));
|
59
|
-
}
|
60
|
-
};
|
1
|
+
const e = "";
|
61
2
|
export {
|
62
|
-
|
3
|
+
e as default
|
63
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 f=["placeholder"],k={__name:"Textarea",props:["prop","value","content","placeholder","index","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(l,{emit:c}){const t=l;e.ref(t);const o=e.ref(null);e.ref(0);function d(a){let n=a.target.value.split(/\n+/);if(n.length>1){t.prop[t.content]=n[0],e.nextTick(()=>{r()});let u=n.slice(1).map(p=>({__name:"Textarea",content:p}));c("addBlock","Textarea","",t.index,{blocks:u,ref:o})}else a.target.value.trim()===""&&a.target.value.includes(`
|
2
|
+
|
3
|
+
`)&&(console.log("We are adding new block:"+t.index+newBlocks+o),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:o})),r()}function i(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function s(){e.nextTick(()=>{o.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){o.value.style.height="1rem",o.value.style.height=o.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),(a,n)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":n[0]||(n[0]=u=>l.prop[l.content]=u),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:d,onFocus:n[1]||(n[1]=u=>c("focus",o.value)),onKeyup:i,ref_key:"textarea",ref:o,class:"text-area mn-thin"},`
|
4
|
+
`,40,f),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=k;
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js
CHANGED
@@ -1,4 +1,63 @@
|
|
1
|
-
|
1
|
+
import { ref as d, onUpdated as k, nextTick as s, onMounted as x, openBlock as h, createElementBlock as B, withDirectives as m, createElementVNode as g, vModelText as v } from "vue";
|
2
|
+
import "./Textarea.vue.js";
|
3
|
+
const y = ["placeholder"], F = {
|
4
|
+
__name: "Textarea",
|
5
|
+
props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
|
6
|
+
emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
|
7
|
+
setup(l, { emit: a }) {
|
8
|
+
const e = l;
|
9
|
+
d(e);
|
10
|
+
const t = d(null);
|
11
|
+
d(0);
|
12
|
+
function i(n) {
|
13
|
+
let o = n.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((f) => ({ __name: "Textarea", content: f }));
|
19
|
+
a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
|
20
|
+
} else
|
21
|
+
n.target.value.trim() === "" && n.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 p(n) {
|
26
|
+
(n.keyCode === 8 || n.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
|
27
|
+
}
|
28
|
+
function u() {
|
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 k(() => {
|
37
|
+
e.setFocus && s(() => {
|
38
|
+
u();
|
39
|
+
}), c();
|
40
|
+
}), x(() => {
|
41
|
+
e.setFocus && s(() => {
|
42
|
+
u();
|
43
|
+
}), c();
|
44
|
+
}), (n, o) => (h(), B("div", null, [
|
45
|
+
m(g("textarea", {
|
46
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => l.prop[l.content] = r),
|
47
|
+
placeholder: l.placeholder ? l.placeholder : "Enter text",
|
48
|
+
onInput: i,
|
49
|
+
onFocus: o[1] || (o[1] = (r) => a("focus", t.value)),
|
50
|
+
onKeyup: p,
|
51
|
+
ref_key: "textarea",
|
52
|
+
ref: t,
|
53
|
+
class: "text-area mn-thin"
|
54
|
+
}, `
|
55
|
+
`, 40, y), [
|
56
|
+
[v, l.prop[l.content]]
|
57
|
+
])
|
58
|
+
]));
|
59
|
+
}
|
60
|
+
};
|
2
61
|
export {
|
3
|
-
|
62
|
+
F as default
|
4
63
|
};
|
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"),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),_=require("../elements/Textarea.vue2.cjs"),E=require("../elements/H2.vue.cjs"),x=require("../elements/Caption.vue.cjs"),N=require("../elements/Bullets.vue.cjs"),y=require("../elements/ImageUpload.vue.cjs"),A=require("../elements/Embed.vue.cjs"),V=require("../elements/Audio.vue.cjs"),q=require("../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs"),D=["onMouseover"],$={key:0,class:"z-index-5 radius-thin pd-thin bg-white w-max mn-small flex-nowrap flex-column flex"},M=["onClick"],T=["onClick"],F=["onClick"],I=["onClick"],S={__name:"Constructor",props:["content"],emits:["update"],setup(f,{emit:u}){const v=f;let t=e.ref(null);e.ref(null),t.value={content:v.content};const k={Textarea:_.default,H2:E.default,Bullets:N.default,Caption:x.default,ImageUpload:y.default,Embed:A.default,Audio:V.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(C=>({...a,content:C.content})),w=[(o.index||n)+1,0].concat(m);t.value.content.splice.apply(t.value.content,w);const B=m[m.length-1];console.log("New block is"+B)}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 b(){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(q.VueDraggableNext),{key:0,class:"w-full",list:e.unref(t).content,onStart:h,onEnd:b},{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(k[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,D),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",$,[e.createElementVNode("span",{onClick:a=>p(n),class:"mn-thin w-max t-red bg-white button-small button"}," Remove ",8,M),e.createElementVNode("span",{onClick:a=>s("ImageUpload","",o),class:"mn-thin w-max t-black bg-white button-small button"}," Add Image ",8,T),e.createElementVNode("span",{onClick:a=>s("H2","",o),class:"w-max button-small t-black bg-white button"}," Add Title ",8,F),e.createElementVNode("span",{onClick:a=>s("Embed","",o),class:"w-max button-small t-black bg-white button"}," Add Embed ",8,I)])):e.createCommentVNode("",!0)],32)):e.createCommentVNode("",!0)]),_:2},1024)]))),128))]),_:1},8,["list"])):e.createCommentVNode("",!0)]))}};exports.default=S;
|
package/dist/prometheus-framework/src/modules/constructor/components/sections/Constructor.vue.js
CHANGED
@@ -1,29 +1,33 @@
|
|
1
|
-
import { ref as
|
2
|
-
import S from "../elements/Textarea.
|
1
|
+
import { ref as i, watchEffect as F, openBlock as a, createElementBlock as r, unref as p, createBlock as g, withCtx as b, Fragment as M, renderList as N, createElementVNode as c, resolveDynamicComponent as I, normalizeClass as T, createVNode as U, Transition as V, withModifiers as z, toDisplayString as H, createCommentVNode as k } from "vue";
|
2
|
+
import S from "../elements/Textarea.vue2.js";
|
3
3
|
import L from "../elements/H2.vue.js";
|
4
4
|
import R from "../elements/Caption.vue.js";
|
5
5
|
import W from "../elements/Bullets.vue.js";
|
6
6
|
import j from "../elements/ImageUpload.vue.js";
|
7
|
-
import
|
8
|
-
|
7
|
+
import q from "../elements/Embed.vue.js";
|
8
|
+
import G from "../elements/Audio.vue.js";
|
9
|
+
import { VueDraggableNext as J } from "../../../../../../node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js";
|
10
|
+
const K = ["onMouseover"], O = {
|
9
11
|
key: 0,
|
10
|
-
class: "z-index-5 radius-thin
|
11
|
-
},
|
12
|
+
class: "z-index-5 radius-thin pd-thin bg-white w-max mn-small flex-nowrap flex-column flex"
|
13
|
+
}, P = ["onClick"], Q = ["onClick"], X = ["onClick"], Y = ["onClick"], ue = {
|
12
14
|
__name: "Constructor",
|
13
15
|
props: ["content"],
|
14
16
|
emits: ["update"],
|
15
|
-
setup(
|
16
|
-
const
|
17
|
-
let e =
|
18
|
-
|
19
|
-
const
|
17
|
+
setup(w, { emit: m }) {
|
18
|
+
const C = w;
|
19
|
+
let e = i(null);
|
20
|
+
i(null), e.value = { content: C.content };
|
21
|
+
const x = {
|
20
22
|
Textarea: S,
|
21
23
|
H2: L,
|
22
24
|
Bullets: W,
|
23
25
|
Caption: R,
|
24
|
-
ImageUpload: j
|
26
|
+
ImageUpload: j,
|
27
|
+
Embed: q,
|
28
|
+
Audio: G
|
25
29
|
};
|
26
|
-
function
|
30
|
+
function u(s = "Textarea", o = "", t, n) {
|
27
31
|
console.log("We are adding new block (functuin HandleAddBlock):" + s + o + t + n);
|
28
32
|
let l = {
|
29
33
|
order: e.value.content.length + 1,
|
@@ -35,87 +39,92 @@ const G = ["onMouseover"], J = {
|
|
35
39
|
setFocus: !0
|
36
40
|
};
|
37
41
|
if (n && n.blocks && Array.isArray(n.blocks)) {
|
38
|
-
let
|
42
|
+
let h = n.blocks.map((E) => ({
|
39
43
|
...l,
|
40
|
-
content:
|
41
|
-
})), A = [(n.index || t) + 1, 0].concat(
|
44
|
+
content: E.content
|
45
|
+
})), A = [(n.index || t) + 1, 0].concat(h);
|
42
46
|
e.value.content.splice.apply(e.value.content, A);
|
43
|
-
const D =
|
47
|
+
const D = h[h.length - 1];
|
44
48
|
console.log("New block is" + D);
|
45
49
|
} else
|
46
50
|
t !== void 0 ? (e.value.content.splice(t + 1, 0, l), console.log("Latest block is" + l)) : (console.log("Another block is" + l), e.value.content.push(l));
|
47
|
-
|
51
|
+
f.value = null, m("update", e.value.content);
|
48
52
|
}
|
49
|
-
function
|
53
|
+
function $(s, o) {
|
50
54
|
const t = e.value.content.findIndex((n) => n === s);
|
51
|
-
t !== -1 && (e.value.content[t] = { ...e.value.content[t], ...o }),
|
55
|
+
t !== -1 && (e.value.content[t] = { ...e.value.content[t], ...o }), m("update", e.value.content);
|
52
56
|
}
|
53
|
-
function
|
57
|
+
function _(s) {
|
54
58
|
let o = e.value.content.findIndex((t) => t === s);
|
55
|
-
o !== -1 && e.value.content.splice(o, 1), e.value.content[o - 1].setFocus = !0,
|
59
|
+
o !== -1 && e.value.content.splice(o, 1), e.value.content[o - 1].setFocus = !0, m("update", e.value.content);
|
56
60
|
}
|
57
|
-
const
|
61
|
+
const f = i(null), v = i(!1), d = i(!1);
|
58
62
|
function B() {
|
59
|
-
|
63
|
+
v.value = !0;
|
60
64
|
}
|
61
|
-
function
|
62
|
-
|
65
|
+
function y() {
|
66
|
+
v.value = !1;
|
63
67
|
}
|
64
|
-
return
|
65
|
-
e.value && e.value.content.length === 0 &&
|
66
|
-
}), (s, o) => (a(),
|
67
|
-
|
68
|
+
return F(() => {
|
69
|
+
e.value && e.value.content.length === 0 && u("Textarea", ""), m("update", e.value.content);
|
70
|
+
}), (s, o) => (a(), r("section", null, [
|
71
|
+
p(e).content ? (a(), g(p(J), {
|
68
72
|
key: 0,
|
69
73
|
class: "w-full",
|
70
|
-
list:
|
74
|
+
list: p(e).content,
|
71
75
|
onStart: B,
|
72
|
-
onEnd:
|
76
|
+
onEnd: y
|
73
77
|
}, {
|
74
|
-
default:
|
75
|
-
(a(!0),
|
78
|
+
default: b(() => [
|
79
|
+
(a(!0), r(M, null, N(p(e).content, (t, n) => (a(), r("div", {
|
76
80
|
key: n,
|
77
81
|
class: "pos-relative"
|
78
82
|
}, [
|
79
|
-
|
80
|
-
onMouseover: (l) => (
|
83
|
+
c("div", {
|
84
|
+
onMouseover: (l) => (f.value = n, d.value = !1),
|
81
85
|
class: "pos-relative w-full h-full"
|
82
86
|
}, [
|
83
|
-
(a(),
|
87
|
+
(a(), g(I(x[t.type]), {
|
84
88
|
index: n,
|
85
89
|
component: t,
|
86
90
|
prop: t,
|
87
91
|
class: T(t.class),
|
88
92
|
setFocus: t.setFocus,
|
89
93
|
content: "content",
|
90
|
-
onDeleteBlock:
|
91
|
-
onAddBlock:
|
92
|
-
onUpdateBlock:
|
94
|
+
onDeleteBlock: _,
|
95
|
+
onAddBlock: u,
|
96
|
+
onUpdateBlock: $
|
93
97
|
}, null, 40, ["index", "component", "prop", "class", "setFocus"]))
|
94
|
-
], 40,
|
98
|
+
], 40, K),
|
95
99
|
U(V, { name: "fade" }, {
|
96
|
-
default:
|
97
|
-
|
100
|
+
default: b(() => [
|
101
|
+
f.value === n ? (a(), r("div", {
|
98
102
|
key: 0,
|
99
|
-
class: "pos-absolute
|
100
|
-
|
103
|
+
class: "pos-absolute z-index-4 i-semi",
|
104
|
+
style: { right: "calc(100% + 0.5rem)", top: "calc(50% - 1.125rem)" },
|
105
|
+
onMousedown: o[1] || (o[1] = z((l) => v.value = !0, ["prevent"]))
|
101
106
|
}, [
|
102
|
-
|
107
|
+
c("button", {
|
103
108
|
onClick: o[0] || (o[0] = (l) => d.value = !d.value),
|
104
|
-
class: "mn-small w-100 i-semi bg-white radius-thin"
|
109
|
+
class: "mn-small cursor-pointer w-100 i-semi bg-white radius-thin"
|
105
110
|
}, H(t.content ? "..." : "+"), 1),
|
106
|
-
d.value ? (a(),
|
107
|
-
|
108
|
-
onClick: (l) =>
|
109
|
-
class: "
|
110
|
-
}, "Remove", 8,
|
111
|
-
|
112
|
-
onClick: (l) =>
|
113
|
-
class: "
|
114
|
-
}, "Add Image", 8,
|
115
|
-
|
116
|
-
onClick: (l) =>
|
117
|
-
class: "
|
118
|
-
}, "Add Title", 8,
|
111
|
+
d.value ? (a(), r("div", O, [
|
112
|
+
c("span", {
|
113
|
+
onClick: (l) => _(t),
|
114
|
+
class: "mn-thin w-max t-red bg-white button-small button"
|
115
|
+
}, " Remove ", 8, P),
|
116
|
+
c("span", {
|
117
|
+
onClick: (l) => u("ImageUpload", "", n),
|
118
|
+
class: "mn-thin w-max t-black bg-white button-small button"
|
119
|
+
}, " Add Image ", 8, Q),
|
120
|
+
c("span", {
|
121
|
+
onClick: (l) => u("H2", "", n),
|
122
|
+
class: "w-max button-small t-black bg-white button"
|
123
|
+
}, " Add Title ", 8, X),
|
124
|
+
c("span", {
|
125
|
+
onClick: (l) => u("Embed", "", n),
|
126
|
+
class: "w-max button-small t-black bg-white button"
|
127
|
+
}, " Add Embed ", 8, Y)
|
119
128
|
])) : k("", !0)
|
120
129
|
], 32)) : k("", !0)
|
121
130
|
]),
|
@@ -129,5 +138,5 @@ const G = ["onMouseover"], J = {
|
|
129
138
|
}
|
130
139
|
};
|
131
140
|
export {
|
132
|
-
|
141
|
+
ue as default
|
133
142
|
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),l=require("../../../../components/Button/Button.
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue"),l=require("../../../../components/Button/Button.vue2.cjs");require("../../../auth/store/auth.cjs");const c=require("../../store/tickets.cjs");require("./ButtonJoin.vue2.cjs");const p=require("../../../../../../_virtual/_plugin-vue_export-helper.cjs"),g={__name:"ButtonJoin",props:{type:{type:String,required:!0},userId:{type:String,required:!0},hasTicket:{type:Boolean,required:!0},targetId:{type:String,required:!0}},emits:["updateTicket"],setup(o,{emit:n}){const t=o,s=async()=>{t.hasTicket?await d(t.targetId):await u(t.targetId)};async function u(i){try{const e={type:t.type,target:i,user:t.userId},r=await c.actions.create(e);n("updateTicket",{ticket:r,hasTicket:!0,targetId:t.targetId})}catch(e){throw console.log(e),e}}async function d(i){const e={type:t.type,target:i,user:t.userId};try{const r=await c.actions.delete(e);n("updateTicket",{ticket:r,hasTicket:!1,targetId:t.targetId})}catch(r){throw console.log(r),r}}return(i,e)=>(a.openBlock(),a.createBlock(l.default,{submit:s,class:"bg-main button-small radius-extra button"},{default:a.withCtx(()=>[a.createTextVNode(a.toDisplayString(o.hasTicket?"Leave":"Join"),1)]),_:1}))}},k=p.default(g,[["__scopeId","data-v-872ff798"]]);exports.default=k;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { openBlock as p, createBlock as d, withCtx as g, createTextVNode as l, toDisplayString as m } from "vue";
|
2
|
-
import k from "../../../../components/Button/Button.
|
2
|
+
import k from "../../../../components/Button/Button.vue2.js";
|
3
3
|
import "../../../auth/store/auth.js";
|
4
4
|
import { actions as c } from "../../store/tickets.js";
|
5
5
|
import "./ButtonJoin.vue2.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 = {
|