@ozdao/prometheus-framework 0.1.81 → 0.1.83
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.cjs +4 -4
- package/dist/node_modules/vue-draggable-next/dist/vue-draggable-next.esm-bundler.js +3 -3
- package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.cjs +1 -1
- package/dist/prometheus-framework/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +2981 -2804
- package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.cjs +1 -0
- package/dist/prometheus-framework/node_modules/date-fns/esm/getQuarter/index.js +10 -0
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.cjs +2 -2
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/getNumberType.js +26 -26
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.cjs +1 -0
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/helpers/isObject.js +7 -0
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/metadata.js +28 -29
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.cjs +2 -2
- package/dist/prometheus-framework/node_modules/libphonenumber-js/es6/normalizeArguments.js +55 -65
- package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.cjs +1 -1
- package/dist/prometheus-framework/node_modules/libphonenumber-js/metadata.min.json.js +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Address/Address.vue.js +23 -23
- package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Breadcrumbs/Breadcrumbs.vue2.js +31 -31
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Checkbox/Checkbox.vue.js +22 -22
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/DatePicker/DatePicker.vue.js +18 -18
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/EditImages/EditImages.vue.js +24 -24
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +32 -32
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldBig/FieldBig.vue.js +31 -30
- package/dist/prometheus-framework/src/components/FieldPhone/FieldPhone.vue.js +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/FieldTags/BlockTags.vue.js +20 -20
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/LocationMarker/LocationMarker.vue.js +32 -32
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Popup/Popup.vue2.js +21 -21
- package/dist/prometheus-framework/src/components/Select/Select.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Select/Select.vue2.js +8 -8
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Tab/Tab.vue2.js +12 -12
- package/dist/prometheus-framework/src/components/Text/Text.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Text/Text.vue.js +11 -11
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/Upload/Upload.vue.js +27 -27
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImage/UploadImage.vue.js +18 -18
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/prometheus-framework/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +17 -17
- 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 +41 -40
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +17 -18
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js +24 -24
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Audio.vue.js +19 -19
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js +13 -13
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Embed.vue.js +16 -16
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +3 -3
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +30 -30
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js +22 -22
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +3 -3
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +25 -25
- 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 +56 -56
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/events/components/blocks/CardEvent.vue.js +44 -43
- 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 +15 -15
- package/dist/prometheus-framework/src/modules/events/components/pages/EditEvent.vue.js +10 -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 +51 -53
- 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 +59 -61
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Contacts.vue.js +22 -22
- 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 +23 -23
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/EditArray.vue.js +9 -9
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/blocks/Socials.vue.js +23 -23
- 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 +11 -11
- 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 +18 -18
- package/dist/prometheus-framework/src/modules/organizations/components/sections/MembersAdd.vue.cjs +1 -1
- 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 +30 -30
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/products/components/sections/FilterProducts.vue.js +24 -24
- 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 +20 -20
- package/dist/prometheus-framework.cjs.js +27 -27
- package/dist/prometheus-framework.es.js +1949 -1937
- package/dist/style.css +1 -1
- package/package.json +2 -4
- package/src/modules/auth/components/pages/SignIn.vue +1 -0
- package/src/modules/auth/store/auth.js +2 -7
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("../../../../node_modules/axios/lib/axios.cjs"),d=require("../../../../../node_modules/js-cookie/src/js.cookie.cjs"),l=require("../../../../node_modules/@capacitor/core/dist/index.cjs"),w=require("vue"),n=require("../../globals/store/globals.cjs"),f=require("./twofa.cjs"),i=k.default.create({baseURL:process.env.API_URL,withCredentials:!0}),a=w.reactive({user:{_id:void 0,username:"",email:"",phone:"",password:"",passwordRepeat:""},access:{roles:null,token:null,status:!1}});async function O(){const e=await m("user");if(e){const{_id:t,email:s,phone:c,roles:o,accessToken:r}=e;Object.assign(a.user,{_id:t,email:s,phone:c}),Object.assign(a.access,{token:r,roles:o,status:!!r}),i.interceptors.request.use(u=>(r&&(u.headers["x-access-token"]=r),u),u=>Promise.reject(u))}}O();const g={async login(e,t){try{const s=await i.post("/api/auth/signin",{...e,type:t});return p("user",s.data),Object.assign(a.user,{...s.data}),Object.assign(a.access,{token:s.data.accessToken,status:!0,roles:s.data.roles}),s.data}catch(s){return Object.assign(a.access,{token:null,status:!1,roles:null}),n.setError(s),Promise.reject(s)}},async signup(e,t,s){const{password:c,passwordRepeat:o}=a.user;if(c!==o){const r={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(r),new Error(r.response.status)}try{e.phone=e.phone.number;const r=await i.post("/api/auth/signup",{...e,type:t,inviteCode:s});return r.data.accessToken&&p("user",r.data),Object.assign(a.user,{...r.data}),Object.assign(a.access,{token:r.data.accessToken,status:!0,roles:r.data.roles}),r.data}catch(r){throw n.setError(r),console.log("Sign up falied"),r}},logout(){P("user"),Object.assign(a.user,{email:"",phone:"",password:"",passwordRepeat:""}),Object.assign(a.access,{token:null,status:!1})},async resetPassword(e,t){try{const s=await i.post("/api/auth/reset-password",{email:e.email,phone:e.phone.number,type:t});return Object.assign(f.state.code,{...s.data,isSended:!0}),s.data}catch(s){return n.setError(s),Promise.reject(s)}},async updatePassword(e,t){const{password:s,passwordRepeat:c}=a.user;if(s!==c){const o={response:{data:{errorCode:"PASSWORDS_DO_NOT_MATCH"}}};throw n.setError(o),new Error(o.response.status)}try{const o=await i.post("/api/auth/update-password",{email:e.email,phone:e.phone.number,password:e.password,passwordRepeat:e.passwordRepeat,type:t});return o.data.accessToken&&p("user",o.data),Object.assign(a.user,{...o.data}),Object.assign(a.access,{token:o.data.accessToken,status:!0}),o.data}catch(o){return n.setError(o),Promise.reject(o)}}},h={development:{secure:!1,expires:1},production:{expires:1,domain:process.env.API_URL,sameSite:"none",secure:!0}};function m(e){if(process.env.MOBILE_APP)return l.CapacitorCookies.getCookies();{const t=d.default.get(e);return t?JSON.parse(t):null}}function p(e,t,s=process.env.NODE_ENV){process.env.MOBILE_APP?l.CapacitorCookies.setCookie({url:process.env.API_URL,key:e,value:JSON.stringify(t)}):d.default.set(e,JSON.stringify(t),h[s])}function P(e,t=process.env.NODE_ENV){if(process.env.MOBILE_APP)l.CapacitorCookies.deleteCookie({url:process.env.API_URL,key:e});else{const s=t==="production"?{domain:process.env.API_URL}:{};d.default.remove(e,s)}}w.watch(a,(e,t)=>{});exports.actions=g;exports.state=a;
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import m from "../../../../node_modules/axios/lib/axios.js";
|
2
|
-
import
|
2
|
+
import d from "../../../../../node_modules/js-cookie/src/js.cookie.js";
|
3
3
|
import { CapacitorCookies as l } from "../../../../node_modules/@capacitor/core/dist/index.js";
|
4
4
|
import { reactive as w, watch as f } from "vue";
|
5
5
|
import { setError as n } from "../../globals/store/globals.js";
|
6
|
-
import { state as
|
6
|
+
import { state as k } from "./twofa.js";
|
7
7
|
const i = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = w({
|
8
8
|
user: {
|
9
9
|
_id: void 0,
|
@@ -19,22 +19,22 @@ const i = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = w
|
|
19
19
|
status: !1
|
20
20
|
}
|
21
21
|
});
|
22
|
-
async function
|
22
|
+
async function O() {
|
23
23
|
const e = await h("user");
|
24
24
|
if (e) {
|
25
25
|
const { _id: t, email: s, phone: c, roles: r, accessToken: o } = e;
|
26
26
|
Object.assign(a.user, { _id: t, email: s, phone: c }), Object.assign(a.access, { token: o, roles: r, status: !!o }), i.interceptors.request.use((p) => (o && (p.headers["x-access-token"] = o), p), (p) => Promise.reject(p));
|
27
27
|
}
|
28
28
|
}
|
29
|
-
|
30
|
-
const
|
29
|
+
O();
|
30
|
+
const S = {
|
31
31
|
async login(e, t) {
|
32
32
|
try {
|
33
33
|
const s = await i.post("/api/auth/signin", {
|
34
34
|
...e,
|
35
35
|
type: t
|
36
36
|
});
|
37
|
-
return
|
37
|
+
return u("user", s.data), Object.assign(a.user, {
|
38
38
|
...s.data
|
39
39
|
}), Object.assign(a.access, {
|
40
40
|
token: s.data.accessToken,
|
@@ -66,7 +66,7 @@ const R = {
|
|
66
66
|
type: t,
|
67
67
|
inviteCode: s
|
68
68
|
});
|
69
|
-
return o.data.accessToken &&
|
69
|
+
return o.data.accessToken && u("user", o.data), Object.assign(a.user, {
|
70
70
|
...o.data
|
71
71
|
}), Object.assign(a.access, {
|
72
72
|
token: o.data.accessToken,
|
@@ -95,7 +95,7 @@ const R = {
|
|
95
95
|
phone: e.phone.number,
|
96
96
|
type: t
|
97
97
|
});
|
98
|
-
return Object.assign(
|
98
|
+
return Object.assign(k.code, {
|
99
99
|
...s.data,
|
100
100
|
isSended: !0
|
101
101
|
}), s.data;
|
@@ -121,7 +121,7 @@ const R = {
|
|
121
121
|
passwordRepeat: e.passwordRepeat,
|
122
122
|
type: t
|
123
123
|
});
|
124
|
-
return r.data.accessToken &&
|
124
|
+
return r.data.accessToken && u("user", r.data), Object.assign(a.user, {
|
125
125
|
...r.data
|
126
126
|
}), Object.assign(a.access, {
|
127
127
|
token: r.data.accessToken,
|
@@ -136,21 +136,20 @@ const R = {
|
|
136
136
|
production: { expires: 1, domain: process.env.API_URL, sameSite: "none", secure: !0 }
|
137
137
|
};
|
138
138
|
function h(e) {
|
139
|
-
if (process.env.MOBILE_APP)
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
const t = u.get(e);
|
139
|
+
if (process.env.MOBILE_APP)
|
140
|
+
return l.getCookies();
|
141
|
+
{
|
142
|
+
const t = d.get(e);
|
144
143
|
return t ? JSON.parse(t) : null;
|
145
144
|
}
|
146
145
|
}
|
147
|
-
function
|
146
|
+
function u(e, t, s = process.env.NODE_ENV) {
|
148
147
|
process.env.MOBILE_APP ? l.setCookie({
|
149
148
|
url: process.env.API_URL,
|
150
149
|
// используйте ваш API_URL
|
151
150
|
key: e,
|
152
151
|
value: JSON.stringify(t)
|
153
|
-
}) :
|
152
|
+
}) : d.set(e, JSON.stringify(t), g[s]);
|
154
153
|
}
|
155
154
|
function P(e, t = process.env.NODE_ENV) {
|
156
155
|
if (process.env.MOBILE_APP)
|
@@ -161,12 +160,12 @@ function P(e, t = process.env.NODE_ENV) {
|
|
161
160
|
});
|
162
161
|
else {
|
163
162
|
const s = t === "production" ? { domain: process.env.API_URL } : {};
|
164
|
-
|
163
|
+
d.remove(e, s);
|
165
164
|
}
|
166
165
|
}
|
167
166
|
f(a, (e, t) => {
|
168
167
|
});
|
169
168
|
export {
|
170
|
-
|
169
|
+
S as actions,
|
171
170
|
a as state
|
172
171
|
};
|
package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../globals/components/blocks/CardHeader.vue.cjs"),i=require("./FooterBlogpost.vue.cjs"),d=require("../../../../components/Chips/Chips.vue.cjs"),m=require("../../../icons/navigation/IconEdit.vue.cjs"),g=require("vue-router"),p={class:"pos-relative bg-grey radius-big"},b=["src"],
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),u=require("../../../globals/components/blocks/CardHeader.vue.cjs"),i=require("./FooterBlogpost.vue.cjs"),d=require("../../../../components/Chips/Chips.vue.cjs"),m=require("../../../icons/navigation/IconEdit.vue.cjs"),g=require("vue-router"),p={class:"pos-relative bg-grey radius-big"},b=["src"],y={class:"pd-t-zero pd-medium"},k={key:0,class:"cursor-pointer mn-thin flex-nowrap flex w-100"},h={key:0,class:"pd-micro t-white uppercase t-semi p-small flex-center flex pd-r-small pd-l-small mn-l-thin w-min bg-second radius-extra"},f={key:1,class:"mn-small t-transp p-big"},B={key:2,class:"mn-small h2"},v={__name:"CardBlogpost",props:["blogpost","user","type"],setup(t){const a=g.useRouter(),n=t,s=e.computed(()=>n.blogpost.content.find(o=>o.type==="ImageUpload")),r=e.computed(()=>n.blogpost.content.find(o=>o.type==="Textarea"));return(o,l)=>(e.openBlock(),e.createElementBlock("article",p,[t.user&&t.user===t.blogpost.creator.target._id?(e.openBlock(),e.createBlock(m.default,{key:0,onClick:l[0]||(l[0]=e.withModifiers(c=>o.$router.push({name:"Edit BlogPost",params:{url:t.blogpost.url}}),["stop"])),class:"z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"})):e.createCommentVNode("",!0),e.createVNode(u.default,{class:e.normalizeClass({"mn-small pd-medium":t.type!=="short","flex-child-order-last flex-child mn-l-small":t.type==="short"}),entity:t.blogpost,entityType:"blogpost",user:t.user,owner:t.blogpost.owner,creator:t.blogpost.creator,date:t.blogpost.createdAt},null,8,["class","entity","user","owner","creator","date"]),s.value&&s.value.content&&t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("img",{key:1,src:(o.FILE_SERVER_URL||"")+s.value.content,alt:"Blog post image",class:"mn-medium object-fit-cover w-100 h-20r"},null,8,b)):e.createCommentVNode("",!0),e.createElementVNode("section",y,[t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("div",k,[e.createElementVNode("h3",{onClick:l[1]||(l[1]=c=>e.unref(a).push({name:"BlogPost",params:{url:t.blogpost.url}})),class:""},e.toDisplayString(t.blogpost.name),1),t.blogpost.status==="draft"?(e.openBlock(),e.createElementBlock("div",h,e.toDisplayString(t.blogpost.status),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0),r.value&&r.value.content&&t.type!=="blogpostPage"?(e.openBlock(),e.createElementBlock("p",f,e.toDisplayString(r.value.content.slice(0,120))+"... ",1)):e.createCommentVNode("",!0),t.type==="blogpostPage"?(e.openBlock(),e.createElementBlock("h3",B,e.toDisplayString(t.blogpost.name),1)):e.createCommentVNode("",!0),e.renderSlot(o.$slots,"default"),t.type!=="short"&&t.blogpost.tags.length>0?(e.openBlock(),e.createBlock(d.default,{key:3,chips:t.blogpost.tags},null,8,["chips"])):e.createCommentVNode("",!0)]),e.createVNode(i.default,{class:"pd-t-zero pd-medium",blogpost:t.blogpost,user:t.user},null,8,["blogpost","user"])]))}};exports.default=v;
|
package/dist/prometheus-framework/src/modules/community/components/blocks/CardBlogpost.vue.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import { computed as u, openBlock as e, createElementBlock as
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import { useRouter as
|
7
|
-
const
|
1
|
+
import { computed as u, openBlock as e, createElementBlock as l, createBlock as m, withModifiers as f, createCommentVNode as s, createVNode as g, normalizeClass as y, createElementVNode as d, unref as h, toDisplayString as a, renderSlot as k } from "vue";
|
2
|
+
import v from "../../../globals/components/blocks/CardHeader.vue.js";
|
3
|
+
import w from "./FooterBlogpost.vue.js";
|
4
|
+
import x from "../../../../components/Chips/Chips.vue.js";
|
5
|
+
import B from "../../../icons/navigation/IconEdit.vue.js";
|
6
|
+
import { useRouter as E } from "vue-router";
|
7
|
+
const $ = { class: "pos-relative bg-grey radius-big" }, P = ["src"], C = { class: "pd-t-zero pd-medium" }, z = {
|
8
8
|
key: 0,
|
9
9
|
class: "cursor-pointer mn-thin flex-nowrap flex w-100"
|
10
10
|
}, I = {
|
@@ -20,11 +20,11 @@ const v = { class: "pos-relative bg-grey radius-big" }, P = ["src"], C = { class
|
|
20
20
|
__name: "CardBlogpost",
|
21
21
|
props: ["blogpost", "user", "type"],
|
22
22
|
setup(t) {
|
23
|
-
const
|
24
|
-
return (o,
|
25
|
-
t.user && t.user === t.blogpost.creator.target._id ? (e(),
|
23
|
+
const p = E(), c = t, n = u(() => c.blogpost.content.find((o) => o.type === "ImageUpload")), i = u(() => c.blogpost.content.find((o) => o.type === "Textarea"));
|
24
|
+
return (o, r) => (e(), l("article", $, [
|
25
|
+
t.user && t.user === t.blogpost.creator.target._id ? (e(), m(B, {
|
26
26
|
key: 0,
|
27
|
-
onClick:
|
27
|
+
onClick: r[0] || (r[0] = f((b) => o.$router.push({
|
28
28
|
name: "Edit BlogPost",
|
29
29
|
params: {
|
30
30
|
url: t.blogpost.url
|
@@ -32,8 +32,8 @@ const v = { class: "pos-relative bg-grey radius-big" }, P = ["src"], C = { class
|
|
32
32
|
}), ["stop"])),
|
33
33
|
class: "z-index-2 pos-absolute pos-t-regular pos-r-regular i-regular t-transp"
|
34
34
|
})) : s("", !0),
|
35
|
-
|
36
|
-
class:
|
35
|
+
g(v, {
|
36
|
+
class: y({
|
37
37
|
"mn-small pd-medium": t.type !== "short",
|
38
38
|
"flex-child-order-last flex-child mn-l-small": t.type === "short"
|
39
39
|
}),
|
@@ -44,16 +44,16 @@ const v = { class: "pos-relative bg-grey radius-big" }, P = ["src"], C = { class
|
|
44
44
|
creator: t.blogpost.creator,
|
45
45
|
date: t.blogpost.createdAt
|
46
46
|
}, null, 8, ["class", "entity", "user", "owner", "creator", "date"]),
|
47
|
-
|
47
|
+
n.value && n.value.content && t.type !== "blogpostPage" ? (e(), l("img", {
|
48
48
|
key: 1,
|
49
|
-
src: (o.FILE_SERVER_URL || "") +
|
49
|
+
src: (o.FILE_SERVER_URL || "") + n.value.content,
|
50
50
|
alt: "Blog post image",
|
51
51
|
class: "mn-medium object-fit-cover w-100 h-20r"
|
52
52
|
}, null, 8, P)) : s("", !0),
|
53
|
-
|
54
|
-
t.type !== "blogpostPage" ? (e(),
|
55
|
-
|
56
|
-
onClick:
|
53
|
+
d("section", C, [
|
54
|
+
t.type !== "blogpostPage" ? (e(), l("div", z, [
|
55
|
+
d("h3", {
|
56
|
+
onClick: r[1] || (r[1] = (b) => h(p).push({
|
57
57
|
name: "BlogPost",
|
58
58
|
params: {
|
59
59
|
url: t.blogpost.url
|
@@ -61,17 +61,17 @@ const v = { class: "pos-relative bg-grey radius-big" }, P = ["src"], C = { class
|
|
61
61
|
})),
|
62
62
|
class: ""
|
63
63
|
}, a(t.blogpost.name), 1),
|
64
|
-
t.blogpost.status === "draft" ? (e(),
|
64
|
+
t.blogpost.status === "draft" ? (e(), l("div", I, a(t.blogpost.status), 1)) : s("", !0)
|
65
65
|
])) : s("", !0),
|
66
|
-
|
67
|
-
t.type === "blogpostPage" ? (e(),
|
66
|
+
i.value && i.value.content && t.type !== "blogpostPage" ? (e(), l("p", R, a(i.value.content.slice(0, 120)) + "... ", 1)) : s("", !0),
|
67
|
+
t.type === "blogpostPage" ? (e(), l("h3", V, a(t.blogpost.name), 1)) : s("", !0),
|
68
68
|
k(o.$slots, "default"),
|
69
|
-
t.type !== "short" && t.blogpost.tags.length > 0 ? (e(),
|
69
|
+
t.type !== "short" && t.blogpost.tags.length > 0 ? (e(), m(x, {
|
70
70
|
key: 3,
|
71
71
|
chips: t.blogpost.tags
|
72
72
|
}, null, 8, ["chips"])) : s("", !0)
|
73
73
|
]),
|
74
|
-
|
74
|
+
g(w, {
|
75
75
|
class: "pd-t-zero pd-medium",
|
76
76
|
blogpost: t.blogpost,
|
77
77
|
user: t.user
|
@@ -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"),r=require("../../../../components/Upload/Upload.vue.cjs"),m={class:"mn-thin w-100 pd-medium bg-white radius-medium"},p=["innerHTML"],v={key:1,class:""},b={__name:"Audio",props:["label","value","prop"],emits:["input","updateBlock"],setup(l,{emit:a}){const o=e.ref(null),i=l,u=a;function s(t){return[/youtube\.com/,/soundcloud\.com/,/vimeo\.com/].some(c=>c.test(t))}function d(t){o.value=t,o.value&&s(o.value)?(u("input",o.value),u("updateBlock",i.prop,{content:o.value})):alert("Invalid embed code or source not allowed.")}return(t,n)=>(e.openBlock(),e.createElementBlock("div",m,[l.prop.content?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:l.prop.content,class:"flex-center flex"},null,8,p)):(e.openBlock(),e.createElementBlock("div",v,[e.createVNode(r.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;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { ref as
|
2
|
-
import
|
3
|
-
const
|
1
|
+
import { ref as m, openBlock as d, createElementBlock as i, createVNode as p, createElementVNode as b } from "vue";
|
2
|
+
import f from "../../../../components/Upload/Upload.vue.js";
|
3
|
+
const v = { class: "mn-thin w-100 pd-medium bg-white radius-medium" }, k = ["innerHTML"], h = {
|
4
4
|
key: 1,
|
5
5
|
class: ""
|
6
|
-
},
|
6
|
+
}, _ = {
|
7
7
|
__name: "Audio",
|
8
8
|
props: [
|
9
9
|
"label",
|
@@ -11,30 +11,30 @@ const f = { class: "mn-thin w-100 pd-medium bg-white radius-medium" }, v = ["inn
|
|
11
11
|
"prop"
|
12
12
|
],
|
13
13
|
emits: ["input", "updateBlock"],
|
14
|
-
setup(
|
15
|
-
const u =
|
16
|
-
function
|
14
|
+
setup(t, { emit: s }) {
|
15
|
+
const e = m(null), u = t, a = s;
|
16
|
+
function r(o) {
|
17
17
|
return [/youtube\.com/, /soundcloud\.com/, /vimeo\.com/].some((n) => n.test(o));
|
18
18
|
}
|
19
|
-
function
|
20
|
-
e.value = o, e.value &&
|
19
|
+
function c(o) {
|
20
|
+
e.value = o, e.value && r(e.value) ? (a("input", e.value), a("updateBlock", u.prop, { content: e.value })) : alert("Invalid embed code or source not allowed.");
|
21
21
|
}
|
22
|
-
return (o,
|
23
|
-
|
22
|
+
return (o, l) => (d(), i("div", v, [
|
23
|
+
t.prop.content ? (d(), i("div", {
|
24
24
|
key: 0,
|
25
|
-
innerHTML:
|
25
|
+
innerHTML: t.prop.content,
|
26
26
|
class: "flex-center flex"
|
27
|
-
}, null, 8,
|
28
|
-
|
27
|
+
}, null, 8, k)) : (d(), i("div", h, [
|
28
|
+
p(f, {
|
29
29
|
field: e.value,
|
30
|
-
"onUpdate:field":
|
31
|
-
onFileChange:
|
30
|
+
"onUpdate:field": l[0] || (l[0] = (n) => e.value = n),
|
31
|
+
onFileChange: c,
|
32
32
|
type: "file",
|
33
33
|
placeholder: "Enter embed code",
|
34
34
|
class: "w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-thin"
|
35
35
|
}, null, 8, ["field"]),
|
36
|
-
|
37
|
-
onClick:
|
36
|
+
b("button", {
|
37
|
+
onClick: c,
|
38
38
|
class: "button-small button"
|
39
39
|
}, " Save ")
|
40
40
|
]))
|
@@ -42,5 +42,5 @@ const f = { class: "mn-thin w-100 pd-medium bg-white radius-medium" }, v = ["inn
|
|
42
42
|
}
|
43
43
|
};
|
44
44
|
export {
|
45
|
-
|
45
|
+
_ as default
|
46
46
|
};
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
2
|
-
`,40,
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),m=["placeholder"],h={__name:"Bullets",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(t,{emit:p}){const l=t;e.ref(l);const r=e.ref(null),i=p;function f(n){const o=/^\s*[-*]\s+(.*)/;let s=n.target.value.split(/\n+/).map(u=>{const d=o.exec(u);return d?d[1]:null}).filter(u=>u!==null);s.length>0?(l.prop[l.content]=s,a()):n.target.value.trim()===""&&(l.prop[l.content]=[],a())}function a(){r.value.style.height="1rem",r.value.style.height=r.value.scrollHeight+"px"}return e.onUpdated(()=>{a()}),e.onMounted(()=>{a()}),e.watch(()=>l.prop[l.content],n=>{(!n||n.length===0)&&i("deleteBlock",l.prop)}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.createTextVNode(e.toDisplayString(t.prop[t.content])+" ",1),e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=c=>t.prop[t.content]=c),placeholder:t.placeholder?t.placeholder:"Enter text",onInput:f,onFocus:o[1]||(o[1]=c=>i("focus",r.value)),ref_key:"textarea",ref:r,tabindex:"-1",class:"text-area mn-small"},`
|
2
|
+
`,40,m),[[e.vModelText,t.prop[t.content]]])]))}};exports.default=h;
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
import { ref as d, onUpdated as f, onMounted as x, watch as h, openBlock as
|
2
|
-
const
|
1
|
+
import { ref as d, onUpdated as f, onMounted as x, watch as h, openBlock as v, createElementBlock as g, createTextVNode as k, toDisplayString as B, withDirectives as b, createElementVNode as y, vModelText as E } from "vue";
|
2
|
+
const D = ["placeholder"], M = {
|
3
3
|
__name: "Bullets",
|
4
4
|
props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref"],
|
5
5
|
emits: ["deleteBlock", "addBlock", "focus"],
|
6
|
-
setup(e, { emit:
|
6
|
+
setup(e, { emit: p }) {
|
7
7
|
const t = e;
|
8
8
|
d(t);
|
9
|
-
const o = d(null);
|
10
|
-
function
|
9
|
+
const o = d(null), i = p;
|
10
|
+
function m(l) {
|
11
11
|
const n = /^\s*[-*]\s+(.*)/;
|
12
|
-
let
|
12
|
+
let u = l.target.value.split(/\n+/).map((c) => {
|
13
13
|
const s = n.exec(c);
|
14
14
|
return s ? s[1] : null;
|
15
15
|
}).filter((c) => c !== null);
|
16
|
-
|
16
|
+
u.length > 0 ? (t.prop[t.content] = u, a()) : l.target.value.trim() === "" && (t.prop[t.content] = [], a());
|
17
17
|
}
|
18
18
|
function a() {
|
19
19
|
o.value.style.height = "1rem", o.value.style.height = o.value.scrollHeight + "px";
|
@@ -23,25 +23,25 @@ const E = ["placeholder"], I = {
|
|
23
23
|
}), x(() => {
|
24
24
|
a();
|
25
25
|
}), h(() => t.prop[t.content], (l) => {
|
26
|
-
(!l || l.length === 0) &&
|
27
|
-
}), (l, n) => (
|
28
|
-
|
29
|
-
|
26
|
+
(!l || l.length === 0) && i("deleteBlock", t.prop);
|
27
|
+
}), (l, n) => (v(), g("div", null, [
|
28
|
+
k(B(e.prop[e.content]) + " ", 1),
|
29
|
+
b(y("textarea", {
|
30
30
|
"onUpdate:modelValue": n[0] || (n[0] = (r) => e.prop[e.content] = r),
|
31
31
|
placeholder: e.placeholder ? e.placeholder : "Enter text",
|
32
|
-
onInput:
|
33
|
-
onFocus: n[1] || (n[1] = (r) =>
|
32
|
+
onInput: m,
|
33
|
+
onFocus: n[1] || (n[1] = (r) => i("focus", o.value)),
|
34
34
|
ref_key: "textarea",
|
35
35
|
ref: o,
|
36
36
|
tabindex: "-1",
|
37
37
|
class: "text-area mn-small"
|
38
38
|
}, `
|
39
|
-
`, 40,
|
40
|
-
[
|
39
|
+
`, 40, D), [
|
40
|
+
[E, e.prop[e.content]]
|
41
41
|
])
|
42
42
|
]));
|
43
43
|
}
|
44
44
|
};
|
45
45
|
export {
|
46
|
-
|
46
|
+
M as default
|
47
47
|
};
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.cjs
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Caption",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(l,{emit:
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Caption",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(l,{emit:p}){const t=l;e.ref(t);const r=e.ref(null),u=p;function m(n){const o=/^\s*[-*]\s+(.*)/;let s=n.target.value.split(/\n+/).map(i=>{const d=o.exec(i);return d?d[1]:null}).filter(i=>i!==null);s.length>0?(t.prop[t.content]=s,a()):n.target.value.trim()===""&&(t.prop[t.content]=[],a())}function a(){r.value.style.height="1rem",r.value.style.height=r.value.scrollHeight+"px"}return e.onUpdated(()=>{a()}),e.onMounted(()=>{a()}),e.watch(()=>t.prop[t.content],n=>{(!n||n.length===0)&&u("deleteBlock",t.prop)}),(n,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=c=>l.prop[l.content]=c),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:m,onFocus:o[1]||(o[1]=c=>u("focus",r.value)),ref_key:"textarea",ref:r,tabindex:"-1",class:"br-l br-solid br-main pd-l-small text-area mn-small"},`
|
2
2
|
`,40,f),[[e.vModelText,l.prop[l.content]]])]))}};exports.default=h;
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Caption.vue.js
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
import { ref as d, onUpdated as f, onMounted as
|
2
|
-
const
|
1
|
+
import { ref as d, onUpdated as f, onMounted as h, watch as x, openBlock as v, createElementBlock as b, withDirectives as g, createElementVNode as k, vModelText as B } from "vue";
|
2
|
+
const y = ["placeholder"], I = {
|
3
3
|
__name: "Caption",
|
4
4
|
props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref"],
|
5
5
|
emits: ["deleteBlock", "addBlock", "focus"],
|
6
|
-
setup(t, { emit:
|
6
|
+
setup(t, { emit: p }) {
|
7
7
|
const e = t;
|
8
8
|
d(e);
|
9
|
-
const o = d(null);
|
10
|
-
function
|
9
|
+
const o = d(null), i = p;
|
10
|
+
function m(l) {
|
11
11
|
const n = /^\s*[-*]\s+(.*)/;
|
12
12
|
let s = l.target.value.split(/\n+/).map((c) => {
|
13
13
|
const u = n.exec(c);
|
@@ -20,27 +20,27 @@ const B = ["placeholder"], E = {
|
|
20
20
|
}
|
21
21
|
return f(() => {
|
22
22
|
a();
|
23
|
-
}),
|
23
|
+
}), h(() => {
|
24
24
|
a();
|
25
|
-
}),
|
25
|
+
}), x(() => e.prop[e.content], (l) => {
|
26
26
|
(!l || l.length === 0) && i("deleteBlock", e.prop);
|
27
|
-
}), (l, n) => (
|
28
|
-
|
27
|
+
}), (l, n) => (v(), b("div", null, [
|
28
|
+
g(k("textarea", {
|
29
29
|
"onUpdate:modelValue": n[0] || (n[0] = (r) => t.prop[t.content] = r),
|
30
30
|
placeholder: t.placeholder ? t.placeholder : "Enter text",
|
31
|
-
onInput:
|
31
|
+
onInput: m,
|
32
32
|
onFocus: n[1] || (n[1] = (r) => i("focus", o.value)),
|
33
33
|
ref_key: "textarea",
|
34
34
|
ref: o,
|
35
35
|
tabindex: "-1",
|
36
36
|
class: "br-l br-solid br-main pd-l-small text-area mn-small"
|
37
37
|
}, `
|
38
|
-
`, 40,
|
39
|
-
[
|
38
|
+
`, 40, y), [
|
39
|
+
[B, t.prop[t.content]]
|
40
40
|
])
|
41
41
|
]));
|
42
42
|
}
|
43
43
|
};
|
44
44
|
export {
|
45
|
-
|
45
|
+
I as default
|
46
46
|
};
|
@@ -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"),i=require("../../../../components/Field/Field.vue2.cjs"),m={class:"mn-thin w-100 pd-medium bg-white radius-medium"},p=["innerHTML"],b={key:1,class:""},v=e.createElementVNode("p",{class:"t-center"},"Embeds from youtube.com, vimeo.com, soundcloud.com are allowed",-1),f={__name:"Embed",props:["label","value","prop"],emits:["input","updateBlock"],setup(t,{emit:a}){const o=e.ref(null),d=t,c=a;function u(s){return[/youtube\.com/,/soundcloud\.com/,/vimeo\.com/].some(n=>n.test(s))}function r(){o.value&&u(o.value)?(c("input",o.value),c("updateBlock",d.prop,{content:o.value})):alert("Invalid embed code or source not allowed.")}return(s,l)=>(e.openBlock(),e.createElementBlock("div",m,[t.prop.content?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:t.prop.content,class:"flex-center flex"},null,8,p)):(e.openBlock(),e.createElementBlock("div",b,[e.createVNode(i.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"},[v,e.createElementVNode("button",{onClick:r,class:"button-small button"}," Save ")])]))]))}};exports.default=f;
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { ref as
|
2
|
-
import
|
3
|
-
const
|
1
|
+
import { ref as p, openBlock as n, createElementBlock as s, createVNode as b, createElementVNode as c } from "vue";
|
2
|
+
import f from "../../../../components/Field/Field.vue2.js";
|
3
|
+
const v = { class: "mn-thin w-100 pd-medium bg-white radius-medium" }, k = ["innerHTML"], x = {
|
4
4
|
key: 1,
|
5
5
|
class: ""
|
6
|
-
},
|
6
|
+
}, h = /* @__PURE__ */ c("p", { class: "t-center" }, "Embeds from youtube.com, vimeo.com, soundcloud.com are allowed", -1), y = {
|
7
7
|
__name: "Embed",
|
8
8
|
props: [
|
9
9
|
"label",
|
@@ -11,31 +11,31 @@ const f = { class: "mn-thin w-100 pd-medium bg-white radius-medium" }, v = ["inn
|
|
11
11
|
"prop"
|
12
12
|
],
|
13
13
|
emits: ["input", "updateBlock"],
|
14
|
-
setup(o, { emit:
|
15
|
-
const
|
14
|
+
setup(o, { emit: r }) {
|
15
|
+
const e = p(null), i = o, d = r;
|
16
16
|
function u(a) {
|
17
|
-
return [/youtube\.com/, /soundcloud\.com/, /vimeo\.com/].some((
|
17
|
+
return [/youtube\.com/, /soundcloud\.com/, /vimeo\.com/].some((l) => l.test(a));
|
18
18
|
}
|
19
|
-
function
|
20
|
-
e.value && u(e.value) ? (d("input", e.value), d("updateBlock",
|
19
|
+
function m() {
|
20
|
+
e.value && u(e.value) ? (d("input", e.value), d("updateBlock", i.prop, { content: e.value })) : alert("Invalid embed code or source not allowed.");
|
21
21
|
}
|
22
|
-
return (a,
|
22
|
+
return (a, t) => (n(), s("div", v, [
|
23
23
|
o.prop.content ? (n(), s("div", {
|
24
24
|
key: 0,
|
25
25
|
innerHTML: o.prop.content,
|
26
26
|
class: "flex-center flex"
|
27
|
-
}, null, 8,
|
28
|
-
|
27
|
+
}, null, 8, k)) : (n(), s("div", x, [
|
28
|
+
b(f, {
|
29
29
|
field: e.value,
|
30
|
-
"onUpdate:field":
|
30
|
+
"onUpdate:field": t[0] || (t[0] = (l) => e.value = l),
|
31
31
|
type: "textarea",
|
32
32
|
placeholder: "Paste your embed code here",
|
33
33
|
class: "w-100 br-solid br-1px br-black-transp-10 pd-medium radius-small mn-thin"
|
34
34
|
}, null, 8, ["field"]),
|
35
35
|
c("div", { class: "flex-v-center flex-nowrap flex gap-small" }, [
|
36
|
-
|
36
|
+
h,
|
37
37
|
c("button", {
|
38
|
-
onClick:
|
38
|
+
onClick: m,
|
39
39
|
class: "button-small button"
|
40
40
|
}, " Save ")
|
41
41
|
])
|
@@ -44,5 +44,5 @@ const f = { class: "mn-thin w-100 pd-medium bg-white radius-medium" }, v = ["inn
|
|
44
44
|
}
|
45
45
|
};
|
46
46
|
export {
|
47
|
-
|
47
|
+
y as default
|
48
48
|
};
|
@@ -1,4 +1,4 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./H2.vue2.cjs");const
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./H2.vue2.cjs");const k=["placeholder"],x={__name:"H2",props:["obj","label","prop","value","content","textarea","placeholder","index","ref","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(a,{emit:s}){const t=a;e.ref(t);const o=e.ref(null),c=s;e.ref(0);function d(n){let l=n.target.value.split(/\n+/);if(l.length>1){t.prop[t.content]=l[0],e.nextTick(()=>{r()});let u=l.slice(1).map(f=>({type:"Textarea",content:f}));c("addBlock","Textarea","",t.index,{blocks:u,ref:o})}else n.target.value.trim()===""&&n.target.value.includes(`
|
2
2
|
|
3
|
-
`)&&(console.log("We are adding new block:"+t.index+newBlocks+o),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:o})),r()}function
|
4
|
-
`,40,
|
3
|
+
`)&&(console.log("We are adding new block:"+t.index+newBlocks+o),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:o})),r()}function p(n){(n.keyCode===8||n.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function i(){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(()=>{i()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{i()}),r()}),e.watch(()=>t.prop[t.content],n=>{}),(n,l)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":l[0]||(l[0]=u=>a.prop[a.content]=u),placeholder:a.placeholder?a.placeholder:"Enter text",onInput:d,onFocus:l[1]||(l[1]=u=>c("focus",o.value)),onKeyup:p,ref_key:"textarea",ref:o,tabindex:"-1",class:"h3 text-area mn-thin"},`
|
4
|
+
`,40,k),[[e.vModelText,a.prop[a.content]]])]))}};exports.default=x;
|