@ozdao/prometheus-framework 0.1.77 → 0.1.79
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.css +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.cjs +1 -1
- package/dist/prometheus-framework/src/components/Field/Field.vue2.js +33 -30
- 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/modules/auth/components/layouts/Auth.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/layouts/Auth.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/components/pages/EnterCode.vue.js +41 -43
- 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 +33 -35
- 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 +1 -1
- 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 +43 -45
- 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 +87 -84
- 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 +44 -46
- package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.cjs +1 -0
- package/dist/prometheus-framework/src/modules/auth/localization/SignIn.json.js +38 -0
- package/dist/prometheus-framework/src/modules/auth/store/auth.cjs +1 -1
- package/dist/prometheus-framework/src/modules/auth/store/auth.js +93 -75
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js +4 -3
- 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 +12 -11
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.cjs +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/H2.vue.js +12 -11
- 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 +5 -4
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs +2 -2
- package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.js +20 -19
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.cjs +1 -1
- package/dist/prometheus-framework/src/modules/globals/localization/vue-i18n.js +15 -13
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/DepartmentEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/Organization.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.cjs +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/pages/OrganizationEdit.vue.js +1 -1
- package/dist/prometheus-framework/src/modules/organizations/components/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/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/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 +1 -1
- 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/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 +1 -1
- 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 +10 -10
- package/dist/prometheus-framework.es.js +8 -5
- package/dist/style.css +1 -1
- package/package.json +1 -2
- package/src/components/Field/Field.vue +4 -1
- package/src/components/Status/Status.vue +5 -8
- package/src/modules/auth/components/layouts/Auth.vue +45 -36
- package/src/modules/auth/components/pages/EnterCode.vue +0 -17
- package/src/modules/auth/components/pages/EnterPassword.vue +0 -23
- package/src/modules/auth/components/pages/ResetPassword.vue +0 -27
- package/src/modules/auth/components/pages/SignIn.vue +17 -47
- package/src/modules/auth/components/pages/SignUp.vue +0 -29
- package/src/modules/auth/localization/EnterCode.json +14 -0
- package/src/modules/auth/localization/EnterPassword.json +20 -0
- package/src/modules/auth/localization/ResetPassword.json +24 -0
- package/src/modules/auth/localization/SignIn.json +34 -0
- package/src/modules/auth/localization/SignUp.json +26 -0
- package/src/modules/auth/store/auth.js +20 -20
- package/src/modules/constructor/components/elements/Bullets.vue +1 -0
- package/src/modules/constructor/components/elements/Caption.vue +1 -0
- package/src/modules/constructor/components/elements/H2.vue +1 -0
- package/src/modules/constructor/components/elements/ImageUpload.vue +1 -1
- package/src/modules/constructor/components/elements/Textarea.vue +1 -0
- package/src/modules/globals/localization/methods/get-app-locales.js +13 -0
- package/src/modules/globals/localization/vue-i18n.js +20 -14
- package/src/modules/globals/localization/vue-i18n.singleton.js +1 -1
- package/src/modules/globals/localization/vue-i18n-new.js +0 -70
@@ -0,0 +1 @@
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={en:{title:"Welcome to Weeder",subtitle:"Sign In to Continue",signup:"Don't have an account?",phone:"Phone",email:"Email",phonePlaceholder:"Enter your phone",emailPlaceholder:"Enter your email",haveAccount:"Don't have an account? Sign Up",passwordPlaceholder:"Enter your password",forgotPassword:"Forgot Password?",signin:"Sign In",signin_apple:"Sign In with Apple",soon:"SOON"},ru:{title:"Приветствуем вас,",subtitle:"Войдите для продолжения",signup:"Нет аккаунта?",phone:"Телефон",email:"Email",phonePlaceholder:"Введите ваш телефон",emailPlaceholder:"Введите ваш email",haveAccount:"Нет аккаунта? Зарегистрироваться",passwordPlaceholder:"Введите ваш пароль",forgotPassword:"Забыли пароль?",signin:"Войти",signin_apple:"Войти через Apple",soon:"СКОРО"}},o={messages:e};exports.default=o;exports.messages=e;
|
@@ -0,0 +1,38 @@
|
|
1
|
+
const e = {
|
2
|
+
en: {
|
3
|
+
title: "Welcome to Weeder",
|
4
|
+
subtitle: "Sign In to Continue",
|
5
|
+
signup: "Don't have an account?",
|
6
|
+
phone: "Phone",
|
7
|
+
email: "Email",
|
8
|
+
phonePlaceholder: "Enter your phone",
|
9
|
+
emailPlaceholder: "Enter your email",
|
10
|
+
haveAccount: "Don't have an account? Sign Up",
|
11
|
+
passwordPlaceholder: "Enter your password",
|
12
|
+
forgotPassword: "Forgot Password?",
|
13
|
+
signin: "Sign In",
|
14
|
+
signin_apple: "Sign In with Apple",
|
15
|
+
soon: "SOON"
|
16
|
+
},
|
17
|
+
ru: {
|
18
|
+
title: "Приветствуем вас,",
|
19
|
+
subtitle: "Войдите для продолжения",
|
20
|
+
signup: "Нет аккаунта?",
|
21
|
+
phone: "Телефон",
|
22
|
+
email: "Email",
|
23
|
+
phonePlaceholder: "Введите ваш телефон",
|
24
|
+
emailPlaceholder: "Введите ваш email",
|
25
|
+
haveAccount: "Нет аккаунта? Зарегистрироваться",
|
26
|
+
passwordPlaceholder: "Введите ваш пароль",
|
27
|
+
forgotPassword: "Забыли пароль?",
|
28
|
+
signin: "Войти",
|
29
|
+
signin_apple: "Войти через Apple",
|
30
|
+
soon: "СКОРО"
|
31
|
+
}
|
32
|
+
}, o = {
|
33
|
+
messages: e
|
34
|
+
};
|
35
|
+
export {
|
36
|
+
o as default,
|
37
|
+
e as messages
|
38
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("../../../../node_modules/axios/lib/axios.cjs"),p=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"),O=require("./twofa.cjs"),i=f.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 k(){const e=await P("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))}}k();const g={async login(e,t){try{const s=await i.post("/api/auth/signin",{...e,type:t});return d("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&&d("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(){b("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(O.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&&d("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 P(e){if(process.env.MOBILE_APP){const t=p.default.get(e);return t?JSON.parse(t):null}else{const t=p.default.get(e);return t?JSON.parse(t):null}}function d(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)}):p.default.set(e,JSON.stringify(t),h[s])}function b(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}:{};p.default.remove(e,s)}}w.watch(a,(e,t)=>{});exports.actions=g;exports.state=a;
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import
|
1
|
+
import m from "../../../../node_modules/axios/lib/axios.js";
|
2
2
|
import u from "../../../../../node_modules/js-cookie/src/js.cookie.js";
|
3
|
-
import { CapacitorCookies as
|
4
|
-
import { reactive as
|
3
|
+
import { CapacitorCookies as l } from "../../../../node_modules/@capacitor/core/dist/index.js";
|
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
|
7
|
-
const
|
6
|
+
import { state as O } from "./twofa.js";
|
7
|
+
const i = m.create({ baseURL: process.env.API_URL, withCredentials: !0 }), a = w({
|
8
8
|
user: {
|
9
9
|
_id: void 0,
|
10
10
|
username: "",
|
@@ -18,137 +18,155 @@ const c = l.create({ baseURL: process.env.API_URL, withCredentials: !0 }), r = m
|
|
18
18
|
token: null,
|
19
19
|
status: !1
|
20
20
|
}
|
21
|
-
})
|
22
|
-
|
21
|
+
});
|
22
|
+
async function k() {
|
23
|
+
const e = await h("user");
|
24
|
+
if (e) {
|
25
|
+
const { _id: t, email: s, phone: c, roles: r, accessToken: o } = e;
|
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
|
+
}
|
28
|
+
}
|
29
|
+
k();
|
30
|
+
const R = {
|
31
|
+
async login(e, t) {
|
23
32
|
try {
|
24
|
-
const
|
25
|
-
...
|
33
|
+
const s = await i.post("/api/auth/signin", {
|
34
|
+
...e,
|
26
35
|
type: t
|
27
36
|
});
|
28
|
-
return
|
29
|
-
...
|
30
|
-
}), Object.assign(
|
31
|
-
token:
|
37
|
+
return d("user", s.data), Object.assign(a.user, {
|
38
|
+
...s.data
|
39
|
+
}), Object.assign(a.access, {
|
40
|
+
token: s.data.accessToken,
|
32
41
|
status: !0,
|
33
|
-
roles:
|
34
|
-
}),
|
35
|
-
} catch (
|
36
|
-
return Object.assign(
|
42
|
+
roles: s.data.roles
|
43
|
+
}), s.data;
|
44
|
+
} catch (s) {
|
45
|
+
return Object.assign(a.access, {
|
37
46
|
token: null,
|
38
47
|
status: !1,
|
39
48
|
roles: null
|
40
|
-
}), n(
|
49
|
+
}), n(s), Promise.reject(s);
|
41
50
|
}
|
42
51
|
},
|
43
|
-
async signup(
|
44
|
-
const { password:
|
45
|
-
if (
|
46
|
-
const
|
52
|
+
async signup(e, t, s) {
|
53
|
+
const { password: c, passwordRepeat: r } = a.user;
|
54
|
+
if (c !== r) {
|
55
|
+
const o = {
|
47
56
|
response: {
|
48
57
|
data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
|
49
58
|
}
|
50
59
|
};
|
51
|
-
throw n(
|
60
|
+
throw n(o), new Error(o.response.status);
|
52
61
|
}
|
53
62
|
try {
|
54
|
-
|
55
|
-
const
|
56
|
-
...
|
63
|
+
e.phone = e.phone.number;
|
64
|
+
const o = await i.post("/api/auth/signup", {
|
65
|
+
...e,
|
57
66
|
type: t,
|
58
|
-
inviteCode:
|
67
|
+
inviteCode: s
|
59
68
|
});
|
60
|
-
return
|
61
|
-
...
|
62
|
-
}), Object.assign(
|
63
|
-
token:
|
69
|
+
return o.data.accessToken && d("user", o.data), Object.assign(a.user, {
|
70
|
+
...o.data
|
71
|
+
}), Object.assign(a.access, {
|
72
|
+
token: o.data.accessToken,
|
64
73
|
status: !0,
|
65
|
-
roles:
|
66
|
-
}),
|
67
|
-
} catch (
|
68
|
-
throw n(
|
74
|
+
roles: o.data.roles
|
75
|
+
}), o.data;
|
76
|
+
} catch (o) {
|
77
|
+
throw n(o), console.log("Sign up falied"), o;
|
69
78
|
}
|
70
79
|
},
|
71
80
|
logout() {
|
72
|
-
|
81
|
+
P("user"), Object.assign(a.user, {
|
73
82
|
email: "",
|
74
83
|
phone: "",
|
75
84
|
password: "",
|
76
85
|
passwordRepeat: ""
|
77
|
-
}), Object.assign(
|
86
|
+
}), Object.assign(a.access, {
|
78
87
|
token: null,
|
79
88
|
status: !1
|
80
89
|
});
|
81
90
|
},
|
82
|
-
async resetPassword(
|
91
|
+
async resetPassword(e, t) {
|
83
92
|
try {
|
84
|
-
const
|
85
|
-
email:
|
86
|
-
phone:
|
93
|
+
const s = await i.post("/api/auth/reset-password", {
|
94
|
+
email: e.email,
|
95
|
+
phone: e.phone.number,
|
87
96
|
type: t
|
88
97
|
});
|
89
|
-
return Object.assign(
|
90
|
-
...
|
98
|
+
return Object.assign(O.code, {
|
99
|
+
...s.data,
|
91
100
|
isSended: !0
|
92
|
-
}),
|
93
|
-
} catch (
|
94
|
-
return n(
|
101
|
+
}), s.data;
|
102
|
+
} catch (s) {
|
103
|
+
return n(s), Promise.reject(s);
|
95
104
|
}
|
96
105
|
},
|
97
|
-
async updatePassword(
|
98
|
-
const { password:
|
99
|
-
if (
|
100
|
-
const
|
106
|
+
async updatePassword(e, t) {
|
107
|
+
const { password: s, passwordRepeat: c } = a.user;
|
108
|
+
if (s !== c) {
|
109
|
+
const r = {
|
101
110
|
response: {
|
102
111
|
data: { errorCode: "PASSWORDS_DO_NOT_MATCH" }
|
103
112
|
}
|
104
113
|
};
|
105
|
-
throw n(
|
114
|
+
throw n(r), new Error(r.response.status);
|
106
115
|
}
|
107
116
|
try {
|
108
|
-
const
|
109
|
-
email:
|
110
|
-
phone:
|
111
|
-
password:
|
112
|
-
passwordRepeat:
|
117
|
+
const r = await i.post("/api/auth/update-password", {
|
118
|
+
email: e.email,
|
119
|
+
phone: e.phone.number,
|
120
|
+
password: e.password,
|
121
|
+
passwordRepeat: e.passwordRepeat,
|
113
122
|
type: t
|
114
123
|
});
|
115
|
-
return
|
116
|
-
...
|
117
|
-
}), Object.assign(
|
118
|
-
token:
|
124
|
+
return r.data.accessToken && d("user", r.data), Object.assign(a.user, {
|
125
|
+
...r.data
|
126
|
+
}), Object.assign(a.access, {
|
127
|
+
token: r.data.accessToken,
|
119
128
|
status: !0
|
120
|
-
}),
|
121
|
-
} catch (
|
122
|
-
return n(
|
129
|
+
}), r.data;
|
130
|
+
} catch (r) {
|
131
|
+
return n(r), Promise.reject(r);
|
123
132
|
}
|
124
133
|
}
|
125
|
-
},
|
134
|
+
}, g = {
|
126
135
|
development: { secure: !1, expires: 1 },
|
127
136
|
production: { expires: 1, domain: process.env.API_URL, sameSite: "none", secure: !0 }
|
128
137
|
};
|
129
|
-
function
|
130
|
-
process.env.MOBILE_APP
|
138
|
+
function h(e) {
|
139
|
+
if (process.env.MOBILE_APP) {
|
140
|
+
const t = u.get(e);
|
141
|
+
return t ? JSON.parse(t) : null;
|
142
|
+
} else {
|
143
|
+
const t = u.get(e);
|
144
|
+
return t ? JSON.parse(t) : null;
|
145
|
+
}
|
146
|
+
}
|
147
|
+
function d(e, t, s = process.env.NODE_ENV) {
|
148
|
+
process.env.MOBILE_APP ? l.setCookie({
|
131
149
|
url: process.env.API_URL,
|
132
150
|
// используйте ваш API_URL
|
133
|
-
key:
|
151
|
+
key: e,
|
134
152
|
value: JSON.stringify(t)
|
135
|
-
}) : u.set(
|
153
|
+
}) : u.set(e, JSON.stringify(t), g[s]);
|
136
154
|
}
|
137
|
-
function
|
155
|
+
function P(e, t = process.env.NODE_ENV) {
|
138
156
|
if (process.env.MOBILE_APP)
|
139
|
-
|
157
|
+
l.deleteCookie({
|
140
158
|
url: process.env.API_URL,
|
141
159
|
// используйте ваш API_URL
|
142
|
-
key:
|
160
|
+
key: e
|
143
161
|
});
|
144
162
|
else {
|
145
|
-
const
|
146
|
-
u.remove(
|
163
|
+
const s = t === "production" ? { domain: process.env.API_URL } : {};
|
164
|
+
u.remove(e, s);
|
147
165
|
}
|
148
166
|
}
|
149
|
-
|
167
|
+
f(a, (e, t) => {
|
150
168
|
});
|
151
169
|
export {
|
152
170
|
R as actions,
|
153
|
-
|
171
|
+
a as state
|
154
172
|
};
|
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"),f=["placeholder"],h={__name:"Bullets",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(t,{emit:i}){const l=t;e.ref(l);const r=e.ref(null);function p(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:p,onFocus:o[1]||(o[1]=c=>i("focus",r.value)),ref_key:"textarea",ref:r,class:"text-area mn-small"},`
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),f=["placeholder"],h={__name:"Bullets",props:["obj","label","prop","value","content","textarea","placeholder","index","ref"],emits:["deleteBlock","addBlock","focus"],setup(t,{emit:i}){const l=t;e.ref(l);const r=e.ref(null);function p(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:p,onFocus:o[1]||(o[1]=c=>i("focus",r.value)),ref_key:"textarea",ref:r,tabindex:"-1",class:"text-area mn-small"},`
|
2
2
|
`,40,f),[[e.vModelText,t.prop[t.content]]])]))}};exports.default=h;
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Bullets.vue.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ref as d, onUpdated as f, onMounted as
|
1
|
+
import { ref as d, onUpdated as f, onMounted as x, watch as h, openBlock as m, createElementBlock as v, createTextVNode as g, toDisplayString as k, withDirectives as B, createElementVNode as b, vModelText as y } from "vue";
|
2
2
|
const E = ["placeholder"], I = {
|
3
3
|
__name: "Bullets",
|
4
4
|
props: ["obj", "label", "prop", "value", "content", "textarea", "placeholder", "index", "ref"],
|
@@ -20,9 +20,9 @@ const E = ["placeholder"], I = {
|
|
20
20
|
}
|
21
21
|
return f(() => {
|
22
22
|
a();
|
23
|
-
}),
|
23
|
+
}), x(() => {
|
24
24
|
a();
|
25
|
-
}),
|
25
|
+
}), h(() => t.prop[t.content], (l) => {
|
26
26
|
(!l || l.length === 0) && u("deleteBlock", t.prop);
|
27
27
|
}), (l, n) => (m(), v("div", null, [
|
28
28
|
g(k(e.prop[e.content]) + " ", 1),
|
@@ -33,6 +33,7 @@ const E = ["placeholder"], I = {
|
|
33
33
|
onFocus: n[1] || (n[1] = (r) => u("focus", o.value)),
|
34
34
|
ref_key: "textarea",
|
35
35
|
ref: o,
|
36
|
+
tabindex: "-1",
|
36
37
|
class: "text-area mn-small"
|
37
38
|
}, `
|
38
39
|
`, 40, E), [
|
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:i}){const t=l;e.ref(t);const r=e.ref(null);function p(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?(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)&&i("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:p,onFocus:o[1]||(o[1]=c=>i("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,19 +1,19 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as d, onUpdated as f, onMounted as m, watch as h, openBlock as x, createElementBlock as v, withDirectives as b, createElementVNode as g, vModelText as k } from "vue";
|
2
2
|
const B = ["placeholder"], E = {
|
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: i }) {
|
7
7
|
const e = t;
|
8
|
-
|
9
|
-
const o =
|
10
|
-
function
|
8
|
+
d(e);
|
9
|
+
const o = d(null);
|
10
|
+
function p(l) {
|
11
11
|
const n = /^\s*[-*]\s+(.*)/;
|
12
|
-
let
|
12
|
+
let s = l.target.value.split(/\n+/).map((c) => {
|
13
13
|
const u = n.exec(c);
|
14
14
|
return u ? u[1] : null;
|
15
15
|
}).filter((c) => c !== null);
|
16
|
-
|
16
|
+
s.length > 0 ? (e.prop[e.content] = s, a()) : l.target.value.trim() === "" && (e.prop[e.content] = [], a());
|
17
17
|
}
|
18
18
|
function a() {
|
19
19
|
o.value.style.height = "1rem", o.value.style.height = o.value.scrollHeight + "px";
|
@@ -23,15 +23,16 @@ const B = ["placeholder"], E = {
|
|
23
23
|
}), m(() => {
|
24
24
|
a();
|
25
25
|
}), h(() => e.prop[e.content], (l) => {
|
26
|
-
(!l || l.length === 0) &&
|
26
|
+
(!l || l.length === 0) && i("deleteBlock", e.prop);
|
27
27
|
}), (l, n) => (x(), v("div", null, [
|
28
|
-
g(
|
28
|
+
b(g("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:
|
32
|
-
onFocus: n[1] || (n[1] = (r) =>
|
31
|
+
onInput: p,
|
32
|
+
onFocus: n[1] || (n[1] = (r) => i("focus", o.value)),
|
33
33
|
ref_key: "textarea",
|
34
34
|
ref: o,
|
35
|
+
tabindex: "-1",
|
35
36
|
class: "br-l br-solid br-main pd-l-small text-area mn-small"
|
36
37
|
}, `
|
37
38
|
`, 40, B), [
|
@@ -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 f=["placeholder"],k={__name:"H2",props:["obj","label","prop","value","content","textarea","placeholder","index","ref","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(a,{emit:c}){const t=a;e.ref(t);const o=e.ref(null);e.ref(0);function d(
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue");require("./H2.vue2.cjs");const f=["placeholder"],k={__name:"H2",props:["obj","label","prop","value","content","textarea","placeholder","index","ref","setFocus"],emits:["deleteBlock","updateBlock","addBlock","focus"],setup(a,{emit:c}){const t=a;e.ref(t);const o=e.ref(null);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(p=>({type:"Textarea",content:p}));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 i(
|
3
|
+
`)&&(console.log("We are adding new block:"+t.index+newBlocks+o),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:o})),r()}function i(n){(n.keyCode===8||n.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()}),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:i,ref_key:"textarea",ref:o,tabindex:"-1",class:"h3 text-area mn-thin"},`
|
4
4
|
`,40,f),[[e.vModelText,a.prop[a.content]]])]))}};exports.default=k;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as s, onUpdated as k, nextTick as d, onMounted as x, watch as h, openBlock as B, createElementBlock as g, withDirectives as m, createElementVNode as v, vModelText as y } from "vue";
|
2
2
|
import "./H2.vue2.js";
|
3
3
|
const w = ["placeholder"], T = {
|
4
4
|
__name: "H2",
|
@@ -6,13 +6,13 @@ const w = ["placeholder"], T = {
|
|
6
6
|
emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
|
7
7
|
setup(n, { emit: a }) {
|
8
8
|
const e = n;
|
9
|
-
|
10
|
-
const t =
|
11
|
-
|
9
|
+
s(e);
|
10
|
+
const t = s(null);
|
11
|
+
s(0);
|
12
12
|
function p(o) {
|
13
13
|
let l = o.target.value.split(/\n+/);
|
14
14
|
if (l.length > 1) {
|
15
|
-
e.prop[e.content] = l[0],
|
15
|
+
e.prop[e.content] = l[0], d(() => {
|
16
16
|
c();
|
17
17
|
});
|
18
18
|
let r = l.slice(1).map((f) => ({ type: "Textarea", content: f }));
|
@@ -25,8 +25,8 @@ const w = ["placeholder"], T = {
|
|
25
25
|
function i(o) {
|
26
26
|
(o.keyCode === 8 || o.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
|
27
27
|
}
|
28
|
-
function
|
29
|
-
|
28
|
+
function u() {
|
29
|
+
d(() => {
|
30
30
|
t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
|
31
31
|
});
|
32
32
|
}
|
@@ -34,12 +34,12 @@ const w = ["placeholder"], T = {
|
|
34
34
|
t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
|
35
35
|
}
|
36
36
|
return k(() => {
|
37
|
-
e.setFocus &&
|
38
|
-
|
37
|
+
e.setFocus && d(() => {
|
38
|
+
u();
|
39
39
|
}), c();
|
40
40
|
}), x(() => {
|
41
|
-
e.setFocus &&
|
42
|
-
|
41
|
+
e.setFocus && d(() => {
|
42
|
+
u();
|
43
43
|
}), c();
|
44
44
|
}), h(() => e.prop[e.content], (o) => {
|
45
45
|
}), (o, l) => (B(), g("div", null, [
|
@@ -51,6 +51,7 @@ const w = ["placeholder"], T = {
|
|
51
51
|
onKeyup: i,
|
52
52
|
ref_key: "textarea",
|
53
53
|
ref: t,
|
54
|
+
tabindex: "-1",
|
54
55
|
class: "h3 text-area mn-thin"
|
55
56
|
}, `
|
56
57
|
`, 40, w), [
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.cjs
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../../node_modules/axios/lib/axios.cjs"),k=["src"],v={key:1,class:"t-transp pd-extra"},h={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(n,{emit:r}){const p=n,l=e.ref(null),
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),g=require("../../../../../node_modules/axios/lib/axios.cjs"),k=["src"],v={key:1,class:"t-transp pd-extra"},h={__name:"ImageUpload",props:["label","value","prop"],emits:["input","updateBlock"],setup(n,{emit:r}){const p=n,l=e.ref(null),i=e.ref(null);function u(){i.value.click()}async function s(t){let o=t.target.files[0];console.log(o);let a=new FormData,f="unsorted";a.append("file",o),console.log(a.has("file"));try{let m=await g.default.create({baseURL:process.env.API_URL,withCredentials:!0}).post(`/api/upload/file?folderName=${encodeURIComponent(f)}`,a,{headers:{"Content-Type":"multipart/form-data"}});l.value=m.data.filepath,console.log(l.value),r("input",l.value),r("updateBlock",p.prop,{content:l.value})}catch(c){console.error(c)}}function d(t){t.preventDefault(),s({target:{files:t.dataTransfer.files}})}return(t,o)=>(e.openBlock(),e.createElementBlock("div",{onClick:u,onDrop:d,onDragover:o[0]||(o[0]=e.withModifiers(()=>{},["prevent"])),class:"w-100 radius-big bg-white image-upload-area flex-v-center flex-h-center flex t-black mn-small"},[n.prop.content?(e.openBlock(),e.createElementBlock("img",{key:0,src:(t.FILE_SERVER_URL||"")+n.prop.content,alt:"Uploaded image",class:"w-100 h-30r object-fit-contain"},null,8,k)):(e.openBlock(),e.createElementBlock("span",v,"Click or drag-and-drop your image")),e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:i,tabindex:"-1",onChange:s,style:{display:"none"}},null,544)],32))}};exports.default=h;
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/ImageUpload.vue.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
import { ref as u, openBlock as l, createElementBlock as r, withModifiers as k, createElementVNode as v } from "vue";
|
2
2
|
import y from "../../../../../node_modules/axios/lib/axios.js";
|
3
|
-
const
|
3
|
+
const x = ["src"], C = {
|
4
4
|
key: 1,
|
5
5
|
class: "t-transp pd-extra"
|
6
|
-
},
|
6
|
+
}, U = {
|
7
7
|
__name: "ImageUpload",
|
8
8
|
props: [
|
9
9
|
"label",
|
@@ -51,11 +51,12 @@ const C = ["src"], x = {
|
|
51
51
|
src: (e.FILE_SERVER_URL || "") + a.prop.content,
|
52
52
|
alt: "Uploaded image",
|
53
53
|
class: "w-100 h-30r object-fit-contain"
|
54
|
-
}, null, 8,
|
54
|
+
}, null, 8, x)) : (l(), r("span", C, "Click or drag-and-drop your image")),
|
55
55
|
v("input", {
|
56
56
|
type: "file",
|
57
57
|
ref_key: "fileInput",
|
58
58
|
ref: s,
|
59
|
+
tabindex: "-1",
|
59
60
|
onChange: p,
|
60
61
|
style: { display: "none" }
|
61
62
|
}, null, 544)
|
@@ -63,5 +64,5 @@ const C = ["src"], x = {
|
|
63
64
|
}
|
64
65
|
};
|
65
66
|
export {
|
66
|
-
|
67
|
+
U as default
|
67
68
|
};
|
package/dist/prometheus-framework/src/modules/constructor/components/elements/Textarea.vue2.cjs
CHANGED
@@ -1,4 +1,4 @@
|
|
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
|
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 n=e.ref(null);e.ref(0);function d(a){let o=a.target.value.split(/\n+/);if(o.length>1){t.prop[t.content]=o[0],e.nextTick(()=>{r()});let u=o.slice(1).map(p=>({__name:"Textarea",content:p}));c("addBlock","Textarea","",t.index,{blocks:u,ref:n})}else a.target.value.trim()===""&&a.target.value.includes(`
|
2
2
|
|
3
|
-
`)&&(console.log("We are adding new block:"+t.index+newBlocks+
|
3
|
+
`)&&(console.log("We are adding new block:"+t.index+newBlocks+n),c("addBlock","Textarea","",t.index,{blocks:newBlocks,ref:n})),r()}function i(a){(a.keyCode===8||a.keyCode===46)&&t.prop[t.content].trim()===""&&c("deleteBlock",t.prop)}function s(){e.nextTick(()=>{n.value.focus(),c("updateBlock",t.prop,{setFocus:!1})})}function r(){n.value.style.height="1rem",n.value.style.height=n.value.scrollHeight+"px"}return e.onUpdated(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),e.onMounted(()=>{t.setFocus&&e.nextTick(()=>{s()}),r()}),(a,o)=>(e.openBlock(),e.createElementBlock("div",null,[e.withDirectives(e.createElementVNode("textarea",{"onUpdate:modelValue":o[0]||(o[0]=u=>l.prop[l.content]=u),placeholder:l.placeholder?l.placeholder:"Enter text",onInput:d,onFocus:o[1]||(o[1]=u=>c("focus",n.value)),onKeyup:i,ref_key:"textarea",ref:n,tabindex:"-1",class:"text-area mn-thin"},`
|
4
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,32 +1,32 @@
|
|
1
|
-
import { ref as
|
1
|
+
import { ref as s, onUpdated as k, nextTick as d, onMounted as x, openBlock as h, createElementBlock as B, withDirectives as m, createElementVNode as g, vModelText as v } from "vue";
|
2
2
|
import "./Textarea.vue.js";
|
3
3
|
const y = ["placeholder"], F = {
|
4
4
|
__name: "Textarea",
|
5
5
|
props: ["prop", "value", "content", "placeholder", "index", "setFocus"],
|
6
6
|
emits: ["deleteBlock", "updateBlock", "addBlock", "focus"],
|
7
|
-
setup(
|
8
|
-
const e =
|
9
|
-
|
10
|
-
const t =
|
11
|
-
|
12
|
-
function i(
|
13
|
-
let o =
|
7
|
+
setup(n, { emit: a }) {
|
8
|
+
const e = n;
|
9
|
+
s(e);
|
10
|
+
const t = s(null);
|
11
|
+
s(0);
|
12
|
+
function i(l) {
|
13
|
+
let o = l.target.value.split(/\n+/);
|
14
14
|
if (o.length > 1) {
|
15
|
-
e.prop[e.content] = o[0],
|
15
|
+
e.prop[e.content] = o[0], d(() => {
|
16
16
|
c();
|
17
17
|
});
|
18
18
|
let r = o.slice(1).map((f) => ({ __name: "Textarea", content: f }));
|
19
19
|
a("addBlock", "Textarea", "", e.index, { blocks: r, ref: t });
|
20
20
|
} else
|
21
|
-
|
21
|
+
l.target.value.trim() === "" && l.target.value.includes(`
|
22
22
|
|
23
23
|
`) && (console.log("We are adding new block:" + e.index + newBlocks + t), a("addBlock", "Textarea", "", e.index, { blocks: newBlocks, ref: t })), c();
|
24
24
|
}
|
25
|
-
function p(
|
26
|
-
(
|
25
|
+
function p(l) {
|
26
|
+
(l.keyCode === 8 || l.keyCode === 46) && e.prop[e.content].trim() === "" && a("deleteBlock", e.prop);
|
27
27
|
}
|
28
28
|
function u() {
|
29
|
-
|
29
|
+
d(() => {
|
30
30
|
t.value.focus(), a("updateBlock", e.prop, { setFocus: !1 });
|
31
31
|
});
|
32
32
|
}
|
@@ -34,26 +34,27 @@ const y = ["placeholder"], F = {
|
|
34
34
|
t.value.style.height = "1rem", t.value.style.height = t.value.scrollHeight + "px";
|
35
35
|
}
|
36
36
|
return k(() => {
|
37
|
-
e.setFocus &&
|
37
|
+
e.setFocus && d(() => {
|
38
38
|
u();
|
39
39
|
}), c();
|
40
40
|
}), x(() => {
|
41
|
-
e.setFocus &&
|
41
|
+
e.setFocus && d(() => {
|
42
42
|
u();
|
43
43
|
}), c();
|
44
|
-
}), (
|
44
|
+
}), (l, o) => (h(), B("div", null, [
|
45
45
|
m(g("textarea", {
|
46
|
-
"onUpdate:modelValue": o[0] || (o[0] = (r) =>
|
47
|
-
placeholder:
|
46
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => n.prop[n.content] = r),
|
47
|
+
placeholder: n.placeholder ? n.placeholder : "Enter text",
|
48
48
|
onInput: i,
|
49
49
|
onFocus: o[1] || (o[1] = (r) => a("focus", t.value)),
|
50
50
|
onKeyup: p,
|
51
51
|
ref_key: "textarea",
|
52
52
|
ref: t,
|
53
|
+
tabindex: "-1",
|
53
54
|
class: "text-area mn-thin"
|
54
55
|
}, `
|
55
56
|
`, 40, y), [
|
56
|
-
[v,
|
57
|
+
[v, n.prop[n.content]]
|
57
58
|
])
|
58
59
|
]));
|
59
60
|
}
|
@@ -1 +1 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("vue-i18n"),e={en:"🌎 EN",ru:"🇷🇺 RU",zh:"🇨🇳 ZH",fr:"🇫🇷 FR",de:"🇩🇪 DE",it:"🇮🇹 IT"},l={};for(const s of Object.keys(e))l[s]={};const o=a.createI18n({locale:"en",fallbackLocale:"en",legacy:!1,globalInjection:!0,messages:l,availableLocales:Object.keys(e)});exports.default=o;
|